Google 地图信息框 - 它可以存在于地图容器之外吗?
我有谷歌地图,确实是标准票价。它很小,而且标记上的弹出信息窗口很大,所以我的问题是,这些弹出窗口是否有可能溢出地图边缘并到达实际网站? (参见狡猾的 Photoshop 作业示例)。
替代文字 http://dotcafedesigns.com/stuff/box-breakout.png
谢谢!
I've got a Google map, standard fare really. It's quite small though and the popup info windows on the markers are quite big, so my question is, is it possible for these popup windows to spill out the edge of the map and on to the actual website? (See dodgy photoshop job for an example).
alt text http://dotcafedesigns.com/stuff/box-breakout.png
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
不是解决方案,而是更多背景信息...
曾经有一个名为 BPWindow 的商业库。
然而,由于 GMAP2 的更改,它似乎变得不起作用,并且似乎不再被列为库。您可能需要联系 BitPerfect 看看发生了什么。
http://www.gmaptools.com/
我还没有找到实现此目的的方法,但很乐意如果您在搜索中找到了一些东西,请听听它。我还没有时间查看 GMAP3 来看看是否有任何更改可以支持这一点。这可能也值得一看。
Not a solution but some more background...
There used to be a commercial library available called BPWindow.
However, it appears that it was made non-functional by changes to GMAP2 and doesn't appear to be listed as a library any longer. You might want to contact BitPerfect and see what happened.
http://www.gmaptools.com/
I have not found a way to accomplish this but would love to hear about it if you find something in your search. I haven't had time to look at GMAP3 to see if there are any changes that would support this. That might also be worth a look.
狡猾的 Photoshop 示例是获得您想要的内容的绝佳方法。我总是发现图片对这类事情很有帮助!
来自优秀的 econym 地图教程网站,它看起来像 bpWindow 就是您想要的
但是,我无法让这些示例发挥作用......但希望它可以在某种程度上帮助您!
dodgy photoshop example is an excellent way to get accross what you want. I always find pictures helpful for this sort of thing!
From the excellent econym map tutorials site, it looks like bpWindow is what you're after
However, I cant quite get the examples to work... but hopefully it may help you in some way!
MapTools 不超出谷歌地图边界/容器。
Trulia.com 似乎已经找到了一种让 InfoBox 存在于地图容器之外的方法,但我不确定如何他们就是东这个。
MapTools does NOT exceeds the google-maps border/container.
Trulia.com seems to have figured out a way to have an InfoBox exist outside the map container but I'm not sure how they are dong this.
您实际上可以使用自己的工具提示框架,唯一棘手的事情是弄清楚如何将工具提示元素定位在标记的位置。
这是我的解决方案:
fromLatLngToContainerPixel
的方法来执行此操作。不幸的是,这个功能并不容易使用。您的标记必须是OverlayView
的子类。我写了指南关于如何做到这一点。这可能会破坏交易,但实际上并不那么难。fromLatLngToContainerPixel
返回相对于其容器的顶部/左侧。如果您的工具提示标记也在同一个“定位”容器内,那么您可以按原样使用该值,然后就完成了。否则,您必须将其转换为与工具提示相同的相对坐标。这篇quirksmode 文章可以为您提供指导。就是这样!
You can actually use your own tooltip framework and the only tricky thing is figuring out how to position the tooltip element at the marker's position.
Here's my solution:
fromLatLngToContainerPixel
. Unfortunately, this function is not easily accessible. Your marker will have to subclassOverlayView
. I've written a guide on how to do this. This might be a dealbreaker, but it's really not that hard.fromLatLngToContainerPixel
returns top/left relative to its container. If your tooltip markup is also within the same "positioned" container, then you can use the value as is and you are done. Otherwise, you'll have to convert it to the same relative coordinate as your tooltip. This quirksmode article can guide you for that.That's it!
昨天刚开始工作。这并不容易,但如果您尝试一下标记的创建方式并引入一点 jQuery,那就不会太难了。 阅读此处。
Just got it working yesterday. Wasn't that easy, but if you play around with the way how markers are created and pull in a little jQuery it's not too hard. Read here.