【问题标题】:Creating fancy info windows on google maps using the javascript api that looks like the google maps original使用看起来像谷歌地图原始的 javascript api 在谷歌地图上创建花哨的信息窗口
【发布时间】:2014-02-10 19:50:07
【问题描述】:

我一直在尝试创建精美的信息窗口,就像谷歌地图在他们的地图上一样。 是什么让它花哨? 1. 信息窗口的尖端又长又窄,从标记中出来看起来很光滑 2. 谷歌地图本身的信息窗口形状有阴影。

在 maps api 的文档中有官方信息窗口:

https://developers.google.com/maps/documentation/javascript/infowindows

但我也从实用程序库中找到了这个:

http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/examples/example.html

我是这样使用的:

var infoWindowHTML = get_movingInfoWindowHTML();
    context.bubble = new InfoBubble({
        content: infoWindowHTML,
        padding:5,
        borderColor: "#ccc",
        ShadowStyle:1,
        hideCloseButton:true,
        arrowSize:25,
        arrowStyle:1,
        arrowPosition:99,
        borderRadius:0,
        width:150,
        height:150
    });
    context.bubble.open(map,marker);

即使在信息气泡的示例中,他们用阴影显示它,但目前阴影不适用于我使用此代码。

但更大的问题是气泡信息看起来不像谷歌地图使用的那样光滑和花哨,箭头粗而不光滑。

我怎样才能得到像谷歌地图上的结果? 谢谢!

【问题讨论】:

    标签: javascript google-maps google-maps-api-3


    【解决方案1】:

    尝试使用信息框。这些功能与 infowindows 一样,并且更加可定制。 infoBox reference

    【讨论】:

      猜你喜欢
      • 2016-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-09
      • 2013-07-28
      • 2013-02-11
      • 2013-12-16
      相关资源
      最近更新 更多