如何使标记始终可见标记谷歌地图javascript [英] How to make title always visible for marker Google map javascript
本文介绍了如何使标记始终可见标记谷歌地图javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好
我正在使用我的asp.net应用程序使用google map api。所有工作正常我只想要标记的标题应该始终可见标记,而不是使用点击监听器,一旦地图上的标记应该显示标题窗口
请帮助!!
我的尝试:
var marker = new google.maps.Marker({
position:latLng,
map:map,
icon:icon,
title:title,
label:label
});
Hello
I am working with google map api with my asp.net 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,
title:title,
label: label
});
推荐答案
考虑使用MarkerLabel
对象而不是字符串。可以在Google的网站上查看代码演示, Marker Labels | Google Maps JavaScript API | Google Developers [ ^ ]
在此处阅读更多主题,标记 | Google Maps JavaScript API | Google Developers [ ^ ]
在我的R& D期间,谷歌给了我这个链接,在你可能想要显示标题的其他方面似乎很有希望,如何永久显示标记的标签/标题在Google Maps V3中 - Stack Overflow [ ^ ]
Consider using aMarkerLabel
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[^]
这篇关于如何使标记始终可见标记谷歌地图javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文