Javascript 带有谷歌地图 api v3 的自定义信息窗口框?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5444328/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
custom infowindow box with google maps api v3?
提问by Phil
I am trying to have a custom infowindow box in the google maps api. If that is not possible, I want to at least remove the rounded corners for the popup. Is this possible?
我正在尝试在 google maps api 中有一个自定义的 infowindow 框。如果这是不可能的,我想至少删除弹出窗口的圆角。这可能吗?
I tried useing
我尝试使用
InfoWindow({
content: "<h3>" + title + "</h3>",
boxStyle: { styles }
})
but boxStyle does nothing.
但 boxStyle 什么也不做。
回答by Michal
You can use an InfoBox class from Google Maps Utility Library. Or you can write a custom class overriding the default styling
您可以使用Google Maps Utility Library 中的 InfoBox 类。或者您可以编写一个覆盖默认样式的自定义类