如何实现 google 地图 yelp.com 风格?
我有多个位置(每页 20 多个)需要映射到一张地图上。 我想单击非动态生成的位置链接(出于 SEO 目的),该链接将打开地图上相应标记的信息窗口。
行为应模仿 http://maptheburg.com/ - 但此地图具有动态生成的侧边栏链接。
Yelp.com 是我迄今为止见过的唯一能够实施 Google 的网站带有不显眼的 JavaScript 的地图 API。
I have multiple locations (20+ per page) that need to be mapped on a single map. I would like to click on a link for the location that is not dynamically generated (for SEO purposes) that would open the info window for the respective marker on the map.
Behavior should mimic http://maptheburg.com/ - but this map has the sidebar links dynamically generated.
Yelp.com is the only site I have seen so far that manages to implement the Google Maps API with unobtrusive JavaScript.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不完全确定 yelp 实现是什么,但如果您追求的是不显眼的 JavaScript 映射,那么您唯一可行的选择是提供静态图像,而不是 JavaScript 不可用的交互式地图。
快速浏览此技术。
您可以在此处 HTH
I'm not entirely sure what the yelp implementation is but if it's unobtrusive JavaScript mapping you're after then your only feasible option is to deliver a static image rather than an interactive map where JavaScript is unavailable.
A quick walk through of this technique can be found here
HTH.
Yelp.com 有自己的 JavaScript 库,它与 Google Map 的 JavaScript API 进行交互/使用地图。 您可能想先看看那里。
可能还想查看 PdMarker 以获取高级 Google 地图标记。
如果我没记错的话,Yelp 采用了一种开源标记实现,并对其进行了修改以供自己使用。
Yelp.com has it's own JavaScript library which is interacting/using Google Map's JavaScript API for maps. You might want to start by peeking in there.
Might want to also check out PdMarker for advanced Google Maps markers.
If I remember right, Yelp took one of the open-source markers implementations and modified it for their own uses.