add yards and nautical miles to OpenLayers units. (Closes #1065)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5101 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -879,6 +879,7 @@ OpenLayers.Util.createUniqueID = function(prefix) {
|
|||||||
/**
|
/**
|
||||||
* Constant: INCHES_PER_UNIT
|
* Constant: INCHES_PER_UNIT
|
||||||
* {Object} Constant inches per unit -- borrowed from MapServer mapscale.c
|
* {Object} Constant inches per unit -- borrowed from MapServer mapscale.c
|
||||||
|
* derivation of nautical miles from http://en.wikipedia.org/wiki/Nautical_mile
|
||||||
*/
|
*/
|
||||||
OpenLayers.INCHES_PER_UNIT = {
|
OpenLayers.INCHES_PER_UNIT = {
|
||||||
'inches': 1.0,
|
'inches': 1.0,
|
||||||
@@ -886,10 +887,12 @@ OpenLayers.INCHES_PER_UNIT = {
|
|||||||
'mi': 63360.0,
|
'mi': 63360.0,
|
||||||
'm': 39.3701,
|
'm': 39.3701,
|
||||||
'km': 39370.1,
|
'km': 39370.1,
|
||||||
'dd': 4374754
|
'dd': 4374754,
|
||||||
|
'yd': 36
|
||||||
};
|
};
|
||||||
OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches;
|
OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches;
|
||||||
OpenLayers.INCHES_PER_UNIT["degrees"] = OpenLayers.INCHES_PER_UNIT.dd;
|
OpenLayers.INCHES_PER_UNIT["degrees"] = OpenLayers.INCHES_PER_UNIT.dd;
|
||||||
|
OpenLayers.INCHES_PER_UNIT["nmi"] = 1852 * OpenLayers.INCHES_PER_UNIT.m;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constant: DOTS_PER_INCH
|
* Constant: DOTS_PER_INCH
|
||||||
|
|||||||
Reference in New Issue
Block a user