Esempio n. 1
0
        public void CleanupSelection()
        {
            foreach (RegionPointMarker pm in _regionPoints)
                pm.Dispose();
            _regionPoints.Clear();
            foreach (RegionPointMarker pm in _regionMidpoints)
                pm.Dispose();
            _regionMidpoints.Clear();

            if (_regionHitMarker != null)
            {
                _regionHitMarker.Dispose();
                _regionHitMarker = null;
            }
            Map.OnMapZoomChanged -= Map_OnMapZoomChanged;
        }
Esempio n. 2
0
        public void CleanupSelection()
        {
            foreach (RegionPointMarker pm in _regionPoints)
            {
                pm.Dispose();
            }
            _regionPoints.Clear();
            foreach (RegionPointMarker pm in _regionMidpoints)
            {
                pm.Dispose();
            }
            _regionMidpoints.Clear();

            if (_regionHitMarker != null)
            {
                _regionHitMarker.Dispose();
                _regionHitMarker = null;
            }
            Map.OnMapZoomChanged -= Map_OnMapZoomChanged;
        }
Esempio n. 3
0
        private void Shape_MouseEnter(object sender, MouseEventArgs e)
        {
            if (Map != null && IsSelectable)
            {
                var path   = (Path)sender;
                var marker = (RegionMarker)Map.Markers.First(m => m.Shape == path);
                for (int i = 0; i < marker.Points.Count; i++)
                {
                    PointLatLng curPoint  = marker.Points[i];
                    PointLatLng nextPoint = i == marker.Points.Count - 1 ? marker.Points[0] : marker.Points[i + 1];
                    CreateMidpoint(i, curPoint, nextPoint);
                    CreatePoint(i, curPoint);
                }

                _regionHitMarker = new RegionHitMarker(marker.Points);
                _regionHitMarker.RegenerateShape(Map);
                _regionHitMarker.Shape.MouseLeave        += Region_MouseLeave;
                _regionHitMarker.Shape.MouseLeftButtonUp += RegionHit_MouseLeftButtonUp;
                Map.OnMapZoomChanged += Map_OnMapZoomChanged;
                Map.Markers.Add(_regionHitMarker);
            }
        }
Esempio n. 4
0
        private void Shape_MouseEnter(object sender, MouseEventArgs e)
        {
            if (Map != null && IsSelectable)
            {
                var path = (Path) sender;
                var marker = (RegionMarker) Map.Markers.First(m => m.Shape == path);
                for (int i = 0; i < marker.Points.Count; i++)
                {
                    PointLatLng curPoint = marker.Points[i];
                    PointLatLng nextPoint = i == marker.Points.Count - 1 ? marker.Points[0] : marker.Points[i + 1];
                    CreateMidpoint(i, curPoint, nextPoint);
                    CreatePoint(i, curPoint);
                }

                _regionHitMarker = new RegionHitMarker(marker.Points);
                _regionHitMarker.RegenerateShape(Map);
                _regionHitMarker.Shape.MouseLeave += Region_MouseLeave;
                _regionHitMarker.Shape.MouseLeftButtonUp += RegionHit_MouseLeftButtonUp;
                Map.OnMapZoomChanged += Map_OnMapZoomChanged;
                Map.Markers.Add(_regionHitMarker);
            }
        }