Take the 'us' and 'nautical' units into account
When converting pointResolution from degrees to meters
This commit is contained in:
@@ -213,7 +213,9 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
|
||||
var units = this.getUnits();
|
||||
if (projectionUnits == ol.proj.Units.DEGREES &&
|
||||
(units == ol.control.ScaleLineUnits.METRIC ||
|
||||
units == ol.control.ScaleLineUnits.IMPERIAL)) {
|
||||
units == ol.control.ScaleLineUnits.IMPERIAL ||
|
||||
units == ol.control.ScaleLineUnits.US ||
|
||||
units == ol.control.ScaleLineUnits.NAUTICAL)) {
|
||||
|
||||
// Convert pointResolution from degrees to meters
|
||||
this.toEPSG4326_ = null;
|
||||
@@ -244,7 +246,9 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
|
||||
|
||||
goog.asserts.assert(
|
||||
((units == ol.control.ScaleLineUnits.METRIC ||
|
||||
units == ol.control.ScaleLineUnits.IMPERIAL) &&
|
||||
units == ol.control.ScaleLineUnits.IMPERIAL ||
|
||||
units == ol.control.ScaleLineUnits.US ||
|
||||
units == ol.control.ScaleLineUnits.NAUTICAL) &&
|
||||
projectionUnits == ol.proj.Units.METERS) ||
|
||||
(units == ol.control.ScaleLineUnits.DEGREES &&
|
||||
projectionUnits == ol.proj.Units.DEGREES));
|
||||
|
||||
Reference in New Issue
Block a user