[Mapbender-commits] r6582 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jul 7 12:56:18 EDT 2010


Author: kmq
Date: 2010-07-07 16:56:18 +0000 (Wed, 07 Jul 2010)
New Revision: 6582

Modified:
   trunk/mapbender/http/plugins/mb_digitize_geometry.js
Log:
allow selecting the extent

Modified: trunk/mapbender/http/plugins/mb_digitize_geometry.js
===================================================================
--- trunk/mapbender/http/plugins/mb_digitize_geometry.js	2010-07-07 14:23:21 UTC (rev 6581)
+++ trunk/mapbender/http/plugins/mb_digitize_geometry.js	2010-07-07 16:56:18 UTC (rev 6582)
@@ -248,7 +248,7 @@
 	};
 	
 	var correctGeometryType = function (str) {
-		if (str === "rectangle") {
+		if (str === "rectangle" || str === "extent") {
 			return Mapbender.geometryType.polygon;
 		}
 		return str;
@@ -280,10 +280,11 @@
 				if(points === undefined) {
 					return;
 				}
-				featureCollection.getGeometry(-1, -1).updatePointAtIndex(points[0], 0);
+				featureCollection.getGeometry(-1, -1).addPoint(points[0]);
 				featureCollection.getGeometry(-1, -1).addPoint(points[1]);
 				featureCollection.getGeometry(-1, -1).addPoint(points[2]);
 				featureCollection.getGeometry(-1, -1).addPoint(points[3]);
+				featureCollection.getGeometry(-1, -1).addPoint(points[0]);
 				button.stop();
 				
 			}



More information about the Mapbender_commits mailing list