[OpenLayers-Users] Events on Vector Features

Brian Pitts brian at polibyte.com
Thu Jul 5 19:02:13 EDT 2007


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






More information about the Users mailing list