I need to show some nice tooltip with image and text on mouse hover of google maps marker.
marker.setTitle - works only with text but not with html
Does google maps api have standard solution ?
Can you please suggest lib to create tooltips and make them look nice ?
You can either use "title" and "url", or infowindow with href embedded, to provide tooltips and hyperlinks for map markers.
For adding a custom marker to Google Maps navigate to the app > res > drawable > Right-Click on it > New > Vector Assets and select the icon which we have to show on your Map. You can change the color according to our requirements. After creating this icon now we will move towards adding this marker to our Map.
Move an info windowAttach the info window to a new marker using the InfoWindow. open() method. Note: If you call open() without passing a marker, the InfoWindow will use the position specified upon construction through the InfoWindowOptions object literal.
Here is what I did on a project if you want a DIY solution.
This way you can really control how your "infowindow" appears and what it will contain. Good luck.
You could listen for the mouseover
event on the marker, and trigger an infoWindow
to appear with that event.
Once you have the infowindow, you can put pictures and text in it in a way that is well supported by the api.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With