Class: FeatureSnapper

FeatureSnapper


new FeatureSnapper( [optOptions])

Parameters:
Name Type Argument Description
optOptions Options <optional>

Options.

Source:

Members


indexedFeatures

Index pour accéder rapidements aux infos des features Extents snapSourcesUids snapGroups

.

Index pour accéder rapidements aux infos des features Extents snapSourcesUids snapGroups

Source:

Methods


addFeature(feature [, optListen])

Add a feature to the collection of features that we may snap to.

Add a feature to the collection of features that we may snap to.

Parameters:
Name Type Argument Description
feature ol.Feature

Feature.

optListen boolean <optional>

Whether to listen to the feature change or not Defaults to true.

Source:

addSource(snapSource)

Parameters:
Name Type Description
snapSource Object

paramétrage d'une snapSource

Properties
Name Type Argument Description
groups Array.<snapGroup> <optional>

groupes auquels appartientla source

source ol.source.Vector <optional>

Source openlayer, attention a ne pas ajouter des sources composée des même features...

Properties:
Name Type Description
name String

nom du groupe auquel appartient la source

edge Boolean

accrochage aux ligne

vertex Boolean

accrochage au extremités

Ajoute une source vecteur a surveiller

Source:

clear( [clearSystemSnap])

Nettoit les sources ecoutés

.

Nettoit les sources ecoutés

Parameters:
Name Type Argument Default Description
clearSystemSnap boolean <optional>
false

doit-on effacer les sources systeme?

Source:

indexSource_()

indexe la source de données

.

indexe la source de données

Source:

removeFeature(feature [, optUnlisten])

Remove a feature from the collection of features that we may snap to.

Remove a feature from the collection of features that we may snap to.

Parameters:
Name Type Argument Description
feature ol.Feature

Feature

optUnlisten boolean <optional>

Whether to unlisten to the feature change or not. Defaults to true.

Source:

removeSource(source)

retire une source de l'indexation

.

retire une source de l'indexation

Parameters:
Name Type Description
source ol.source.Vector

source openlayers

Source:

segmentPolygonGemetry_(segments, geometry)

Parameters:
Name Type Description
segments Array.<Array.<olcoordinateCoordinate>>

Segments

geometry ol.geom.Polygon

Geometry.

Source:

setMap(map)

Remove the interaction from its current map and attach it to the new map.

Remove the interaction from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here.

Parameters:
Name Type Description
map ol.PluggableMap

Map.

Source:

snapTo(pixel, pixel, pixelCoordinate, snapOptions)

Parameters:
Name Type Description
pixel ol.pixel.Pixel

Pixel

pixel ol.pixel.Pixel

Pixel

pixelCoordinate ol.coordinate.Coordinate

Coordinate

snapOptions snapOptions

options for snap operation

Properties:
Name Type Argument Description
snapGroups Array.<String>

Noms des groupes (paramétrés via addSource) auquel s'accrocher

pixelTolerance Number <optional>

tolérance pixel d'accroche objet

filterFn function <optional>

fonction pour exclure des features du snap

Source:
Returns:

Snap result

Type
Result | null