react-native-amap-bridge

react native 和 原生高德地图 交互

Usage no npm install needed!

<script type="module">
  import reactNativeAmapBridge from 'https://cdn.skypack.dev/react-native-amap-bridge';
</script>

README

复制android目录下的文件至 项目包下

修改文件中的包名

MainApplicationgetPackage中 注册包名 new AmapBridgePackage()

使用

import AmapBridge from 'react-native-amap-bridge'

...

AmapBridge.navByName(startAddress,endAddress)
AmapBridge.navByMine(endLat, endLng, endAddress)   #start = 我的位置
AmapBridge.navByPosition(startLat, startLng, startAddress, endLat, endLng, endAddress)
AmapBridge.isInstallAmap()   #return Promise