【mars3d】LayerType 的arcgis_feature类型的图层配置聚合属性,达到聚合效果

相关api文档:

Global - V3.7.23 - Mars3D API文档

Global - V3.7.23 - Mars3D API文档

ArcGisWfsLayer - V3.7.23 - Mars3D API文档

实现代码:

复制代码
export function onMounted(mapInstance) {
  map = mapInstance // 记录首次创建的map

  // 添加参考三维模型
  const tiles3dLayer = new mars3d.layer.TilesetLayer({
    name: "合肥国家大学科技园",
    url: "//data.mars3d.cn/3dtiles/qx-hfdxy/tileset.json",
    position: { alt: 80 },
    maximumScreenSpaceError: 1
  })
  map.addLayer(tiles3dLayer)

  const graphicLayer = new mars3d.layer.ArcGisWfsLayer({
    name: "兴趣点",
    url: "//server.mars3d.cn/arcgis/rest/services/mars/hefei/MapServer/1",
    where: " NAME like '%大学%' ",
    minimumLevel: 15,
    symbol: {
      type: "billboardP",
      styleOptions: {
        image: "img/marker/mark-blue.png",
        verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
        label: {
          text: "{NAME}",
          font_size: 15,
          color: "#ffffff",
          outline: true,
          outlineColor: "#000000",
          pixelOffsetY: -30
        }
      }
    },
      clustering: {
      enabled: true,
      pixelRange: 20,
    },
    popup: "名称:{NAME}<br />地址:{address}",
    show: true
  })
  graphicLayer.on(mars3d.EventType.addGraphic, function (event) {
    updateAutoSurfaceHeight(event.graphic)
  })

  map.on(mars3d.EventType.load, function (event) {
    map.addLayer(graphicLayer)
  })
}
相关推荐
艾小码19 小时前
告别JS初学者噩梦:这样写流程控制和函数才叫优雅
前端·javascript
sdgsdgdsgc21 小时前
Next.js企业级应用开发:SSR、ISR与性能监控方案
开发语言·前端·javascript
哲此一生98421 小时前
搭建Vue3工程(去除不必要的文件)
前端·javascript·vue.js
心止水j21 小时前
spark
javascript·数据库·spark
黑云压城After1 天前
H5使用环信实现视频或语音通话
前端·javascript·vue.js
未来之窗软件服务1 天前
自己写算法(九)网页数字动画函数——东方仙盟化神期
前端·javascript·算法·仙盟创梦ide·东方仙盟·东方仙盟算法
你的人类朋友1 天前
什么是断言?
前端·后端·安全
FIN66681 天前
昂瑞微:实现精准突破,攻坚射频“卡脖子”难题
前端·人工智能·安全·前端框架·信息与通信
椎4951 天前
苍穹外卖前端nginx错误之一解决
运维·前端·nginx
@。1241 天前
对于灰度发布(金丝雀发布)的了解
开发语言·前端