private void MapControl_OnPolygonEnter(GMapPolygon item) { if (marker != null) item.Overlay.Markers.Remove(marker); var point = item.Overlay.Control.PointToClient(Control.MousePosition); var pos = item.Overlay.Control.FromLocalToLatLng(point.X, point.Y); marker = new GMapMarkerRect(pos) { ToolTipMode = MarkerTooltipMode.Always, ToolTipText = createMessage(item.Tag), IsHitTestVisible = false }; item.Overlay.Markers.Add(marker); }
private void MapControl_OnRouteLeave(GMapRoute item) { item.Overlay.Markers.Remove(marker); marker = null; }