示例#1
0
        static void DoDebug()
        {
            polygons.Clear();

            timer.Interval = 2000;
            timer.Tick    += (sender, args) => { Zoomandcentermap(); };
            timer.Start();

            if (map.IsHandleCreated)
            {
                return;
            }

            polygons = new GMapOverlay("polygons");
            map      = new myGMAP
            {
                MapProvider = GMapProviders.GoogleSatelliteMap,
                MaxZoom     = 24
            };
            map.Overlays.Add(polygons);
            map.Size = new Size(1024, 768);
            map.Dock = DockStyle.Fill;

            map.ShowUserControl();
        }
示例#2
0
        static void DoDebug()
        {
            if (map != null)
            {
                if (map.Overlays.Count != 0)
                {
                    while (polygons.Markers.Count > 7)
                    {
                        polygons.Markers.RemoveAt(0);
                    }
                    //polygons.Markers.Clear();
                    return;
                }
            }

            polygons = new GMapOverlay("polygons");
            map      = new myGMAP();
            var form = new Form()
            {
                Size = new Size(1024, 768), WindowState = FormWindowState.Maximized
            };

            map.Dock        = DockStyle.Fill;
            map.MapProvider = GMapProviders.GoogleSatelliteMap;
            map.MaxZoom     = 20;
            map.Overlays.Add(polygons);
            form.Controls.Add(map);
            form.Show();
        }
示例#3
0
        static void DoDebug()
        {
            polygons = new GMapOverlay("polygons");
            map      = new myGMAP();
            var form = new Form()
            {
                Size = new Size(1024, 768), WindowState = FormWindowState.Maximized
            };

            map.Dock        = DockStyle.Fill;
            map.MapProvider = GMapProviders.GoogleSatelliteMap;
            map.MaxZoom     = 20;
            map.Overlays.Add(polygons);
            form.Controls.Add(map);
            form.Show();
        }