[Mapbender-commits] r7420 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Jan 5 04:41:06 EST 2011
Author: verenadiewald
Date: 2011-01-05 01:41:06 -0800 (Wed, 05 Jan 2011)
New Revision: 7420
Modified:
trunk/mapbender/http/javascripts/geometry.js
Log:
enable snapping for all elements of a multipolygon
Modified: trunk/mapbender/http/javascripts/geometry.js
===================================================================
--- trunk/mapbender/http/javascripts/geometry.js 2011-01-04 17:17:02 UTC (rev 7419)
+++ trunk/mapbender/http/javascripts/geometry.js 2011-01-05 09:41:06 UTC (rev 7420)
@@ -503,13 +503,16 @@
GeometryArray.prototype.importMultiPolygon = function(currentGeometry, featureEpsg){
var coordinates = currentGeometry.coordinates;
-
+
this.addMember(geomType.polygon);
for (var m = 0; m < coordinates.length; m++) {
+
this.get(-1).addGeometry();
var currentPolygon = coordinates[m];
+
for (var n = 0; n < currentPolygon.length; n++) {
var currentRing = currentPolygon[n];
+
if (n === 0) {
for (var p = 0; p < currentRing.length; p++) {
var currentPoint = currentRing[p];
@@ -2457,14 +2460,13 @@
this.add(currentRing.get(k));
}
}
-
}
}
// lines, points, outer rings
- for (var k = 0 ; k < geom.get(i).get(j).count() ; k++){
- if ((geom.get(i).get(j).isComplete() === true && typeof(point) == 'undefined') || (typeof(point) != 'undefined' && !geom.get(i).get(j).get(k).equals(point))){
+ for (var k = 0 ; k < geom.get(i).get(j).count() ; k++) {
+ //if ((geom.get(i).get(j).isComplete() === true && typeof(point) == 'undefined') || (typeof(point) != 'undefined' && !geom.get(i).get(j).get(k).equals(point))){
this.add(geom.getPoint(i, j, k));
- }
+ //}
}
}
else {
More information about the Mapbender_commits
mailing list