Sha256: 66cf7b19abb77c18b442a5684f906d3bcecb82c8436e35fc0ad26e6a84cc8e2b

Contents?: true

Size: 599 Bytes

Versions: 9

Compression:

Stored size: 599 Bytes

Contents

/*
 * L.CRS.EPSG3857 (Spherical Mercator) is the most common CRS for web mapping
 * and is used by Leaflet by default.
 */

L.CRS.EPSG3857 = L.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.extend({}, L.CRS.EPSG3857, {
	code: 'EPSG:900913'
});

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
leaflet-js-0.7.9 vendor/assets/Leaflet/src/geo/crs/CRS.EPSG3857.js
leaflet-js-0.7.8 vendor/assets/Leaflet/src/geo/crs/CRS.EPSG3857.js
leaflet-js-0.7.7 vendor/assets/Leaflet/src/geo/crs/CRS.EPSG3857.js
leaflet-js-0.7.0.4 lib/leaflet/src/geo/crs/CRS.EPSG3857.js
leaflet-js-0.7.0.3 lib/leaflet/src/geo/crs/CRS.EPSG3857.js
leaflet-js-0.7.0.2 lib/leaflet/src/geo/crs/CRS.EPSG3857.js
leaflet-js-0.7.0.1 lib/leaflet/src/geo/crs/CRS.EPSG3857.js
leaflet-js-0.7.0 lib/leaflet/src/geo/crs/CRS.EPSG3857.js
leaflet-js-0.6.beta4 lib/leaflet/src/geo/crs/CRS.EPSG3857.js