aboutsummaryrefslogtreecommitdiffstats
path: root/extlib/leaflet/src/geo/crs/CRS.EPSG3857.js
diff options
context:
space:
mode:
authorAditi <aditi.iitr@gmail.com>2013-06-21 23:09:22 +0530
committerAditi <aditi.iitr@gmail.com>2013-06-21 23:09:22 +0530
commit2719d546a57c2332e36cc056ac80ec5d79672c1a (patch)
tree1f62ab8f761026d4faa5442032df133fc90d47f2 /extlib/leaflet/src/geo/crs/CRS.EPSG3857.js
parent1a6f065419290b3f4234ce4a89bb2c46b13e8a12 (diff)
parent92b22e7deac547835f69168f97012b52e87b6de4 (diff)
downloadmediagoblin-2719d546a57c2332e36cc056ac80ec5d79672c1a.tar.lz
mediagoblin-2719d546a57c2332e36cc056ac80ec5d79672c1a.tar.xz
mediagoblin-2719d546a57c2332e36cc056ac80ec5d79672c1a.zip
Merge remote-tracking branch 'cweb/master'
Diffstat (limited to 'extlib/leaflet/src/geo/crs/CRS.EPSG3857.js')
-rw-r--r--extlib/leaflet/src/geo/crs/CRS.EPSG3857.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/extlib/leaflet/src/geo/crs/CRS.EPSG3857.js b/extlib/leaflet/src/geo/crs/CRS.EPSG3857.js
new file mode 100644
index 00000000..cbdbd03a
--- /dev/null
+++ b/extlib/leaflet/src/geo/crs/CRS.EPSG3857.js
@@ -0,0 +1,17 @@
+
+L.CRS.EPSG3857 = L.Util.extend({}, L.CRS, {
+ code: 'EPSG:3857',
+
+ projection: L.Projection.SphericalMercator,
+ transformation: new L.Transformation(0.5/Math.PI, 0.5, -0.5/Math.PI, 0.5),
+
+ project: function(/*LatLng*/ latlng)/*-> Point*/ {
+ var projectedPoint = this.projection.project(latlng),
+ earthRadius = 6378137;
+ return projectedPoint.multiplyBy(earthRadius);
+ }
+});
+
+L.CRS.EPSG900913 = L.Util.extend({}, L.CRS.EPSG3857, {
+ code: 'EPSG:900913'
+}); \ No newline at end of file