【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)
  })
}
相关推荐
wordbaby5 小时前
一次微信小程序 `web-view` 跳转原生页回跳后 H5 白屏的排查与修复(Hash 路由污染)
前端
用户721880438355 小时前
密码骰子:结合AIUI在眼镜上生成一串16位密码
前端
江华森5 小时前
全链路可观测落地记:kube-prometheus-stack 在 K3s 上的 8 个坑与一整套修复脚本
前端
用户84298142418105 小时前
从 JavaScript 到可运行的字节码 - ByteJS 使用指南
javascript
deli0075 小时前
27 寸 4K 开 125% 为什么发虚?PPI 和缩放一次算清
前端
OpenTiny社区5 小时前
AI Agent场景组件库 TinyRobot v1.0 正式发布:一站式打造您的AI助手
vue.js·github
广州华水科技5 小时前
当大坝面临风险时,如何有效实施单北斗GNSS变形监测?
前端
学以智用6 小时前
wangEditor V5 精简完整参考手册
javascript
AiMan6 小时前
Poe还是不可以导出左侧所有对话,只能单条内容导出,方法不对吗
前端
用户298698530147 小时前
React 前端实现 Excel 与 CSV 互转:基于 WebAssembly 的浏览器端方案
javascript·react.js·excel