Skip to content

Commit

Permalink
Update according to Lantmäteriet's new URLs etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
perliedman committed Sep 15, 2016
1 parent 0a2a65b commit e1082b3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/wmts/script.js
@@ -1,12 +1,16 @@
/*
Example using Sweden Lantmäteriet Topografisk Webbkarta
http://www.lantmateriet.se/globalassets/kartor-och-geografisk-information/geodatatjanster/tekn_beskrivningar/tb_twkvisningvccby_v1.0.pdf
https://opendata.lantmateriet.se/#apis
*/

/*** INSERT YOUR LANTMÄTERIET API TOKEN BELOW ***/
var token = '';

var crs = new L.Proj.CRS('EPSG:3006',
'+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
{
resolutions: [
4096, 2048, 1024, 512, 256, 128,64, 32
4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8
],
origin: [-1200000.000000, 8500000.000000 ],
bounds: L.bounds( [-1200000.000000, 8500000.000000], [4305696.000000, 2994304.000000])
Expand All @@ -16,8 +20,8 @@ var crs = new L.Proj.CRS('EPSG:3006',
continuousWorld: true,
});

new L.TileLayer('http://maps-open.lantmateriet.se/open/topowebb-ccby/v1/wmts/1.0.0/topowebb/default/3006/{z}/{y}/{x}.png', {
maxZoom: 7,
new L.TileLayer('https://api.lantmateriet.se/open/topowebb-ccby/v1/wmts/token/'+ token +'/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=topowebb&STYLE=default&TILEMATRIXSET=3006&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image%2Fpng', {
maxZoom: 9,
minZoom: 0,
continuousWorld: true,
attribution: '&copy; <a href="http://www.lantmateriet.se/en/">Lantmäteriet</a> Topografisk Webbkarta Visning, CCB',
Expand Down

0 comments on commit e1082b3

Please sign in to comment.