I'm using an ArcGISTiledMapServiceLayer as baselayer in a ESRI API for JavaScript project. As a second layer I'm trying to add a WMTS Layer. Unfortunately the WMTS Layer will not be shown. If I use the same WMTS layer as baselayer it works fine. The ArcGISTiledMapServiceLayer and the WMTS Layer uses the same spatial reference but have different LODs/TileMatrixSets. Is it possible to use a WMTS Layer together with a ArcGISTiledMapServiceLayer?
Hey Urs,
what code are you using to add the WMTS layer?
Tim
<script>
var map;
require(["esri/map", "esri/layers/WMTSLayer", "dojo/domReady!"], function(Map, WMTSLayer) {
var extent = new esri.geometry.Extent(595171.7678435356, 200875.0317500635, 702328.2321564644, 294124.9682499365, new esri.SpatialReference({
"wkid": 21781
}));
map = new Map("map", {
//basemap: "topo",
//center: [7.537513, 47.208331], // longitude, latitude
// zoom: 13
extent: extent
});
esri.config.defaults.io.proxyUrl = "./proxy/PHP/proxy.php";
// esriConfig.defaults.io.alwaysUseProxy = false;
var layerinfo = new esri.layers.WMTSLayerInfo({
identifier: 'ch.swisstopo.pixelkarte-grau'
});
var options = {
id: 'swisstopo',
layerInfo: layerinfo
};
var wmts = new WMTSLayer("http://wmts.geo.admin.ch", options);
var luftbild = new esri.layers.ArcGISTiledMapServiceLayer("https://quality.ag.ch/geoportal/rest/services/base_ortho2013_full/MapServer", {
id: 'luftbild'
});
var giselan = new esri.layers.ArcGISDynamicMapServiceLayer("https://www.ag.ch/geoportal/rest/services/lwag_giselan_app/MapServer", {
id: 'giselan'
});
map.on("load", function(map){
//use as breakpoint for layer loaded
var i = 10;
});
map.addLayer(luftbild);
map.addLayer(wmts);
// map.addLayer(giselan);
});
</script>
Hi Urs,
Here is an sample to show you how to load WMTSLayer and ArcGISTiledMapServiceLayer together on mapview.
JS Bin - Collaborative JavaScript Debugging
In order to “bypass” proxy to execute a WMTSLayerGetCapbilities request, we need to