[OpenLayers-Commits] r5101 - trunk/openlayers/lib/OpenLayers

commits at openlayers.org commits at openlayers.org
Thu Nov 1 22:20:26 EDT 2007


Author: crschmidt
Date: 2007-11-01 22:20:25 -0400 (Thu, 01 Nov 2007)
New Revision: 5101

Modified:
   trunk/openlayers/lib/OpenLayers/Util.js
Log:
add yards and nautical miles to OpenLayers units. (Closes #1065)


Modified: trunk/openlayers/lib/OpenLayers/Util.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Util.js	2007-11-02 02:16:44 UTC (rev 5100)
+++ trunk/openlayers/lib/OpenLayers/Util.js	2007-11-02 02:20:25 UTC (rev 5101)
@@ -879,6 +879,7 @@
 /**
  * Constant: INCHES_PER_UNIT
  * {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 = { 
     'inches': 1.0,
@@ -886,10 +887,12 @@
     'mi': 63360.0,
     'm': 39.3701,
     'km': 39370.1,
-    'dd': 4374754
+    'dd': 4374754,
+    'yd': 36
 };
 OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches;
 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



More information about the Commits mailing list