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 committed 2015-10-07 20:59:00 +02:00
commit 7c5bec260b
3 files changed
+30 -3

No files matched your search

+3 -2
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;
}