proper EPSG:4326 with 2x1 root, fixes #1207
This commit is contained in:
parent
ce79ea1e81
commit
00166b9c4f
@ -20,7 +20,7 @@
|
||||
var bluemarble = new L.TileLayer.WMS("http://maps.opengeo.org/geowebcache/service/wms", {
|
||||
layers: 'bluemarble',
|
||||
attribution: "Data © NASA Blue Marble, image service by OpenGeo",
|
||||
minZoom: 2,
|
||||
minZoom: 0,
|
||||
maxZoom: 5
|
||||
});
|
||||
|
||||
|
@ -70,9 +70,9 @@ describe("CRS.EPSG4326", function () {
|
||||
crsSize;
|
||||
for (i = 0; i <= 22; i++) {
|
||||
crsSize = crs.getSize(i);
|
||||
expect(crsSize.x).equal(worldSize);
|
||||
expect(crsSize.x).equal(worldSize * 2);
|
||||
// Lat bounds are half as high (-90/+90 compared to -180/+180)
|
||||
expect(crsSize.y).equal(worldSize / 2);
|
||||
expect(crsSize.y).equal(worldSize);
|
||||
worldSize *= 2;
|
||||
}
|
||||
});
|
||||
|
@ -10,5 +10,7 @@ L.CRS.EPSG3395 = L.extend({}, L.CRS, {
|
||||
scale = 0.5 / (Math.PI * r);
|
||||
|
||||
return new L.Transformation(scale, 0.5, -scale, 0.5);
|
||||
}())
|
||||
}()),
|
||||
|
||||
wrapLng: true
|
||||
});
|
||||
|
@ -6,5 +6,7 @@ L.CRS.EPSG4326 = L.extend({}, L.CRS, {
|
||||
code: 'EPSG:4326',
|
||||
|
||||
projection: L.Projection.LonLat,
|
||||
transformation: new L.Transformation(1 / 360, 0.5, -1 / 360, 0.5)
|
||||
transformation: new L.Transformation(1 / 180, 1, -1 / 180, 0.5),
|
||||
|
||||
wrapLng: true
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user