Hi Brice
I’m using the ArcGIS API for Javascript 4.24 and the WMTSLayer-Constructor:
https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-WMTSLayer.html#version
wmts_url_bgdi = "https://wmts.geo.admin.ch/EPSG/2056";
wmts_constructor = function (wmts_url, wmts_id, wmts_title, wmts_copyright, wmts_visibility) {
// creating wmts layer
const wmts = new WMTSLayer({});
// parameters as keys to this object
wmts.url = wmts_url;
wmts.activeLayer = {id: wmts_id};
wmts.title = wmts_title;
wmts.copyright = wmts_copyright;
wmts.visible = wmts_visibility;
return wmts;
};
const LK_farbig = wmts_constructor_for_basemap(wmts_url_bgdi, "ch.swisstopo.pixelkarte-farbe", "PK farbig", "swisstopo", true);
The correct url seems to be: "https://wmts.geo.admin.ch/EPSG/2056". Not working urls are "https://wmts.geo.admin.ch" and "https://wmts.geo.admin.ch/EPSG/2056/1.0.0/WMTSCapabilities.xml".
A few weeks ago, "https://wmts.geo.admin.ch/EPSG/2056/1.0.0/WMTSCapabilities.xml" worked fine. I got this url from here: https://www.geo.admin.ch/de/geo-dienstleistungen/geodienste/darstellungsdienste-webmapping-webgis-anwendungen/web-map-tiling-services-wmts.html
When I’m using "https://wmts.geo.admin.ch" it now returns the coordinates in EPSG2056. (Yesterday, I really got EPSG21781)
Sooo, sorry for the inconvenience. You can consider this question as “answered”.
Best
Nadja
--
You received this message because you are subscribed to a topic in the Google Groups "GeoAdminCh API" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/geoadmin-api/_5RQkHhpjyw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
geoadmin-api...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/geoadmin-api/5f20b906-164a-485d-a6ae-f21cb08e82d0n%40googlegroups.com.