Quantcast
Channel: GMap.NET - Great Maps for Windows Forms & Presentation
Viewing all articles
Browse latest Browse all 3384

New Post: Problem/BUG with 2 gmap controls at the same time?

$
0
0
hi,

at first i would like to sai,wow great works,i realy like this.I realy liked to work with it.But i found some problem or bug didn't know how to call it...so the problem is if you work with 2 gmap controls at the same time,like you see on the picture ,if i zoom out with muosewheel the marker on right side change the position.at this example its just a bit,you zoom more,the diference is bigger or the marker on left gmap control change the position to current muose position.

This happen just if i zoom with mousewheel only on left side "gmapcontrol1", if i do it on the right side "gmapcontrol2" it doesn't happen.

I hope you understand me, what is the problem.

Image


here is my code very simply
internal readonly GMapOverlay objects = new GMapOverlay("objects");
        internal readonly GMapOverlay objects2 = new GMapOverlay("objects2");
        internal readonly PointLatLng markpos = new PointLatLng(54.6961334816182, 25.2985095977783);

        GMapMarker currentMarker;

        public Form1()
        {
          
            InitializeComponent();
            currentMarker = new GMarkerGoogle(markpos,GMarkerGoogleType.arrow);
          
            currentMarker.Position = markpos;
            objects.Markers.Add(currentMarker);
            objects2.Markers.Add(currentMarker);


            gMapControl2.MapProvider = GMapProviders.OpenStreetMapQuest;
            gMapControl2.Manager.Mode = GMap.NET.AccessMode.ServerAndCache;
            gMapControl2.Position = markpos;
            
            
            gMapControl1.MapProvider = GMapProviders.OpenStreetMapQuest;
            gMapControl1.Manager.Mode = GMap.NET.AccessMode.ServerAndCache;
            gMapControl1.Position = markpos;
        }

      

        private void button1_Click(object sender, EventArgs e)
        {
            gMapControl1.Overlays.Add(objects);

            gMapControl2.Overlays.Add(objects2);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            gMapControl1.Overlays.Clear();

            gMapControl2.Overlays.Clear();
            gMapControl1.Refresh();
            gMapControl2.Refresh();
        }   

Viewing all articles
Browse latest Browse all 3384


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>