-
Notifications
You must be signed in to change notification settings - Fork 346
Closed
Description
The ellipsoidal version of Mercator is used instead of spherical.
I was about to report this but just saw the fix in the latest version. However it still doesn't work for PROJJSON , nor for WKT or WKT2 if Web Mercator defined via proj4.defs, because checkMercator() doesn't get called in these cases. Function parse() needs fixing.
Something like the following should do it:
function parse(code) {
let out;
if (testObj(code)) { // its a string
if (testDef(code)) {
out = defs[code];
} else if (testWKT(code)) {
out = wkt(code);
var maybeProjStr = checkProjStr(out);
if (maybeProjStr) {
out = projStr(maybeProjStr);
}
} else if (testProj(code)) {
out = projStr(code);
}
} else { // its an object
out = ('projName' in code) ? code : wkt(code);
}
return out && checkMercator(out) ? defs['EPSG:3857'] : out;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels