Perspective map component - wms settings

Hi @jball,

I try to use the map viewer component for perspective with a french wms.
Settings for leaflet are provided here:

https://geoservices.ign.fr/documentation/utilisation_web/wmts-leaflet.html

L.tileLayer(
        "https://wxs.ign.fr/CLEF/geoportail/wmts?" +
        "&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0" +
        "&STYLE=normal" +
        "&TILEMATRIXSET=PM" +
        "&FORMAT=image/jpeg"+
        "&LAYER=ORTHOIMAGERY.ORTHOPHOTOS"+
	"&TILEMATRIX={z}" +
        "&TILEROW={y}" +
        "&TILECOL={x}",
	{
		minZoom : 0,
		maxZoom : 18,
                attribution : "IGN-F/Geoportail",
		tileSize : 256 // les tuiles du Géooportail font 256x256px
	}
).addTo(lmap) ;

For test purpose, CLEF, the key can be replaced by “pratique” in the url.

I’ve tried for layers/raster/tile/0/url:

https://wxs.ign.fr/pratique/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}

the tiles are not displayed, and I don’t have any error in the designer.
is there other parameters for the WMS object ? or for urlTemplateParames ???

Are you seeing any errors in your browser console if you view that in a session?

in the browser console, I have the following error:

GET https://wxs.ign.fr/pratique/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&TILEMATRIX=13&TILEROW=2822&TILECOL=4147&service=WMS&request=GetMap&layers=&styles=&format=image%2Fjpeg&transparent=false&version=1.1.1&width=256&height=256&srs=EPSG%3A3857&bbox=249490.46032281534,6227477.568449881,254382.43013306663,6232369.538260134

if I try manually the fisrt request in chrome, the code returned:

Any idea ?

In the leaftlef example provided there is

attribution : "IGN-F/Geoportail",

I don’t know where this parameter can be set in the map component in Ignition ?

You could expand one of those console errors and see if there is any more info to help point to the exact source of the error, but it looks like bad parameter data. The request to that web service must be malformed somewhere. Can you find a working example of a request to that service?

some parameters are present in lower and upercase in the request ???

image

@jball for a valid example: see next post from @Matthew.gaitan

Hi @mazeyrat

playing around with your url i got this to work:

https://wxs.ign.fr/pratique/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&TILEMATRIX=13&TILEROW=2822&TILECOL=4147&layers=&styles=&format=image%2Fjpeg&transparent=false&version=1.1.1&width=256&height=256&srs=EPSG%3A3857&bbox=249490.46032281534,6227477.568449881,254382.43013306663,6232369.538260134

I wasn’t able to get it work in the Perspective Map though

2 Likes

The map component is built to work with the Leaflet providers. I don’t think you’re going to have any luck wiring up the wxs.ign map. The good news is that there is a Leaflet French provider that will work in place of the example provider that is configured by default in the component. You can swap out the layers.raster.tile[0].url value for this:

https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png

1 Like

WMS and WMTS are very different things.

WMS (Web Map Service) is very versatile and allows things like different styles, different coordinate reference systems, and can even serve vector data. As a result, it’s hard to implement.

TMS (Time Map Service) on the other hand is a very simple take on it. It just offers tiles in a fixed projection (usually mercator) using a simple URI scheme with tile numbers and zoom levels.

WMTS (Web Map Tile Service) is a combination between the two. It has features to define different styles, but in the end, it’s just a set of TMS URI’s with properties. So from a WMTS, it’s easy to extract the TMS (even manually, by looking at the XML, as explained in the article you link), and render it as TMS.

https://leafletjs.com/examples/wms/wms.html