Esempio n. 1
0
        internal void RefreshFeatureInteractors()
        {
            var selectedFeaturesWithLayer = SelectedFeatureInteractors.Select(fe => new { Feature = fe.SourceFeature, fe.Layer }).ToList();

            SelectedFeatureInteractors.Clear();
            selectedFeaturesWithLayer.ForEach(fl => SelectedFeatureInteractors.Add(GetFeatureInteractor(fl.Layer, fl.Feature)));
            SynchronizeTrackers();
        }
Esempio n. 2
0
        public void AddSelection(ILayer layer, IFeature feature, bool synchronizeUI = true)
        {
            if (!layer.Visible)
            {
                return;
            }
            var featureInteractor = GetFeatureInteractor(layer, feature);

            if (null == featureInteractor)
            {
                return;
            }

            SelectedFeatureInteractors.Add(featureInteractor);
            if (synchronizeUI)
            {
                UpdateMapControlSelection();
            }
        }
Esempio n. 3
0
        private bool StartSelection(ILayer layer, IFeature feature)
        {
            var featureInteractor = GetFeatureInteractor(layer, feature);

            if (null == featureInteractor)
            {
                return(false);
            }

            if (featureInteractor.AllowSingleClickAndMove())
            {
                // do not yet select, but allow MltiSelect
                SelectedFeatureInteractors.Add(featureInteractor);
                SynchronizeTrackers();
                UpdateMapControlSelection();
                return(true);
            }
            return(false);
        }