Merge pull request #4234 from tbarsballe/ogcwkt-proj4

Support OGC WKT proj4 def.units and def.to_meter
This commit is contained in:
Andreas Hocevar
2015-10-07 20:59:00 +02:00
3 changed files with 30 additions and 3 deletions

View File

@@ -153,8 +153,9 @@ ol.proj.Projection = function(options) {
}
if (options.units === undefined) {
var units = def.units;
if (units === undefined) {
if (def.to_meter !== undefined) {
if (def.to_meter !== undefined) {
if (units === undefined ||
ol.proj.METERS_PER_UNIT[units] === undefined) {
units = def.to_meter.toString();
ol.proj.METERS_PER_UNIT[units] = def.to_meter;
}