Exemplo n.º 1
0
 void FrmMapFrm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (ts != null)
     {
         ts.Dispose();
         ts = null;
     }
 }
Exemplo n.º 2
0
 void FrmMapFrm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (ts != null)
     {
         ts.Dispose();
         ts = null;
     }
 }
Exemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            mapBox1.Map.BackgroundLayer.Clear();
            if (m_ts != null)
                m_ts.Dispose();
            m_ts = new BruTile.GoogleMaps.GoogleV3TileSource((BruTile.GoogleMaps.GoogleV3TileSource.MapTypeId)(m_nextMap++ % 4));
            var tl = new SharpMap.Layers.TileAsyncLayer(m_ts, "Google");
            mapBox1.Map.BackgroundLayer.Add(tl);

            mapBox1.Refresh();
        }
Exemplo n.º 4
0
 public FrmMapFrm()
 {
     ts = new BruTile.GoogleMaps.GoogleV3TileSource();
     InitializeComponent();
     SharpMap.Layers.TileLayer tl = new SharpMap.Layers.TileLayer(ts, "Google");
     mapBox1.Map.Layers.Add(tl);
     mapBox1.Map.ZoomToBox(new GeoAPI.Geometries.Envelope(-1500000, 4250000, 4500000, 12500000));
     mapBox1.EnableShiftButtonDragRectangleZoom = true;
     mapBox1.PanOnClick = false;
     mapBox1.SetToolsNoneWhileRedrawing = false;
     mapBox1.Refresh();
     this.FormClosing += new FormClosingEventHandler(FrmMapFrm_FormClosing);
 }
Exemplo n.º 5
0
 public FrmMapFrm()
 {
     ts = new BruTile.GoogleMaps.GoogleV3TileSource();
     InitializeComponent();
     SharpMap.Layers.TileLayer tl = new SharpMap.Layers.TileLayer(ts, "Google");
     mapBox1.Map.Layers.Add(tl);
     mapBox1.Map.ZoomToBox(new GeoAPI.Geometries.Envelope(-1500000, 4250000, 4500000, 12500000));
     mapBox1.EnableShiftButtonDragRectangleZoom = true;
     mapBox1.PanOnClick = false;
     mapBox1.SetToolsNoneWhileRedrawing = false;
     mapBox1.Refresh();
     this.FormClosing += new FormClosingEventHandler(FrmMapFrm_FormClosing);
 }
Exemplo n.º 6
0
        private void button2_Click(object sender, EventArgs e)
        {
            mapBox1.Map.BackgroundLayer.Clear();
            if (m_ts != null)
            {
                m_ts.Dispose();
            }
            m_ts = new BruTile.GoogleMaps.GoogleV3TileSource((BruTile.GoogleMaps.GoogleV3TileSource.MapTypeId)(m_nextMap++ % 4));
            var tl = new SharpMap.Layers.TileAsyncLayer(m_ts, "Google");

            mapBox1.Map.BackgroundLayer.Add(tl);

            mapBox1.Refresh();
        }
Exemplo n.º 7
0
        public Form1()
        {
            ts = new BruTile.GoogleMaps.GoogleV3TileSource(BruTile.GoogleMaps.GoogleV3TileSource.MapTypeId.ROADMAP);
            InitializeComponent();
            SharpMap.Layers.TileAsyncLayer tl = new SharpMap.Layers.TileAsyncLayer(ts, "Google");
            tl.OnlyRedrawWhenComplete = true;

            mapBox1.Map.BackgroundLayer.Add(tl);
            mapBox1.Map.ZoomToBox(new GeoAPI.Geometries.Envelope(-1500000, 4250000, 4500000, 12500000));
            mapBox1.EnableShiftButtonDragRectangleZoom = true;
            mapBox1.PanOnClick = false;
            mapBox1.SetToolsNoneWhileRedrawing = false;
            mapBox1.Refresh();
        }
Exemplo n.º 8
0
        public Form1()
        {
            ServicePointManager.DefaultConnectionLimit = 20;

            m_ts = new BruTile.GoogleMaps.GoogleV3TileSource(BruTile.GoogleMaps.GoogleV3TileSource.MapTypeId.ROADMAP);
            InitializeComponent();
            var tl = new SharpMap.Layers.TileAsyncLayer(m_ts, "Google");

            tl.OnlyRedrawWhenComplete = true;

            mapBox1.Map.BackgroundLayer.Add(tl);
            mapBox1.Map.ZoomToBox(new GeoAPI.Geometries.Envelope(-1500000, 4250000, 4500000, 12500000));
            mapBox1.EnableShiftButtonDragRectangleZoom = true;
            mapBox1.PanOnClick = false;
            mapBox1.SetToolsNoneWhileRedrawing = false;
            mapBox1.Refresh();
        }
Exemplo n.º 9
0
        private void button2_Click(object sender, EventArgs e)
        {
            mapBox1.Map.BackgroundLayer.Clear();
            if (ts != null)
                ts.Dispose();
            ts = new BruTile.GoogleMaps.GoogleV3TileSource((BruTile.GoogleMaps.GoogleV3TileSource.MapTypeId)(nextMap++ % 4));
            SharpMap.Layers.TileAsyncLayer tl = new SharpMap.Layers.TileAsyncLayer(ts, "Google");
            mapBox1.Map.BackgroundLayer.Add(tl);

            mapBox1.Refresh();

            //for (int i = 0; i < 10; i++)
            {
               // FrmMapFrm frm = new FrmMapFrm();
               // frm.Show();
                //while (!frm.Visible)
                //{
                //    Thread.Sleep(100);
                //}

                //frm.Close();
                //frm.Dispose();
            }
        }