简体   繁体   English

使用 WMS/WMTS 服务放大地图框时出错

[英]Error zooming in mapbox with WMS/WMTS service

I have a problem when trying to implement a WMS/WMTS service in mapbox.尝试在 mapbox 中实现 WMS/WMTS 服务时遇到问题。 I'm using java and android studio.我正在使用 java 和 android 工作室。 I managed to place the map in the right coordinates, but when I zoom in the tiles from the service duplicates and scatters on the map.我设法将 map 放置在正确的坐标中,但是当我放大服务中的图块时,map 上的图块重复和分散。 It also does not scale with the rest of the map as I zoom.当我缩放时,它也不能与 map 的 rest 一起缩放。 I first tried with WMS service, then tried with a WMTS service to se if that helped, but i get the same problem.我首先尝试使用 WMS 服务,然后尝试使用 WMTS 服务来确定是否有帮助,但我遇到了同样的问题。

It looks like I don't get the new tile from the WMS/WMTS and it just puts the same map on all the sub-tiles.看起来我没有从 WMS/WMTS 获得新的图块,它只是在所有子图块上放置了相同的 map。

My WMS link: https://wms.geonorge.no/skwms1/wms.sjokartraster2?&service=wms&version=1.3.0&request=GetMap&BBOX=-20026376.39,-20048966.10,20026376.39,20048966.10&transparent=true&width=512&height=512&layers=all&CRS=EPSG:3857&format=image/png My WMS link: https://wms.geonorge.no/skwms1/wms.sjokartraster2?&service=wms&version=1.3.0&request=GetMap&BBOX=-20026376.39,-20048966.10,20026376.39,20048966.10&transparent=true&width=512&height=512&layers=all&CRS=EPSG :3857&格式=图片/png

My WMTS link: https://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?service=WMTS&request=GetTile&layer=sjokartraster&style=default&tileMatrixSet=EPSG:3857&tileMatrix=EPSG:3857:0&format=image/png&TILECOL=0&TILEROW=0我的 WMTS 链接: https://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?service=WMTS&request=GetTile&layer=sjokartraster&style=default&tileMatrixSet=EPSG:3857&tileMatrix=EPSG:3857:0&format=ROW/png0&TILECOL=0&

I use this website to test my urls: http://trailbehind.github.io/TilejsonTester/我使用这个网站来测试我的网址: http://trailbehind.github.io/TilejsonTester/

[Image shows when I zoom. [图像显示当我放大。 Map of Norway shows four places in the world and does not get bigger ][1]挪威的Map显示世界四地并没有变大][1]

I think the problem is that you're specifying a bounding box with actual values in the URL, so you'll always get the same image.我认为问题在于您在 URL 中指定了一个具有实际值的边界框,因此您将始终获得相同的图像。 I've modified your URL to use a template for bbox, and it works for me in Mapbox: https://wms.geonorge.no/skwms1/wms.sjokartraster2?&service=wms&version=1.3.0&request=GetMap&bbox={bbox-epsg-3857}&transparent=true&width=512&height=512&layers=all&CRS=EPSG:3857&format=image/png我已经修改了您的 URL 以使用 bbox 模板,它在 Mapbox 中适用于我: https://wms.geonorge.no/skwms1/wms.sjokartraster2?&service=wms&version=1.3.0&request=GetMap&bbox={bbox-epsg-3857}&transparent=true&width=512&height=512&layers=all&CRS=EPSG:3857&format=image/png

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM