Пример #1
22
        public void DrawMarkers()
        {
            int i002 = 0;
            int i003 = 0;
            int i004 = 0;
            if (points.Count == 0)
            {
                MessageBox.Show("У маршрута несуществует точек.");
                return;
            }

            overlayOne = new GMapOverlay(gmap, "OverlayOne");

            foreach (PointD p in points)
            {
                int s = getStatus(p.code);

                if (s == 0)
                {
                    i002++;
                    GMapCustomImageMarker a = new GMapCustomImageMarker(new PointLatLng(p.getx(), p.gety()));
                    a.Tag = p;
                    overlayOne.Markers.Add(a);
                }

                if (s == 1)
                {
                    i004++;
                    GMapCustomImageMarkerRed a = new GMapCustomImageMarkerRed(new PointLatLng(p.getx(), p.gety()));
                    a.Tag = p;
                    overlayOne.Markers.Add(a);
                }

                if (s == 2)
                {
                    i003++;
                    GMapCustomImageMarkerYellow a = new GMapCustomImageMarkerYellow(new PointLatLng(p.getx(), p.gety()));
                    a.Tag = p;
                    overlayOne.Markers.Add(a);
                }

                if (s == 3)
                {
                    GMapCustomImageMarkerBlue a = new GMapCustomImageMarkerBlue(new PointLatLng(p.getx(), p.gety()));
                    a.Tag = p;
                    overlayOne.Markers.Add(a);
                }
            }
            setStatusCount(i002, i003, i004);
            DrawRoute();
            gmap.Overlays.Clear();
            gmap.Overlays.Add(overlayOne);
        }
Пример #2
0
        public void DrawMarkers()
        {
            Bitmap mark = new Bitmap("img/point_g.png");

            if (points.Count == 0) MessageBox.Show("У маршрута несуществует точек.");

            overlayOne = new GMapOverlay(gmap, "OverlayOne");
            foreach (PointD p in points)
            {
                GMapCustomImageMarker a = new GMapCustomImageMarker(new PointLatLng(p.getx(), p.gety()));
                a.Tag = p;
                overlayOne.Markers.Add(a);

            }

            DrawRoute();
            gmap.Overlays.Clear();
            gmap.Overlays.Add(overlayOne);
        }