Created
January 26, 2015 19:33
-
-
Save samuelschumacher/2a3521e4bbc0b2f7ae46 to your computer and use it in GitHub Desktop.
Custom Tile zooms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Set your zoom levels. These are often arbitrary. | |
var res = [2145.796291592583, | |
1609.3472186944375, | |
1072.8981457962916, | |
536.4490728981458, | |
268.2245364490729, | |
134.11226822453645, | |
67.05613411226823, | |
33.52806705613411, | |
25.146050292100586, | |
16.764033528067056, | |
12.57302514210503, | |
8.382016764033528, | |
6.286512480251461, | |
4.191008382016764, | |
2.095504191008382, | |
1.047752095504191, | |
0.5238760477520955, | |
0.26193802387604775, | |
0.13096901193802388]; | |
//Then set your coordinate system. if they are TMS as mine were, use L.Proj.CRS.TMS, if not, I think just L.Proj.CRS. You need the Proj4 and Proj4Leaflet libraries for this. | |
var RD2 = new L.Proj.CRS.TMS(//Are we sure these are TMS? The outside members of the bounds array below VVVVVV VVVVVVV are acting more like the tileset origin | |
'EPSG:3071', | |
'+proj=tmerc +lat_0=0 +lon_0=-90 +k=0.9996 +x_0=520000 +y_0=-4480000 +ellps=GRS80 +units=m +no_defs', [-10000, 100000, 1742204.00052973, 1050000], | |
{ | |
transformation: new L.Transformation(1,0,-1,0), | |
resolutions: res | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment