GMap.Net zooming issue mouseovering / hovering a marker
Asked Answered
C

1

5

When my cursor is over a marker, it doesn't zoom. Is there any way around this?

Cheers

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);
}
Corie answered 18/1, 2016 at 1:43 Comment(0)
F
7

Yes, there's a simple way around this:

gMapControl.IgnoreMarkerOnMouseWheel = true;
Folks answered 18/1, 2016 at 10:19 Comment(1)
Thank you mate very helpful.Corie

© 2022 - 2024 — McMap. All rights reserved.