[OpenLayers-Dev] Problem selecting features on SVG2 with Chrome

Carl Baldwin carl at ecbaldwin.net
Wed Dec 28 19:12:53 EST 2011


Greetings,

I recently tried switching to the SVG2 vector layer renderer in place of
the SVG renderer.  Most things appeared to work better and I was pleased
that the vectors do not need to be re-rendered as I drag the map around.  I
like that.

I have noticed one other difference in behavior from the SVG renderer that
is not so desirable.  When certain vector features are clicked, my
application makes an AJAX request that ultimately adds new features to the
layer.  With SVG, these new features immediately become hoverable in that
hovering over them triggers the onSelect event in the SelectFeature control
that had been previously added to the map.  With SVG2, these new features
are not hoverable but the features that were already there still are.

I tried deactivating and reactivating the control to no avail.  I thought
I'd ask the list to see if there are any other ideas.

This issue seemed like it could be related to the following ticket:
http://trac.osgeo.org/openlayers/ticket/3502 because it combines
selectfeature, SVG2 and chrome and seems to have something to do with
changing features.

I went to the select-feature example.  I have some trouble drawing a line
and then selecting it using chrome with the SVG2 renderer.  It seems to
work sometimes and not others.  Drawing a line and then clicking on "select
features on hover" seems to work but "select feature" doesn't seem to work
all of the time.  I can draw a line then I'm unable to click to select the
one that I just added.  If I click "select on hover" and select it then I
can switch back to click to select and select it.

Hopefully, all of that made sense.  I'm using Chrome version 16.0.912.63 on
Linux.  This all works as I expected on Firefox with both SVG renderers.

Thanks,
Carl Baldwin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20111228/a0c8f032/attachment.html


More information about the Dev mailing list