new ModifyFeature(options)
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
* |
Properties
|
Fires:
- event:modifystart
- event:modifying
- event:modifyend
- event:select
Extends
- ol.interaction.Interaction
Methods
-
getArcs(geom, coord)
-
Get arcs concerned by a modification
Parameters:
Name Type Description geom
ol.geom the geometry concerned
coord
ol.coordinate pointed coordinates
-
getCurrentFeature()
-
Get the current feature to modify
Returns:
- Type
- ol.Feature
-
getModifiedFeatures()
-
Get modified features
Returns:
list of modified features
- Type
- Array.<ol.Feature>
-
getNearestCoord(pt, coords)
-
Get nearest coordinate in a list
Parameters:
Name Type Description pt
ol.coordinate the point to find nearest
coords
ol.geom list of coordinates
Returns:
the nearest point with a coord (projected point), dist (distance to the geom), ring (if Polygon)
- Type
- *
-
handleDownEvent(evt)
-
Parameters:
Name Type Description evt
ol.MapBrowserEvent Map browser event.
Returns:
true
to start the drag sequence.- Type
- boolean
-
removePoint()
-
Removes the vertex currently being pointed.
-
setActive()
-
Activate or deactivate the interaction + remove the sketch.
Parameters:
Name Type Description active.
boolean -
setFilter()
-
Change the filter function
Parameters:
Name Type Description options.filter
function | undefined a filter that takes a feature and return true if it can be modified, default always true.
-
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.