[OpenLayers-Users] Events on Vector Features
Frédéric Junod
frederic.junod at camptocamp.com
Fri Jul 6 01:58:56 EDT 2007
Hi Brian,
Try the following:
var callBackControl =
new OpenLayers.Control.SelectFeature(vectorLayer,
{onSelect: doOnHover,
onUnselect: xxx});
...
The onUnselect method is called when the user click an other feature.
Regards,
fréd
Le Thu, 05 Jul 2007 19:02:13 -0400,
Brian Pitts <brian at polibyte.com> a écrit :
> What's the proper way to register events on Vector features? After
> reading
> http://www.nabble.com/associating-events-to-geometries-tf3426206.html
> I put together
> http://wilson.library.emory.edu/~mapserver/openlayers/SelectFeatureTest.html ,
> but the callback method I registered is never called. My goal is to
> execure a method any time a click occurs within a vector feature's
> geometry.
>
> A snippets from the link:
>
> var callBackControl = new
> OpenLayers.Control.SelectFeature(vectorLayer, {callbacks:
> {'over':doOnHover}}); map.addControl(callBackControl);
> callBackControl.activate;
>
> Thanks,
> Brian Pitts
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
--
Frédéric Junod
Camptocamp SA
More information about the Users
mailing list