[fusion-commits] r2458 - trunk/widgets/Redline/classes
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Nov 16 03:13:23 EST 2011
Author: liuar
Date: 2011-11-16 00:13:23 -0800 (Wed, 16 Nov 2011)
New Revision: 2458
Modified:
trunk/widgets/Redline/classes/markupeditor.php
Log:
Fix ticket #487 [Redline] the last edge of polygon is not displayed.
Add the missed coordinate in the polygon and make the ring closed.
Modified: trunk/widgets/Redline/classes/markupeditor.php
===================================================================
--- trunk/widgets/Redline/classes/markupeditor.php 2011-11-11 03:14:25 UTC (rev 2457)
+++ trunk/widgets/Redline/classes/markupeditor.php 2011-11-16 08:13:23 UTC (rev 2458)
@@ -147,6 +147,13 @@
$coords->Add($coord);
}
+ // Add the first vertex to make the ring close
+ if($count > 3)
+ {
+ $coord = $geometryFactory->CreateCoordinateXY((double) $vertices[1], (double) $vertices[2]);
+ $coords->Add($coord);
+ }
+
$linearRing = $geometryFactory->CreateLinearRing($coords);
$polygon = $geometryFactory->CreatePolygon($linearRing, null);
More information about the fusion-commits
mailing list