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 geomol.geom the geometry concerned
coordol.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 ptol.coordinate the point to find nearest
coordsol.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 evtol.MapBrowserEvent Map browser event.
Returns:
trueto 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.filterfunction | 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
nullto just remove the interaction from the current map.Parameters:
Name Type Description mapol.Map Map.