【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)
  })
}
相关推荐
passerby60617 小时前
完成前端时间处理的另一块版图
前端·github·web components
掘了7 小时前
「2025 年终总结」在所有失去的人中,我最怀念我自己
前端·后端·年终总结
崔庆才丨静觅7 小时前
实用免费的 Short URL 短链接 API 对接说明
前端
崔庆才丨静觅7 小时前
5分钟快速搭建 AI 平台并用它赚钱!
前端
崔庆才丨静觅8 小时前
比官方便宜一半以上!Midjourney API 申请及使用
前端
Moment8 小时前
富文本编辑器在 AI 时代为什么这么受欢迎
前端·javascript·后端
崔庆才丨静觅8 小时前
刷屏全网的“nano-banana”API接入指南!0.1元/张量产高清创意图,开发者必藏
前端
剪刀石头布啊8 小时前
jwt介绍
前端
爱敲代码的小鱼8 小时前
AJAX(异步交互的技术来实现从服务端中获取数据):
前端·javascript·ajax
吹牛不交税9 小时前
admin.net-v2 框架使用笔记-netcore8.0/10.0版
vue.js·.netcore