L7 icon indicating copy to clipboard operation
L7 copied to clipboard

请问L7 Raster Layer对三种协议TMS,WMS,WMTS有没有坐标系统的限制

Open seanzhangbo opened this issue 1 year ago • 7 comments

问题描述

我在使用antv@L7 的Raster Layer 来实现离线地图的部署,不确定antv@L7对于三种协议TMS, WMS, WMTS是不是有坐标系统的限制?是不是都支持EPSG:3857 和 EPSG:4326? 如果有限制,请明确不同协议对不同坐标系统的支持情况,谢谢!

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

seanzhangbo avatar Dec 25 '24 02:12 seanzhangbo

hi @seanzhangbo, welcome!

github-actions[bot] avatar Dec 25 '24 02:12 github-actions[bot]

Hi @seanzhangbo, Please star this repo if you find it useful! Thanks :star:! 你好~ @seanzhangbo 🌟 如果这个仓库对你有帮助,可以给我们点个star支持一下~你的支持对我们来说是最大的鼓励,感谢你的支持与点赞 🌟

github-actions[bot] avatar Dec 25 '24 02:12 github-actions[bot]

根据我查找到的信息,antv L7 的 Raster Layer 支持多种地图协议,包括 TMS、WMS 和 WMTS。关于坐标系统的支持,通常情况下,EPSG:3857 和 EPSG:4326 是广泛支持的标准坐标系统。L7 作为一个灵活的地理空间数据可视化引擎,通常会支持这些常见的坐标系统。

然而,具体到每种协议的支持情况,可能会因为不同的实现和数据源而有所不同。为了确保在你的应用场景中能够正确使用这些协议和坐标系统,建议你在实际使用中进行测试,或者查看相关的文档和示例代码。

如果你有更多的具体问题或需要进一步的帮助,可以在 GitHub 的 L7 项目页面中查看相关的 issue 或者直接反馈你的问题。

🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

petercat-assistant[bot] avatar Dec 25 '24 02:12 petercat-assistant[bot]

有没有明确的文档可以查询? 自测的结论是WMS协议只支持EPSG:4356, 而WMTS 协议可以支持EPSG:3857,希望能给一个明确的结论,谢谢!

seanzhangbo avatar Dec 25 '24 02:12 seanzhangbo

有没有明确的文档可以查询? 自测的结论是WMS协议只支持EPSG:4356, 而WMTS 协议可以支持EPSG:3857,希望能给一个明确的结论,谢谢!

切片有写只支持3857

Image

joo1es avatar Feb 20 '25 05:02 joo1es

只支持3857

lvisei avatar May 06 '25 06:05 lvisei

getURLFromTemplate 支持传入自定义转换函数,入参有bounds ,自己转一下就行了

scene.on('loaded', () => {
  const layer = new RasterLayer()
    .source(url, {
      parser: {
        type: 'rasterTile',
        tileSize: 256,
        zoomOffset: 0,
        getURLFromTemplate: (url, { bounds }) => {
          const p1 = gcoord.transform(
            gcoord.transform(
              [bounds[0], bounds[1]],
              gcoord.GCJ02,
              gcoord.WGS84
            ),
            gcoord.WGS84,
            gcoord.EPSG3857
          );
          const p2 = gcoord.transform(
            gcoord.transform(
              [bounds[2], bounds[3]],
              gcoord.GCJ02,
              gcoord.WGS84
            ),
            gcoord.WGS84,
            gcoord.EPSG3857
          );
          return url.replace(/\{bbox\}/g, [...p1, ...p2].join(','));
        },
      },
    })
    .style({
      clampLow: false,
      clampHigh: false,
      domain: [0, 7000],
      rampColors: {
        colors: [
          '#d73027',
          '#fc8d59',
          '#fee08b',
          '#d9ef8b',
          '#91cf60',
          '#1a9850',
        ],
        positions: [0, 0.2, 0.4, 0.6, 0.8, 1.0],
      },
    });

  scene.addLayer(layer);
});

boborua avatar Nov 10 '25 17:11 boborua