[GIS] Modify interaction using Icon image in OpenLayers3

openlayers

I have vector features represented by icon images in a map using OpenLayers 3 (3.0.0). These features can be modified by the Modify interaction only if the user place the mouse cursor close their position. If the user tries to drag the icon, outside the position range, the map is panned (instead of dragging that feature).

Is there any way to expand the drag area, from the Modify interaction, to the feature icon?

Example: http://jsfiddle.net/suguiura/xuzsj99b/

Best Answer

Try setting pixelTolerance property of the modify contro. It determines the radius of influence where the features must be consedered selectables.

By default pixelTolerance is 10 pixels.

See more in http://openlayers.org/en/v3.0.0/apidoc/ol.interaction.Modify.html (uncheck the stable checkbox)