Automatic Save Map Images

Jun 21, 2010 at 4:37 PM

I planed to write program used to save the map image automaticly , but when run this code

 

display blank images where event "OnTileLoadComplete"  fired frist only

 

CODE:

       private void button1_Click(object sender, EventArgs e)

       {

            for (int i = 0; i < 4; i++)

           {

                MainMap.CurrentPosition = new PointLatLng(lat + i, lng + i);

           start:

               MainMap.ReloadMap();

               if (loaded == true)

               {

                   pictureBox1.Image = MainMap.ToImage();

                    string t = @"C:\Users\MMMH\Desktop\tt\" + i.ToString() + ".jpg";

                   pictureBox1.Image.Save(t, System.Drawing.Imaging.ImageFormat.Jpeg);

                }

               else

               {

                    System.Threading.Thread.Sleep(2000);

                   goto start;

               }

            }

        }

 

       private void MainMap_OnTileLoadComplete()

       {

           loaded = true;

       }

 

       private void MainMap_OnTileLoadStart()

       {

           loaded = false;

       }

Coordinator
Jun 21, 2010 at 4:52 PM

wrong way, instead check static map maker integrated in windows forms demo