You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing, if the FeatureEditor has the option {"cfg": {"snapTool": true}} a new button will be present in the toolbar.
As the user click on the button, the button will enable, and by default it will snap to the current editing layer.
from the dropdown menu the user can configure:
The layer to use for snapping (selecting from a list of supported ones)
the following properties:
edge | boolean (defaults to true) | Snap to edges.
vertex | boolean (defaults to true) | Snap to vertices.
pixelTolerance | number (defaults to 10) | Pixel tolerance for considering the pointer close enough to a segment or vertex for snapping
Implementation
The tool will be available only for OpenLayers, it will not be shown for leaflet or cesium
Snap interaction in OpenLayers provides the following option for passing features to snap:
features: passing directly the openlayers features
source: passing an OpenLayers Vector source.
The source option fits when the layer uses a OpenLayers Vector source. e.g.:
Annotations
Vector data imported features from, for intance, shape files
WFS layer (that use Vector sources ).
The problem comes when we have WMS layers backed by a WFS layer. I this case we need to download the features locally in a temporary Vector source to use.
In the case we have a big amount of data (complex geometries and/or lot of features) we may have problems in terms download size / performances.
To avoid this we have to check loading strategies of Vector source to use: - See here.
During the development we can decide if makes sense to allow to configure the strategy to use for remote layers.
Moreover, we may decide to set a limit in terms of number of features to download from WFS service, or a combination of strategy + limit.
This snapping option should be an option for the DrawSupport implementation of openlayers. It should be able to access to the layers in the map, identify their type and / or configuration, to idenify the possibility to snap directly or if need to use a support Vector source to store data.
The geometric input should be able to snap to existing vector objects on the map (e.g. cadastral
parcel boundaries).
Acceptance Criteria:
See related on MapStore:
geosolutions-it/MapStore2#7869
The text was updated successfully, but these errors were encountered: