WMTS from IGN Geoportail is not working

172
0
07-06-2021 01:20 AM
abaIDSystemes
New Contributor

Hi, I'm trying to connect to connect to WMTS server from IGN Geoportail Server (French Institute of Geographic and Forest Information) on my Angular project. Here my code :

 

    const layerWMTS = new WMTSLayer({
            url: "https://wxs.ign.fr/pratique/geoportail/wmts",
            activeLayer: 
              {
                id: "ORTHOIMAGERY.ORTHOPHOTOS",
                tileMatrixSetId : "PM"
              },
            serviceMode: "KVP"
          });
      
         
    const map = new Map({
      basemap: {
        baseLayers: [layerWMTS],
        spatialReference: {
          wkid: 3857
        }
      }
    });

    const view = new MapView({
      container,
      map: map,

      spatialReference: {wkid : 3857},
      center : [260516,6246918],
      zoom : 10
    });

 

I have nothing on my screen. When I zoom off many times, I find the map at the bottom. It works fine with OpenLayers and QGIS.

Moreover, I regrest that tileMatrixSet property from activeLayer is not editable.

Tags (1)
0 Kudos
0 Replies