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);
Hi @AliMahdian, do you need to use the same spatial reference? It looks like you use 2:
tileMatrixSetId: "EPSG:900913"
and
wkid: 102100