简体   繁体   English

Google Map API:为什么我们需要为Marker对象设置标题?

[英]Google Map API: Why we need to set title for Marker object?

It does make sense to me for setting the title for Markers in google map api. 在Google Map API中为标记设置标题确实对我有意义。 It does not show or anything. 它不显示或任何内容。 So what is that for? 那是为了什么呢?

From https://developers.google.com/maps/documentation/javascript/markers : 来自https://developers.google.com/maps/documentation/javascript/markers

The marker's title will appear as a tooltip. 标记的标题将显示为工具提示。

If you do not wish to pass any Marker options in the marker's constructor, instead pass an empty object {} in the last argument of the constructor. 如果您不想在标记的构造函数中传递任何Marker选项,请在构造函数的最后一个参数中传递空对象{}。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM