Exemplo n.º 1
0
        protected void SetRectangle(Rectangle rectangle)
        {
            PointLatLng p;

            p = Global.control.FromLocalToLatLng(rectangle.Left, rectangle.Top);
            PointsArray[0] = p;
            p = Global.control.FromLocalToLatLng(rectangle.Left, rectangle.Bottom);
            PointsArray[1] = p;
            p = Global.control.FromLocalToLatLng(rectangle.Right, rectangle.Bottom);
            PointsArray[2] = p;
            p = Global.control.FromLocalToLatLng(rectangle.Right, rectangle.Top);
            PointsArray[3] = p;

            if (marker != null)
            {
                marker.Adapter(PointsArray[0], PointsArray[2]);
            }
        }
Exemplo n.º 2
0
 public override void Show()
 {
     if (marker == null)
     {
         base.Show();
         Rectangle rectangle = Rectangle.Round(GetRectangle());
         SetRectangle(rectangle);
         int         xCenter = rectangle.X + rectangle.Width / 2;
         int         yCenter = rectangle.Y + rectangle.Height / 2;
         PointLatLng postion = Global.control.FromLocalToLatLng(xCenter, yCenter);
         marker = new GMarkerImage(postion);
         marker.Adapter(PointsArray[0], PointsArray[2]);
         marker.Bmp = new Bitmap(property.ImageFile);
         marker.IsHitTestVisible = true;
         Global.control.Overlays[Overlay].Markers.Add(marker);
         property.ehLableValueChanged += new EHLableValueChanged(OnLableValueChanged);
         property.IsLoad = true;
         IsZoomVisible((int)Global.control.Zoom);
     }
 }