vue+mars3d叠加展示arcgis动态服务

数据格式:使用arcgis发布的动态服务

叠加和移除arcgis服务图层的方法

javascript 复制代码
 //加载arcgis地图服务
  function arcgisServer(i,d,m,p){
    i[d.data] = new mars3d.layer.ArcGisLayer({
      name:d.label,
      url:p,
      flyTo: true
    })
    m.addLayer(i[d.data])
  }

  //移除arcgis服务范围线
  function removeArcgisLayer(i,d,m){
    if(i[d.data]){
      m.removeLayer(i[d.data],true)
      i[d.data] = null;
    }
  }

map.vue中调用方法进行叠加图层,我这里是以图层目录树的方式展现

javascript 复制代码
handleNodeClick(e){
        //勾选进行数据叠加
        e.check = !e.check;
        if(e.check){
          //叠加展示范围线
          arcgisServer(this.arcgisServerData,e,this.map,e.url);
        }else{
          //移除范围线
          removeArcgisLayer(this.arcgisServerData,e,this.map)
        }
      },
相关推荐
DreamLife☼1 天前
Node-RED:自定义节点开发:打造专属工具箱
arcgis·调试·封装·npm包·自定义节点·节点开发·html模板
李纲明1 天前
WordPress外贸成品网站的免费获取渠道
vue·php
加洛斯2 天前
前端小知识002:ref 与 reactive 详解
前端·vue
qq_214803292 天前
ArcGIS Runtime Java SDK初始化报错:Could not find runtime
java·开发语言·arcgis
整点可乐2 天前
关于cesium的primitive的modelMatrix的应用
前端·javascript·cesium
计算机毕设vx_bysj68692 天前
计算机毕业设计必看必学~Springboot教学进度管理系统,原创定制程序、单片机、java、PHP、Python、小程序、文案全套、毕设成品等!
java·spring boot·vue·课程设计·管理系统
GIS遥遥3 天前
Cesium进阶教程(2)|基于 Cesium 后处理Post Processing的图形绘制(上)
cesium·gis开发·webgis开发
小贺要学前端3 天前
【无标题】
前端·javascript·vue·技术趋势
IT教程资源C3 天前
(N_141)基于springboot,vue网上拍卖平台
mysql·vue·前后端分离·拍卖系统·springboot拍卖
IT教程资源C4 天前
(N_144)基于微信小程序在线订餐系统
mysql·vue·uniapp·前后端分离·订餐小程序·springboot订餐