Esempio n. 1
0
 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;
             }
         }
     }
 }
Esempio n. 2
0
        public override void Show()
        {
            if (marker == null)
            {
                base.Show();

                UpdateRectangle();

                int         xCenter = rectangle.X + rectangle.Width / 2;
                int         yCenter = rectangle.Y + rectangle.Height / 2;
                PointLatLng postion = Global.control.FromLocalToLatLng(xCenter, yCenter);
                marker = new GMarkerText(postion);
                marker.Adapter(Global.control.FromLatLngToLocal(PointsArray[0]),
                               Global.control.FromLatLngToLocal(PointsArray[2]));
                marker.IsHitTestVisible = true;
                Global.control.Overlays[Overlay].Markers.Add(marker);
                property.ehLableValueChanged += new EHLableValueChanged(OnLableValueChanged);
                property.IsLoad = true;
                marker.Text     = property.Name;
                marker.Font     = property.Font;
                marker.Fill     = new System.Drawing.SolidBrush(property.Color);
                IsZoomVisible((int)Global.control.Zoom);
            }
        }