javascript - 谷歌地图API : Why we need to set title for Marker object?

标签 javascript google-maps-api-3

对于我来说,在 google map api 中设置标记的标题确实有意义。它不显示或任何东西。那么这是做什么用的呢?

最佳答案

来自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.

关于javascript - 谷歌地图API : Why we need to set title for Marker object?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30761690/

相关文章:

javascript - 为 Google map 信息框创建自定义关闭按钮

google-maps - 我没有看到任何错误,但是 map 不会出现(使用来自 github 的 gmaps.js)

JavaScript 范围

javascript - 如何通过将高度设置为百分比来在 div 上设置滚动

javascript - 在 JavaScript 中持久化变量而不是全局变量

javascript - 如何在谷歌地图 API 上按城市 + 邮政编码获取距离

javascript - 外部 API 的 CORS 问题 - 通过 PostMan 工作,但不能通过 Axios 进行 HTTP 请求

javascript - 使用 Angular require 输入来启用注册 : require input's/validation

javascript - 谷歌地图API gm_bindings_未定义

jquery - 推迟谷歌地图初始化,直到显示引导选项卡后