Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
329 views
in Technique[技术] by (71.8m points)

javascript - Google地图:如何创建自定义InfoWindow?(Google Maps: How to create a custom InfoWindow?)

The default Google Maps InfoWindow for a map marker is very round.

(地图标记的默认Google Maps InfoWindow非常圆。)

How do I create a custom InfoWindow with square corners?

(如何创建带方角的自定义InfoWindow?)

  ask by SarahBeale translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

(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 .

(你可以在Dive Seven上看到这个InfoBubble的定制版本,这是一个在线水肺潜水记录网站 。)

It looks like this:

(它看起来像这样:)

image


Google provide a demo that shows how to implement a custom info window.

(Google 提供了演示如何实现自定义信息窗口的演示 。)

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.

(但是,它们看起来并不像屏幕截图中的示例那么好。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...