Gmap.Net Marker at incorrect position but when the map is zoomed the marker goes to right place

后端 未结 2 1965
梦如初夏
梦如初夏 2021-01-18 07:15

I\'ve a Windows Forms Application with a Gmap.Net controller, what I want to do is to add markers based on an outside sources that provides

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-18 07:43

    It's because you're adding the marker to the overlay that has not been added to the map's overlays. Try to switch the order of the statements as follows:

    gmap.Overlays.Add(markersOverlay);
    markersOverlay.Markers.Add(marker);
    

提交回复
热议问题