Class: TouchCompass

ol.interaction. TouchCompass


new TouchCompass(options)

Interaction splitter: acts as a split feature agent while editing vector features (LineString).

Parameters:
Name Type Description
options olx.interaction.TouchCompass

onDrag {function|undefined} Function handling "drag" events. It provides a dpixel and a traction (in projection) vector form the center of the compas - size {Number} size of the compass in px, default 80 - alpha {Number} opacity of the compass, default 0.5

Extends

  • ol.interaction.Pointer

Members


compass

Compass Image as a JS Image object

Methods


setActive(active)

Activate or deactivate the interaction.

Parameters:
Name Type Description
active boolean

Active.


setMap(map)

Remove the interaction from its current map, if any, and attach it to a new map, if any. Pass null to just remove the interaction from the current map.

Parameters:
Name Type Description
map _ol_Map_

Map.