From b4770906b32d98ee69ceb2479d13ed4cc0842b49 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Tue, 11 Dec 2012 20:18:54 +0200 Subject: [PATCH] tweak simple projection, add debug file --- debug/leaflet-include.js | 1 + debug/map/simple-proj.html | 44 ++++++++++++++++++++++++++++++++++++++ src/geo/crs/CRS.Simple.js | 6 +++++- 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 debug/map/simple-proj.html diff --git a/debug/leaflet-include.js b/debug/leaflet-include.js index 505e2779..1a9610a3 100644 --- a/debug/leaflet-include.js +++ b/debug/leaflet-include.js @@ -38,6 +38,7 @@ 'geo/crs/CRS.EPSG3857.js', 'geo/crs/CRS.EPSG4326.js', 'geo/crs/CRS.EPSG3395.js', + 'geo/crs/CRS.Simple.js', 'map/Map.js', diff --git a/debug/map/simple-proj.html b/debug/map/simple-proj.html new file mode 100644 index 00000000..d2d11e9a --- /dev/null +++ b/debug/map/simple-proj.html @@ -0,0 +1,44 @@ + + + + Leaflet debug page + + + + + + + + + + + + +
+ + + + diff --git a/src/geo/crs/CRS.Simple.js b/src/geo/crs/CRS.Simple.js index 5db96f43..b09dc6c2 100644 --- a/src/geo/crs/CRS.Simple.js +++ b/src/geo/crs/CRS.Simple.js @@ -1,5 +1,9 @@ L.CRS.Simple = L.extend({}, L.CRS, { projection: L.Projection.LonLat, - transformation: new L.Transformation(1, 0, 1, 0) + transformation: new L.Transformation(1, 0, -1, 0), + + scale: function (zoom) { + return Math.pow(2, zoom); + } });