Google Maps API V2:如何添加行为类似于默认谷歌地图标记的标记
我想知道,使用免费版本......我可以绘制更多默认标记(来自maps.google.com)。点击后,会提供输入行车路线和其他从谷歌企业搜索中提取的信息的选项(例如:评论)。
I was wondering, with the free version... Can I plot the more default markers (from maps.google.com). The kind which when clicked, offer the option to enter driving directions and other tid-bits pulled from google's search of a business (eg: reviews).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
诸如行车路线之类的选项可以通过添加到信息窗口的链接来实现,该信息窗口调用执行 GDirections 调用的代码部分。
如果您有一些评论,那么 Maps API 会为您提供在信息窗口中显示它们所需的工具。
您需要分别对您想要的其他每个花絮进行编码。几乎所有这些都可以通过足够的努力来实现,但没有捷径。请注意。 Google 正在不断改进maps.google.com。如果您让自己的网站与今天的maps.google.com 完全一样,您很可能会发现几个月后再次查看时会发现存在显着差异。
如果您想要的功能与 Google 完全一样,那么您可以考虑使用 Google 地图本身或嵌入式 Google 地图,而不是使用 API。
Options like driving directions can be achieved by adding links to the infowindow that call the part of your code that does GDirections calls.
If you've got some reviews, then the Maps API provides you with the tools necessary to display them in the infowindow.
You need to code each of the other tid-bits you want individually. Almost all of them can be achieved with sufficient effort, but there's no shortcut. Be warned. Google are consstantly improving maps.google.com. If you get your site to work exactly like maps.google.com today, you may well find that when you look again a few months later, there are significant differences.
If you want something that does the whole lot exactly like Google, then you might consider using Google Maps itself, or an embedded Google Map, rather than using the API.