当我的光标在标记上时,它不会缩放。有没有办法解决?

干杯

public MainForm(Dictionary<string, string> startupParams)
{
    InitializeComponent();
    gMapControl.MapProvider = GMapProviders.GoogleMap;
    gMapControl.Position = new PointLatLng(-33.861468, 151.209179);
    gMapControl.MinZoom = 0;
    gMapControl.MaxZoom = 24;
    gMapControl.Zoom = 9;
    gMapControl.MarkersEnabled = true;
    gMapControl.DragButton = MouseButtons.Left;
    gMapControl.ShowCenter = false;
}

private void UpdateMap()
{
    gMapControl.Position = new PointLatLng(Convert.ToDouble(LatLng.Split(',')[0]), Convert.ToDouble(LatLng.Split(',')[1]));
    GMapOverlay markersOverlay = new GMapOverlay("markers");
    GMarkerGoogle marker = new GMarkerGoogle(new PointLatLng(Convert.ToDouble(LatLng.Split(',')[0]), Convert.ToDouble(LatLng.Split(',')[1])), GMarkerGoogleType.green);
    markersOverlay.Markers.Add(marker);
    gMapControl.Overlays.Clear();
    gMapControl.Overlays.Add(markersOverlay);
}

最佳答案

是的,有一种简单的解决方法:

gMapControl.IgnoreMarkerOnMouseWheel = true;

09-19 06:36