[OpenLayers-Trac] [OpenLayers] #3206: MultiPoint disappears upon
unselectFeature
OpenLayers
trac-20090302 at openlayers.org
Tue Mar 29 15:20:04 EDT 2011
#3206: MultiPoint disappears upon unselectFeature
-----------------------------------+----------------------------------------
Reporter: arneke | Owner: tschaub
Type: bug | Status: new
Priority: minor | Milestone: 2.11 Release
Component: Control.ModifyFeature | Version: 2.10
Keywords: | State: Needs More Work
-----------------------------------+----------------------------------------
I've made several attempts to fix this, but I haven't been able to get my
head entirely around how this should work.
The problem appears to be
http://trac.osgeo.org/openlayers/browser/trunk/openlayers/lib/OpenLayers/Control/ModifyFeature.js#L381
{{{
this.layer.removeFeatures(this.vertices, {silent: true});
}}}
Up to that point in the code, the renderer has actually redrawn the point
geometry with the correct style for a feature that is not selected. But
somehow this.vertices refers to the redrawn point, so then it is deleted
and not visible until the layer is either refreshed or the feature is
selected.
There seem to be a few special cases for Point (and MultiPoint) in the
code, but I haven't been able to extend them to cover my use case. In this
part of the code the GeometryCollection shows up as MultiPoint, so I would
assume it's reproducible with that. If anyone is able to devote a little
bit of time to this I'd be happy to set up a simple test case.
Perhaps another ticket: I also notice that for Polygons and Lines the
default Point symbolizer from my StyleMap is used for drawing the vertex
handles when I select a Line or Polygon. I would have expected the
temporary Point symbolizer, or perhaps the pointRadius / graphicName in
the rules for Polygon or Line.
--
Ticket URL: <http://trac.openlayers.org/ticket/3206>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list