指南
本地地理编码教程
使用 @capgo/capacitor-nativegeocoder
Capacitor 本地地理编码插件
安装
npm install @capgo/capacitor-nativegeocoder
npx cap sync
此插件暴露的内容
reverseGeocode- 将经纬度转换为地址。forwardGeocode- 将地址转换为经纬度。
示例使用
reverseGeocode
将经纬度转换为地址。
import { NativeGeocoder } from '@capgo/capacitor-nativegeocoder';
await NativeGeocoder.reverseGeocode({} as ReverseOptions);
forwardGeocode
将地址转换为经纬度。
import { NativeGeocoder } from '@capgo/capacitor-nativegeocoder';
await NativeGeocoder.forwardGeocode({} as ForwardOptions);
完整参考
- GitHub: https://github.com/Cap-go/capacitor-nativegeocoder/
- 文档:/docs/plugins/nativegeocoder/
继续使用@capgo/capacitor-nativegeocoder
如果您正在使用 使用@capgo/capacitor-nativegeocoder 来规划原生插件工作,连接它与 @capgo/capacitor-nativegeocoder 了解@capgo/capacitor-nativegeocoder 的实现细节在@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-nativegeocoder 入门 Capgo Plugin Directory Capgo 插件目录 Capacitor 插件由 Capgo 提供 为 Capacitor 插件由 Capgo 提供的实现细节 添加或更新插件 为添加或更新插件的实现细节