Click here to Skip to main content
15,904,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I had made search app using GMap.net, its works fine, i had treeview and all marker on map,
when i click on the label the specific tooltip on the specific marker should pop up.
how i implement this?
in short i want to Display tooltip programmatically
any idea pls let me know it..
Posted
Updated 17-Apr-16 16:48pm
Comments
Mohan Gopi 31-Aug-13 1:40am    
Hi Sumit, Actually when u want marker tool tip. when your placing a marker on map or clicking a particular marker on map.
Sumit Memane 31-Aug-13 2:19am    
Hi Mohan.
in my app there is tree node related to every marker on map.
when i click on tree node label. i want to show the tooltip of that specific marker.
Mohan Gopi 31-Aug-13 2:41am    
your saying when you clicking label on tree view the related marker tool tip it will add defaultl y right.
Sumit Memane 31-Aug-13 3:45am    
jus like a google map older version
on left hand side you will get result and when you click on specific result. it will show tooltip of that marker.

Hi Sumit, Try this;

The below code is showing/adding Tool tip defaulty When your placing the Markers on Gmap Control.
C#
GMapOverlay overlayOne ;
GMapMarkerImage markerone = new GMapMarkerImage(new PointLatLng(lat, lng), new Bitmap(Image.FromFile(Icon Path Here)));
overlayOne = new GMapOverlay(gMapControl1, "Overlay");
MarkerTooltipMode mode = MarkerTooltipMode.Always;
markerone.ToolTip = new GMapBaloonToolTip(markerone);
markerone.ToolTipMode = mode;
Brush ToolTipBackColor = new SolidBrush(Color.Transparent);
markerone.ToolTip.Fill = ToolTipBackColor ;
markerone.ToolTipText = Enter Tooltip Text Here;                                  
overlayOne.Markers.Add(markerone);
gMapControl1.Overlays.Add(overlayOne);


I hope this will help you, If you found any errors means let me know.

Thank's
Mohan G
 
Share this answer
 
Comments
Member 10691034 15-Apr-14 22:47pm    
Dear Mohan, so how can you customize markertooltip position ?
Member 10573923 25-Jul-14 2:50am    
please help :
GMapMarkerImage and GMarkerGoogle both consist error,

the type or namespace could not found.

include the following library-
using GMap.NET;
using GMap.NET.MapProviders;
using GMap.NET.WindowsForms;
using GMap.NET.WindowsForms.Markers;
using GMap.NET.WindowsForms.ToolTips;
muchas gracias, era lo que estaba buscando.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900