syncSourceSettings method
Synchronizes the SnapSettings.sourceSettings collection based on SnapSource objects in the currently connected ArcGISMap.
Call this method to populate SnapSettings.sourceSettings with a SnapSourceSettings for each valid SnapSource present in the ArcGISMapViewController currently connected to this SnapSettings via GeometryEditor.snapSettings, and ArcGISMapViewController.geometryEditor. If there is no connected ArcGISMapViewController, or the map view and the associated map contains no SnapSource objects valid for snapping, then the collection will be empty after this method returns.
The order of SnapSourceSettings objects will match the order that the associated SnapSource objects appear in the GeoModel.operationalLayers and GeoViewController.graphicsOverlays collections, with objects from GeoModel.operationalLayers appearing first, followed by GeoViewController.graphicsOverlays objects, in order. The collection will not contain a SnapSourceSettings for any loadable SnapSource which is not yet LoadStatus.loaded when SnapSettings.syncSourceSettings is called.
Subsequent calls will update the existing collection, accounting for SnapSource objects that have been added, removed, or moved since the last call to the same connected map. Any changes made to existing SnapSourceSettings objects, for example setting SnapSourceSettings.isEnabled, will be preserved.
Implementation
void syncSourceSettings() {
_withThrowingErrorHandler((errorHandler) {
runtimecore.RT_SnapSettings_syncSourceSettings(
_handle,
errorHandler,
);
});
}