React Native for Arcgis 地图开发 MapView 使用 (四)

对于地图调用

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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容