Google地图:如何创建自定义InfoWindow? [英] Google Maps: How to create a custom InfoWindow?

查看:139
本文介绍了Google地图:如何创建自定义InfoWindow?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

地图标记的默认Google地图信息窗口非常圆。如何创建带有方角的自定义InfoWindow?

解决方案

编辑似乎是最好的选择:



,演示如何实现自定义信息窗口。






还有一些更多的例子此处。它们绝对不像你的截图中的例子那么漂亮。


The default Google Maps InfoWindow for a map marker is very round. How do I create a custom InfoWindow with square corners?

解决方案

EDIT After some hunting around, this seems to be the best option:

https://github.com/googlemaps/js-info-bubble/blob/gh-pages/examples/example.html

You can see a customised version of this InfoBubble that I used on Dive Seven, a website for online scuba dive logging. It looks like this:


Google provide a demo that shows how to implement a custom info window. It requires a fair amount of code, but seems to be pretty straightforward.


There are some more examples here. They definitely don't look as nice as the example in your screenshot, however.

这篇关于Google地图:如何创建自定义InfoWindow?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆