Hello,
you have to set a
maxZoom, the max zoom level the WMTS server is serving. See the WMTS GetCapabilities (
https://wmts.geo.admin.ch/EPSG/3857/1.0.0/WMTSCapabilities.xml), for instance it is 21 for the orthophotos (
ch.swisstopo.swissimage). And use
current as timestamp (or anything specified in the
Dimension of the above mentioned document)
var OrthophotoType = new google.maps.ImageMapType({
maxZoom: 21,
minZoom: 7,
name: "Orthophoto",
tileSize: new google.maps.Size(256, 256),
credit: 'swisstopo',
getTileUrl: function(coord, zoom) {
return BASE_URL + '/1.0.0/ch.swisstopo.swissimage/default/current/3857/'+ zoom + "/" + coord.x + "/" + coord.y + ".jpeg";
}
});
Regards,
Marc