-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Hi there,
We have many many features on screen. The default selection interaction requires the user to be pixel perfect when selecting a feature. It's clear that OpenLayers can do better than that.
One example is outlined here:
http://plnkr.co/edit/zbqKeJ4lXQ8C60TC4fza?p=preview
They've defined an hover selection criteria which highlights features as the mouse passes over them, which makes it much easier for a user to select exactly the feature that they want to work on.
var hoverInteraction = new ol.interaction.Select({
condition: ol.events.condition.pointerMove,
layers: [layerFeatures, layerFeatures2]
});
map.addInteraction(hoverInteraction);
var featureOverlay = new ol.FeatureOverlay({
map: map,
style: geometryStyle
});
hoverInteraction.on('select', function(evt){
if(evt.selected.length > 0){
console.info('selected: ' + evt.selected[0].getId());
}
});
I'd like to introduce a similar method into v-ol3, but I'm struggling to see how it might be supported (given that my gwt foo is far from perfect).
Could you please offer me some suggestions, or pointers as to what might be the most appropriate way to extend v-ol3 to incorporate a similar method please?
Cheers,
Joe