Reputation: 21
I use ol.interaction.Select but when fly over feature, my icon disappears.
var selectPointerMove = new ol.interaction.Select({
condition: ol.events.condition.pointerMove,
style: []
});
What should I put in style to keep my basic icon?
thanks for your help
Upvotes: 1
Views: 918
Reputation: 21
Thanks for your response but if no style, I have a blue point
For example : My Map with icon
I want just my icon, no blue point... I have many feature with different icon.
Upvotes: 1
Reputation: 1159
Just remove style:[]
from the above code or create a style object.
If you see the documentation of ol.interaction.Select
http://openlayers.org/en/latest/apidoc/ol.interaction.Select.html
It clearly says style
property will be applied for selected Features. Since in your code you have declared an empty style object so the feature is not getting displayed.
Fix :
var selectPointerMove = new ol.interaction.Select({
condition: ol.events.condition.pointerMove,
});
Upvotes: 2