# Perspective map component - wms settings

**URL:** <https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [July 30, 2020, 4:29pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226 "2020-07-30T16:29:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [July 30, 2020, 4:29pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/1 "2020-07-30T16:29:19Z")

</div>

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](https://geoservices.ign.fr/documentation/utilisation_web/wmts-leaflet.html)

```auto
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:

```auto
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}

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/8/b81871f4969da7d6e98eeb7d32d553c51d62ead5.png)

_**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 ???**_

---

<div class="post-metadata">

**Author:** ![jball](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jball/32/11128_2.png) [@jball](https://forum.inductiveautomation.com/u/jball)\
**Post date:** [July 31, 2020, 4:12pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/2 "2020-07-31T16:12:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [July 31, 2020, 4:26pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/3 "2020-07-31T16:26:01Z")

</div>

in the browser console, I have the following error:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/e/4ed9a95f0e83454a0ca348c2c47c4dd47e4067fe.png)

```auto
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:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/3/23abba5cf5848a74e779e38a1b9707ba58c3526c.png)

Any idea ?

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [July 31, 2020, 4:32pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/4 "2020-07-31T16:32:13Z")

</div>

In the leaftlef example provided there is

```auto
attribution : "IGN-F/Geoportail",

```

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

---

<div class="post-metadata">

**Author:** ![jball](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jball/32/11128_2.png) [@jball](https://forum.inductiveautomation.com/u/jball)\
**Post date:** [July 31, 2020, 7:34pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/5 "2020-07-31T19:34:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [July 31, 2020, 8:07pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/6 "2020-07-31T20:07:22Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/9/69ffa82715d0e4da90ebc0a7f3b28c473c2df89b.png)

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

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/f/ff0aa4573146f5fc019ff6919ec02c384eae2741.png)

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

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [July 31, 2020, 8:15pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/7 "2020-07-31T20:15:10Z")

</div>

Hi @mazeyrat

playing around with your url i got this to work:

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

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/5/b50cb0805be347ca6dd90ce8c9acfae62211afd9.png)

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

---

<div class="post-metadata">

**Author:** ![jball](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jball/32/11128_2.png) [@jball](https://forum.inductiveautomation.com/u/jball)\
**Post date:** [August 24, 2020, 9:07pm UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/8 "2020-08-24T21:07:36Z")

</div>

The map component is built to work with the [Leaflet providers](https://leaflet-extras.github.io/leaflet-providers/preview/). 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](https://leaflet-extras.github.io/leaflet-providers/preview/#filter=OpenStreetMap.France) 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:

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

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/9/d9ba80a51261088b811788950605d2e0e9bb74fc.jpeg)

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [August 25, 2020, 7:08am UTC](https://forum.inductiveautomation.com/t/perspective-map-component-wms-settings/37226/9 "2020-08-25T07:08:29Z")

</div>

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](https://leafletjs.com/examples/wms/wms.html)
