new ol.layer.Tile({
source: new ol.source.WMTS({
attributions: [new ol.Attribution({
html: '© ' +
'<a href="http://www.geo.admin.ch/internet/geoportal/' +
'en/home.html">' +
'Pixelmap / geo.admin.ch</a>'
})],
urls: ['http://wmts0.geo.admin.ch/',
'http://wmts1.geo.admin.ch/',
'http://wmts2.geo.admin.ch/',
'http://wmts3.geo.admin.ch/',
'http://wmts4.geo.admin.ch/'],
layer: 'ch.swisstopo.pixelkarte-farbe',
matrixSet: 'EPSG:21781',
format: 'image/jpeg',
opacity: 1.0,
crossOrigin: 'anonymous',
requestEncoding: "REST",
version: '1.0.0',
dimensions: ['TIME'],
params: {'time': '20111206'}, // wird ohne Fehlermeldung akzeptiert, obwohl dieser parameter eigentlich nur in OL2 existierte
projection: projection,
tileGrid: new ol.tilegrid.WMTS({
origin: [420000, 30000],
resolutions: [4000, 3750, 3500, 3250, 3000, 2750, 2500, 2250, 2000, 1750, 1500, 1250, 1000, 750, 650, 500, 250, 100, 50, 20, 10, 5, 2.5, 2, 1.5, 1, 0.5],
matrixIds: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
}),
style: 'default'
})
})
'http://wmts{5-9}.geo.admin.ch/1.0.0/{Layer}/default/'+ timestamp + '/21781/' + '{TileMatrix}/{TileRow}/{TileCol}.jpeg'
--
You received this message because you are subscribed to the Google Groups "GeoAdmin API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
you can also have a look at Geoadmin source code to see how you have to use the parameter dimensions in ol.Source.WMTS
https://github.com/geoadmin/mf-geoadmin3/blob/master/src/components/map/MapService.js
I would like to point out the fact that "pixelkarte" is freely available on localhost, but you ll need to create a WMTS account at Swisstopo if you want to deploy your solution in production.
http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/services/web_services/webaccess.html
Best Regards,
Loïc Gasser
Hello Björn,No, I think this is the right place to ask this question.The key for REST request is to provide a template to build the tile request, which in this case will be somehting like:'http://wmts{5-9}.geo.admin.ch/1.0.0/{Layer}/default/'+ timestamp + '/21781/' + '{TileMatrix}/{TileRow}/{TileCol}.jpeg'The 'TileMatrixSet' is always '21781' in our case.Here is a codepen example. It uses OL3 provided by the geo.admin.ch API, but it's pure OL3, and it uses the latest available timestamp, as you may recognise the new map signature for the Aarau area:To find out the latest available timestamps, look at the WMTS GetCapabilities document:
--
You received this message because you are subscribed to the Google Groups "GeoAdmin API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
We did not currently have the default keywords 'default' or 'current', as defined in the WMTS standard. You have to use an actual value for timestamp.
OpenLayers 3 is able to parse the WMTS GetCapabilities document
--
You received this message because you are subscribed to the Google Groups "GeoAdmin API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geoadmin-api...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.