From 1cccb29a3b9008a40ebea695079f8f45d65c45e8 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Fri, 2 Nov 2007 02:20:25 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Util.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 121d99f769..25f11e2106 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -879,6 +879,7 @@ OpenLayers.Util.createUniqueID = function(prefix) { /** * 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 @@ OpenLayers.INCHES_PER_UNIT = { '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