Reputation: 98
I've adapted the OpenLayers 3 select features example to get hover effect when the user points a feature (taken from a GeoJSON FeatureList), but I've lost the drag map interaction.
// Mouse over
var seleccion = new ol.interaction.Select({
condition: ol.events.condition.mouseMove,
style: function (feature, resolution) {
// Style Manager handles Style Creation
return [StyleManager.getStyle(feature, true)];
}
});
map.addInteraction(
seleccion
);
Is there a way to produce a feature style change on hover without sacrificing the drag/pan interaction?
You can see the same problem in the linked example when you set the action type to Hover.
There's an unanswered question in openlayers 3 mailing list
Upvotes: 1
Views: 1107
Reputation: 318
I'm not sure whether you had checked the mailing list already.
This is a known issue of OpenLayers 3.
To get the "hover" effect, the vector layer example could be helpful.
Upvotes: 1