openlayers 3 - Modify interaction - How to get the segment which has been hovered -
i using openlayers-3 modify interaction edit vector layers. when polygon/polyline being edited, if mouse close line segment, small circle drawn , dragging creates new vertex or moves existing vertex, depending on over segment hovering.
now, difficult understand if hovering on existing vertex, or on middle of segment. have thought 2 solutions problem:
- highlight segment hovering different style can see edges.
- when hovering on vertex, style small circle different style.
is there way achieve of two?
it can done changing interaction condition like:
var selectpointermove_highlight = new ol.interaction.select({ condition: ol.events.condition.pointermove }); map.addinteraction(selectpointermove_highlight);
i have online example.
Comments
Post a Comment