Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to start using Leaflet instead of OpenLayers, but I can't find a way to load WMTS layer into the map. Is that possible with Leaflet, or do I have to stick with OL? I haven't found anything related to this topic.

share|improve this question
add comment

1 Answer

Technically wmts could be use as a tilelayer, but will have to figure out your Tiling structure. A constructor for a layer could look something like this:

 L.tileLayer('<ServiceRoot>?SERVICE=WMTS&REQUEST=GetTile&VERSION=[version]&Layer=[layername]&Format=image/png&TileMatrixSet[MatrixsetName]=&TileMatrix={z}&TileRow={x}&TileCol={y}').addTo(map);
share|improve this answer
    
Hi, thanks for a hint, I've tried var zm = L.tileLayer('http://geoportal-zm0.cuzk.cz/WMTS_ZM/service.svc/get?SERVICE=WMTS&R‌​EQUEST=GetTile&VERSION=1.0.0&Layer=zm&TileMatrixSet=openlayerssphericalmercator:e‌​psg:900913&TILEMATRIX={z}&TILEROW={x}&TILECOL={y}&FORMAT=image/png'); with no success. No request is being sent to the server. But if I visit wmts directly, it works. –  zimmi Jan 15 '13 at 13:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.