【Mars3d】使用WmtsLayer的时候TileMatrix没有带到TileMatrixset的前缀map_4326_16这种参数

问题:

1.【Mars3d】使用WmtsLayer的时候TileMatrix没有带到TileMatrixset的前缀map_4326_16这种参数。

示例中的WmtsLayer的配置代码:

  // 方式2:在创建地球后调用addLayer添加图层(直接new对应type类型的图层类)

  tileLayer = new mars3d.layer.WmtsLayer({

    url: "//server.mars3d.cn/geoserver/gwc/service/wmts",

    layer: "mars:hfgh",

    format: "image/png",

    tileMatrixSetID: "EPSG:4326",

    crs: "EPSG:4326",

    alpha: 0.8,

    pickFeaturesUrl: "//server.mars3d.cn/geoserver/mars/wms",

    popup: "all",

    highlight: {

      type: "wallP",

      diffHeight: 100,

      materialType: mars3d.MaterialType.LineFlow,

      materialOptions: {

        image: "img/textures/fence.png",

        color: "#ffff00",

        speed: 10, // 速度,建议取值范围1-100

        axisY: true

      }

    },

    flyTo: true

  })

  map.addLayer(tileLayer)

我自己的wmtsLayer的代码:

结果:

1.正常的示例中的geoserver可以正常预览的页面F12请求的瓦片参数:

2.自己的wmts服务测试的请求的瓦片参数没有带到TileMatrixset的前缀map_4326_16这种参数:

3.正常的预览参数就是这个TileMatrix的层级加上TileMatrixset的前缀就可以实现正常请求,但是自己的服务没有这个请求。

解决方案:

1.尝试tileMatrixLabels参数

2.tileMatrixLabels参数的用法:

  tileMatrixLabels: [...Array(20).keys()].map((level) => (" map_4326_16" + level).toString()),

最近更新

  1. TCP协议是安全的吗?

    2023-12-21 15:50:02       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-21 15:50:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-21 15:50:02       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-21 15:50:02       20 阅读

热门阅读

  1. redis 缓存穿透、击穿、雪崩、无底洞分析及解决

    2023-12-21 15:50:02       42 阅读
  2. HiveServer2

    2023-12-21 15:50:02       39 阅读
  3. redis cluster集群定时备份

    2023-12-21 15:50:02       33 阅读
  4. 开源键盘工程QMK

    2023-12-21 15:50:02       38 阅读
  5. Golang实践录:gin绑定解析json的两种方法

    2023-12-21 15:50:02       32 阅读
  6. 设计模式-访问模式

    2023-12-21 15:50:02       33 阅读
  7. html 内外边距区别以及解释

    2023-12-21 15:50:02       36 阅读
  8. 武汉大学:如何应对来自邮件的APT攻击?

    2023-12-21 15:50:02       33 阅读
  9. SQL面试题挑战02:同时最大在线人数问题

    2023-12-21 15:50:02       39 阅读