[Mapbender-commits] r4656 - branches/2.6/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Sep 18 05:34:59 EDT 2009


Author: christoph
Date: 2009-09-18 05:34:59 -0400 (Fri, 18 Sep 2009)
New Revision: 4656

Modified:
   branches/2.6/http/javascripts/geometry.js
Log:
* added MultiPoint support

Modified: branches/2.6/http/javascripts/geometry.js
===================================================================
--- branches/2.6/http/javascripts/geometry.js	2009-09-18 09:34:36 UTC (rev 4655)
+++ branches/2.6/http/javascripts/geometry.js	2009-09-18 09:34:59 UTC (rev 4656)
@@ -360,6 +360,19 @@
 	this.close();
 };
 
+GeometryArray.prototype.importMultiPoint = function(currentGeometry, featureEpsg){
+	var coordinates = currentGeometry.coordinates;
+
+	this.addMember(geomType.point);
+	for (var m = 0; m < coordinates.length; m++) {
+		this.get(-1).addGeometry();
+		var currentPoint = coordinates[m];
+		this.getGeometry(-1,-1).addPointByCoordinates(currentPoint[0], currentPoint[1], currentPoint[2]);
+		this.getGeometry(-1,-1).setEpsg(featureEpsg);
+	}
+	this.close();
+};
+
 GeometryArray.prototype.importPolygon = function(currentGeometry, featureEpsg){
 	var coordinates = currentGeometry.coordinates;
 
@@ -429,6 +442,10 @@
 				this.importPoint(currentGeometry, featureEpsg);
 				break;
 			
+			case "MultiPoint":
+				this.importMultiPoint(currentGeometry, featureEpsg);
+				break;
+			
 			case "LineString":
 				this.importLine(currentGeometry, featureEpsg);
 				break;



More information about the Mapbender_commits mailing list