コード例 #1
0
        private void OnMapQueried(SharpMap.Data.FeatureDataTable features)
        {
            OnClear(this, EventArgs.Empty);

            if (MapControl == null)
            {
                return;
            }

            _geometryProvider     = new SharpMap.Data.Providers.GeometryFeatureProvider(features);
            _layer                = new SharpMap.Layers.VectorLayer("QueriedFeatures", _geometryProvider);
            _layer.IsQueryEnabled = false;

            var map = MapControl.Map;

            map.Layers.Add(_layer);

            MapControl.Refresh();
        }
コード例 #2
0
        private void OnMapQueried(SharpMap.Data.FeatureDataTable features)
        {
            OnClear(this, EventArgs.Empty);

            if (MapControl == null) return;

            _geometryProvider = new SharpMap.Data.Providers.GeometryFeatureProvider(features);
            _layer = new SharpMap.Layers.VectorLayer("QueriedFeatures", _geometryProvider);
            _layer.IsQueryEnabled = false;

            var map = MapControl.Map;
            map.Layers.Add(_layer);

            MapControl.Refresh();
        }