[Mapbender-commits] r5176 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sat Dec 12 08:27:46 EST 2009


Author: christoph
Date: 2009-12-12 08:27:46 -0500 (Sat, 12 Dec 2009)
New Revision: 5176

Modified:
   trunk/mapbender/http/javascripts/map_obj.js
Log:


Modified: trunk/mapbender/http/javascripts/map_obj.js
===================================================================
--- trunk/mapbender/http/javascripts/map_obj.js	2009-12-12 13:27:17 UTC (rev 5175)
+++ trunk/mapbender/http/javascripts/map_obj.js	2009-12-12 13:27:46 UTC (rev 5176)
@@ -681,8 +681,13 @@
     /**
      * Convert real world coordinates to pixel coordinates
      */
-    this.convertRealToPixel = function(aPoint){
-        var arrayBBox = this.extent.toString().split(",");
+    this.convertRealToPixel = function(aPoint, referenceExtent){
+    	if (arguments.length === 2) {
+    		var arrayBBox = referenceExtent.toString().split(",");
+    	}
+    	else {
+	        var arrayBBox = this.getExtent().split(",");
+    	}
         var minX = parseFloat(arrayBBox[0]);
         var minY = parseFloat(arrayBBox[1]);
         var maxX = parseFloat(arrayBBox[2]);



More information about the Mapbender_commits mailing list