Click here to Skip to main content
15,743,299 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working with google map api with my application. All working fine i just want title of marker should be always visible for marker, not using click listener, once the marker on map the title window should show
Please help!!

What I have tried:

var marker = new google.maps.Marker({
position: latLng,
map: map,
icon: icon,
label: label
Updated 7-Mar-18 7:53am

1 solution

Consider using a MarkerLabel object instead of string. A demo of the code can be seen here on the Google's website, Marker Labels  |  Google Maps JavaScript API  |  Google Developers[^]

Read here for a bit more on the topic, Markers  |  Google Maps JavaScript API  |  Google Developers[^]

During my R&D, Google gave me this link that seems to be quite promising in some other ways that you might want to show the title, How can i show label/title for marker permanently in Google Maps V3 - Stack Overflow[^]
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