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:

  1. highlight segment hovering different style can see edges.
  2. 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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -