【问题标题】:Google Maps API not working correctly under safariGoogle Maps API 在 safari 下无法正常工作
【发布时间】:2009-09-18 18:51:01
【问题描述】:

如果我这样做

map = new GMap2(document.getElementById(mapCanvas));
directions = new GDirections(map);
directions.load("SOME DIRECTIONS HERE");

在 Linux 上的 firefox 下它工作得很好! 在 safari 下,它显示地图,但不显示方向。

什么给了?

【问题讨论】:

  • 永远记得用var声明变量(map在这里没有声明)。

标签: javascript ajax google-maps safari


【解决方案1】:

想通了。

Google Maps API 不允许您在没有有效 API 密钥的情况下使用 GDirections。另外你不能使用ip,所以你必须使用DNS。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-10
    • 2015-06-02
    • 2013-08-10
    • 1970-01-01
    • 2017-12-25
    相关资源
    最近更新 更多