【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)
  })
}
相关推荐
摆烂老大22 分钟前
SWAT| 水文 | SWAT模型(三):土壤数据库制备
arcgis·水文·swat模型
110546540132 分钟前
11、参数化三维产品设计组件 - /设计与仿真组件/parametric-3d-product-design
前端·3d
爱笑的林羽37 分钟前
Mac M系列 安装 jadx-gui
前端·macos
运维@小兵43 分钟前
vue使用路由技术实现登录成功后跳转到首页
前端·javascript·vue.js
肠胃炎1 小时前
React构建组件
前端·javascript·react.js
邝邝邝邝丹1 小时前
React学习———React.memo、useMemo和useCallback
javascript·学习·react.js
酷爱码1 小时前
HTML5表格语法格式详解
前端·html·html5
hello_ejb31 小时前
聊聊JetCache的缓存构建
java·前端·缓存
堕落年代1 小时前
SpringSecurity当中的CSRF防范详解
前端·springboot·csrf
美酒没故事°1 小时前
纯css实现蜂窝效果
前端·javascript·css