0
votes

I have a problem when trying to implement a WMS/WMTS service in mapbox. I'm using java and android studio. 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. It also does not scale with the rest of the map as I zoom. I first tried with WMS service, then tried with a WMTS service to se if that helped, but i get the same problem.

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.

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 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

I use this website to test my urls: 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]

1

1 Answers

0
votes

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. 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