public override void Clear() { if (marker != null) { foreach (GMapOverlay overlay in Global.control.Overlays) { if (overlay.Markers.Contains(marker)) { overlay.Markers.Remove(marker); marker = null; break; } } } }
public override void Show() { if (marker == null) { base.Show(); Rectangle rectangle = GetRectangle(); int xCenter = rectangle.X + rectangle.Width / 2; int yCenter = rectangle.Y + rectangle.Height / 2; PointLatLng postion = Global.control.FromLocalToLatLng(xCenter, yCenter); marker = new GMarkerEllipse(postion); marker.Adapter(PointsArray[0], PointsArray[2]); marker.IsHitTestVisible = true; Global.control.Overlays[Overlay].Markers.Add(marker); property.ehLableValueChanged += new EHLableValueChanged(OnLableValueChanged); property.IsLoad = true; marker.Stroke = new Pen(property.Color, property.PenWidth); marker.Fill = new System.Drawing.SolidBrush(property.Fill); IsZoomVisible((int)Global.control.Zoom); } }