Hi,
Let's say I have two overlays:
- one made of markers for which I want to handle a click event
- one other made of curves for which I just want to a handle a hover event
How can I use the SelectFeature to make these two events working well?
Apparently OL doesn't support multiple addControl(<SelectFeature>) and only
handle the last one passed through the addControl method.
In addition, I am using a DragFeature to move some other markers (on a third
overlay) and I loose that control too when enabling the SelectFeature
control on another layer.
I know how to handle one layer with the SelectFeature:
---
/* for each layer */
layer.events.on({
featureselected: function(e) { onHover(e.feature); },
featureunselected: function(e) { onBlur(e.feature); }
});
/* and then */
var hover = new OpenLayers.Control.SelectFeature(
<1 layer or an array of>, {
clickout: false, toggle: false,
multiple: false, hover: true,
box: false
});
map.addControl(hover);
hover.activate();
----
Any idea?
--
Fabien Renaud
Georgia Tech Student in Computer Science
ENSEEIHT Student in Computer Science and Applied Mathematics
Phone: 0033 678-363-272
Email: [email protected]
Web: http://www.fabienrenaud.com
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users