ToolTip Bug?

Aug 3, 2009 at 4:32 PM

I write this code:

    Private topOverlay As GMap.NET.WindowsForms.GMapOverlay
    Private currentMarker As GMap.NET.WindowsForms.GMapMarker

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        GMap.NET.GMaps.Instance.UseRouteCache = True
        GMap.NET.GMaps.Instance.UseGeocoderCache = True
        GMap.NET.GMaps.Instance.UsePlacemarkCache = True
        GMap.NET.GMaps.Instance.Mode = GMap.NET.AccessMode.ServerAndCache
        GMap.NET.GMaps.Instance.Language = System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName


        'Utilizzo Proxy IE
        System.Net.WebRequest.DefaultWebProxy = System.Net.WebRequest.GetSystemWebProxy()
        System.Net.WebRequest.DefaultWebProxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials

        Me.mapMain.ShowTileGridLines = False
        Me.mapMain.MapType = GMap.NET.MapType.GoogleMap

        Me.mapMain.MaxZoom = 20
        Me.mapMain.MinZoom = 2
        Me.mapMain.Zoom = 10
       

        Me.mapMain.CurrentPosition = _
            New GMap.NET.PointLatLng(44.3984671422585, 7.8167724609375)

        'Gestione Overlay
        Me.topOverlay = New GMap.NET.WindowsForms.GMapOverlay(Me.mapMain, "top")
        Me.mapMain.Overlays.Add(Me.topOverlay)

        'Gestione Current Marker
        Me.currentMarker = New GMap.NET.WindowsForms.Markers.GMapMarkerGoogleRed( _
            Me.mapMain.CurrentPosition)

        'Me.currentMarker.TooltipMode = GMap.NET.WindowsForms.MarkerTooltipMode.Always
        Me.currentMarker.ToolTipText = "Posizione corrente"
        Me.topOverlay.Markers.Add(Me.currentMarker)

    End Sub

And whe I put the mouse point on marker the tooltip it's not show, if I set

Me.currentMarker.TooltipMode = GMap.NET.WindowsForms.MarkerTooltipMode.Always

the tooltip it's show (ever obviously)

My it's correct?

Thanks

 

Coordinator
Aug 3, 2009 at 4:44 PM

you forget to set marker area size:

 

GMapMarker myCity = new GMapMarkerGoogleGreen(pos.Value);
                  myCity.Size = new System.Drawing.Size(10, 10);
                  myCity.TooltipMode = MarkerTooltipMode.OnMouseOver;

 

 

GMapMarker myCity = new GMapMarkerGoogleGreen(pos.Value);
myCity.Size = new System.Drawing.Size(10, 10);
myCity.TooltipMode = MarkerTooltipMode.OnMouseOver;

 

 

 

 

Aug 3, 2009 at 4:54 PM

I correct my code

<font size="2">

 

</font>

Me.currentMarker = New GMap.NET.WindowsForms.Markers.GMapMarkerGoogleRed(
                                            
 _Me.mapMain.CurrentPosition)

Me.currentMarker.Size = New System.Drawing.Size(100, 100)        <----------------<font size="2">

 

</font>

Me.currentMarker.ToolTipText = "Posizione corrente" 
Me.topOverlay.Markers.Add(Me.currentMarker)

Now it's Ok but with New System.Drawing.Size(10, 10) It's not show, there is a rule for the size of tool tips?

Coordinator
Aug 3, 2009 at 5:01 PM

it's working with any size, but you if you set to small size you'll see it's hard to hit a  few pixel area ;}