new TouchCursorModify(options, pixelTolerance)
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
olx.interaction.InteractionOptions | Options Properties
|
|||||||||||||||||||||
pixelTolerance |
number | Pixel tolerance for considering the pointer close enough to a segment or vertex for editing, default 10 |
|||||||||||||||||||||
options.style |
ol.style.Style | Array.<ol.style.Style> | undefined | Style for the sketch features. |
|||||||||||||||||||||
options.wrapX |
boolean | Wrap the world horizontally on the sketch overlay, default false |
Extends
Methods
-
addButton(button)
-
Add a button element
Parameters:
Name Type Description button
* options.className
string button class name
options.html
DOMElement | string button content
options.click
function onclick function
options.on
* an object with
options.before
boolean - Inherited From:
- Overrides:
-
addOverlay(ov)
-
Add an overlay to the interacton
Parameters:
Name Type Description ov
ol.Overlay - Inherited From:
- Overrides:
-
getButtonElement(button)
-
Get cursor button element
Parameters:
Name Type Description button
string | number the button className or the button index
- Inherited From:
- Overrides:
Returns:
- Type
- Element
-
getInteraction()
-
Get the modify interaction.
-
getOverlay()
-
Get cursor overlay
- Inherited From:
- Overrides:
Returns:
- Type
- ol.Overlay
-
getOverlayElement()
-
Get cursor overlay element
- Inherited From:
- Overrides:
Returns:
- Type
- Element
-
getPixel()
-
Get pixel position
- Inherited From:
- Overrides:
Returns:
- Type
- ol.pixel
-
getPosition()
-
Get the position of the target
- Inherited From:
- Overrides:
Returns:
- Type
- ol.coordinate
-
offsetPosition(coord)
-
Offset the target position
Parameters:
Name Type Description coord
ol.coordinate - Inherited From:
- Overrides:
-
removeButton(button)
-
Remove a button element
Parameters:
Name Type Description button
string | number | undefined the button className or the button index, if undefined remove all buttons, default remove all
- Inherited From:
- Overrides:
Returns:
- Type
- Element
-
removeOverlay(ov)
-
Remove an overlay from the interacton
Parameters:
Name Type Description ov
ol.Overlay - Inherited From:
- Overrides:
-
setActive(active, position)
-
Activate or deactivate the interaction.
Parameters:
Name Type Description active
boolean Active.
position
ol.coordinate | null position of the cursor (when activating), default viewport center.
- Overrides:
-
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.
- Overrides:
-
setPosition(coord)
-
Set the position of the target
Parameters:
Name Type Description coord
ol.coordinate - Inherited From:
- Overrides: