[OpenLayers-Trac] [OpenLayers] #3310: DrawFeature control in freehand mode produces invalid geometries

OpenLayers trac-20090302 at openlayers.org
Fri May 20 10:58:26 EDT 2011


#3310: DrawFeature control in freehand mode produces invalid geometries
---------------------------------+------------------------------------------
 Reporter:  rayd                 |       Owner:              
     Type:  bug                  |      Status:  new         
 Priority:  minor                |   Milestone:  2.11 Release
Component:  Control.DrawFeature  |     Version:  2.10        
 Keywords:  geometry             |       State:              
---------------------------------+------------------------------------------
 To test this out I used the the draw feature example here:
 http://dev.openlayers.org/releases/OpenLayers-2.10/examples/draw-
 feature.html

 Use a DrawFeature control in freehand mode with a Path handler to draw a
 line. Instead of dragging the mouse, just click once -- you will get a
 feature with a LINESTRING geometry with only one point. You can use a tool
 like Firebug to inspect the created features. Similarly, use a DrawFeature
 control in freehand mode with a Polygon handler. Just click once on the
 map, and you will get a feature with a POLYGON geometry with a LinearRing
 geometry with only two points. This shouldn't happen since those are
 technically invalid geometries.

 I would think in this situation we're just better off not adding the
 feature to the layer in the first place.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3310>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list