• React Native for Arcgis 地图开发 LayerManager (五)


    针对图层管理LayerManager 比如之前的

    • {
    • "LayerId": "要素图层",
    • "LayerType": "MapImageLayer",
    • "ServerAddr": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0",
    • "DefineInfo": {
    • "Opacity": 0.8,
    • "Priority": 5,
    • "SubPriority": 10,
    • "QueryFlag": true,
    • "LoadFlag": false
    • }
    • }
    • 开启图层showLayer
    • import {LayerManager} from '@haibalai/react-native-arcgis';
    • LayerManager.showLayer('baseMap', "要素图层")..then((r: any) => {
    • changeErrorContent('');
    • changeContent(r);
    • })
    • .catch((error: any) => {
    • changeErrorContent(error);
    • });
    • 关闭图层hideLayer
    • import {LayerManager} from '@haibalai/react-native-arcgis';
    • LayerManager.hideLayer('baseMap', "要素图层"). .then((r: any) => {
    • changeErrorContent('');
    • changeContent(r);
    • })
    • .catch((error: any) => {
    • changeErrorContent(error);
    • });
    • 开启多个图层showLayers
    • import {LayerManager} from '@haibalai/react-native-arcgis';
    • LayerManager.showLayers('baseMap', ["要素图层", "要素图层1" ]);
    • 关闭多个图层hideLayers
    • import {LayerManager} from '@haibalai/react-native-arcgis';
    • LayerManager.hideLayers('baseMap', ["要素图层", "要素图层1" ]);
    • 设置显示隐藏
      ```
      import {LayerManager} from '@haibalai/react-native-arcgis';
      LayerManager.setVisible('baseMap', “要素图层1”, false)
      .then((r: any) => {
      changeErrorContent('');
      changeContent('' + r);
      })
  • 相关阅读:
    数据表管理admin
    HDU 5057
    HDU 5056
    HDU 6035(树形dp)
    CodeForces 586D
    Codeforces 940D
    CodeForces 820C
    TOJ4114(活用树状数组)
    2017CCPC中南地区赛 H题(最长路)
    CodeForces 544C (Writing Code)(dp,完全背包)
  • 原文地址:https://www.cnblogs.com/haibalai/p/16194855.html
Copyright © 2020-2023  润新知