Select to view content in your preferred language

The tiling scheme of a WMTS layer is incompatible with the tiling scheme of the surface

101
1
2 weeks ago
AliMahdian
New Contributor

I want to add a WMTS layer to a SceneView, but I encounter the following error when adding the layer to the map. Can anyone assist me?
"The tiling scheme of this layer is incompatible with the tiling scheme of the surface"

const wmtsLayer = new WMTSLayer({
        url: "http://localhost:8080/geoserver/gwc/service/wmts",
        activeLayer: {
            id: "orthoLayer",
            tileMatrixSetId: "EPSG:900913"
        },
        spatialReference: {
            wkid: 102100
        },
        customLayerParameters: {
            VERSION: '1.1.1',
            FORMAT: 'image/png',
            TRANSPARENT: true,
            // SRS: 'EPSG:3857'
        }
    });


    const osmLayer = new WebTileLayer({
            urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
        });
    osmLayer.load().then(function() {
        console.log("OSM Tile Info (example for Web Mercator comparison):", osmLayer.tileInfo.toJSON());
    });

    map.add(osmLayer);
    map.add(wmtsLayer);

 

Tags (2)
0 Kudos
1 Reply
Noah-Sager
Esri Regular Contributor

Hi @AliMahdian, do you need to use the same spatial reference? It looks like you use 2:

tileMatrixSetId: "EPSG:900913"

 and

wkid: 102100

 

https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-WMTSSublayer.html#...

 

0 Kudos