React Native for Arcgis 地图开发 Map
2022-12-13 本文已影响0人
haibalai
对于地图调用
import { MapView } from '@haibalai/react-native-arcgis';
class MainMapView extends React.Component
render() {
return (
)
}
}
针对之前说的配置底图,可以支持切换
```javascript
import { MapManager } from '@haibalai/react-native-arcgis';
changeLayer(layerName: string) {
console.log(layerName);
// 选择地图类型
switch (layerName) {
case '天地图':
MapManager.switchBaseMap('baseMap', '天地图')
.then((r: any) => {
console.log('成功切换到天地图', r);
})
.catch((e: any) => {
console.log('失败切换到天地图', e);
https://xiaozhuanlan.com/topic/0824173659