new Splitter(options)
Interaction splitter: acts as a split feature agent while editing vector features (LineString).
Parameters:
Name | Type | Description |
---|---|---|
options |
olx.interaction.SplitOptions | source {ol.source.Vector|Array{ol.source.Vector}} The target source (or array of source) with features to be split (configured with useSpatialIndex set to true)
|
- To Do:
-
- verify auto intersection on features that split.
Fires:
- beforesplit,event: aftersplit
Extends
- ol.interaction.Interaction
Methods
-
intersectSegs(s1, s2)
-
Calculate intersection on 2 segs
Parameters:
Name Type Description s1
Array.<_ol_coordinate_> first seg to intersect (2 points)
s2
Array.<_ol_coordinate_> second seg to intersect (2 points)
Returns:
intersection point or false no intersection
- Type
- boolean | _ol_coordinate_
-
onAddFeature()
-
New feature source is added
-
onChangeFeature()
-
Feature source is changing
-
onRemoveFeature()
-
Feature source is removed > count features added/removed
-
splitSource(feature)
-
Split the source using a feature
Parameters:
Name Type Description feature
ol.Feature The feature to use to split.