English 中文(简体)
Google 地图版本变换冻结网站- v3
原标题:Google maps version change freezes website - v3

<强度 > 编辑 : 网站正在再次正常工作。 我删除了以下评论者标注的代码线( 引用一个不存在的 div ), 实验了版本语法, 并且按照我内容框函数中参数的顺序) 。 还删除了语法, 并添加了一条代码线, 将函数从 DOM 调出。 多亏了所有评论者。 以上内容的一些组合起作用了 。 干杯, Cheryl)

注:我昨天在主要论坛提出这个问题 -- -- 没有意识到谷歌地图用户组在Stack overflow中有自己的标记。这里是Q:

我有一个应用程序,它使用谷歌地图 API v. 3 和从数据库访问内容, 显示在 Google s infowindows 和 侧边栏中。 见主文件的代码 : www.corkmemorymap.org 。

我的问题是,当用户点击标记停止工作时, 侧边栏中的内容会定期生成功能。 您仍然可以通过页面顶部的话题搜索访问侧边栏内容( 与 jquery 一起完成, 而不是连接到谷歌或标记), 但我无法通过标记获取侧边栏内容 。

上次发生这种情况时,这是一个版本问题。我在脚本代码中添加了一个版本,称为API, 一切都很好。

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.9&sensor=false"></script>

这一次,我认为这是同样的事情,就像我看到谷歌破坏了那个版本一样。所以我更新了新版本,然后... nada。所以现在我被打断了。我试图搞乱不同的版本,或者没有版本,然后让它再次短暂运作。那么,就不要了。有没有其他人有这样的经验?版本是否不稳定?有什么建议吗?

如果有帮助, 这就是调用侧边栏内容变化的函数 :

function contentBox(marker, map, sidebar, winHtml, infoWindow) {
    google.maps.event.addListener(marker,  click , function() {
        document.getElementById( sidebar ).innerHTML=winHtml;
        infoWindow.close(map, marker);
    });
}

哦,还有一件事,我不使用 API 键,因为这是一个非营利网站。我是否需要 API 键(它自2011年12月以来就一直没有了)?它们有什么棘手之处吗?

敬重,谢丽尔

最佳回答

这个问题在上文的评论中得到了回答。 有两个问题:我需要更新标题中引用的Google Maps API I的版本,我有一个代码线指一个不存在的代号。 我更新了前一个代号,删除了后一个代号。多亏了答复者。

问题回答

暂无回答




相关问题
How to decide the current point reach on google map?

How to decide the current point reach on google map? I have a list of points (pickup points) of a route that I want to show in my google map with polyline. Now i have to get the current location of ...

Topographical or relief data in Map APIs

I was wondering if anyone knew of any map APIs that offer topographical or relief data? I ve had a quick look at Google and Bing APIs, but could find nothing there. Google allow you to view a map as ...

Using maps on Windows Mobile

I m experimenting with maps on different mobile platforms. Getting Google Maps to work on Android was easy, following this tutorial. Getting the same to work on Windows Mobile is a different matter. ...

Adding a custom icon to a google map

I need a hand adding a custom icon to some Google Maps javascript. Code below for your reference: function populateMap() { var map = new GMap2(document.getElementById("map")); map.setCenter(new ...

RSS to KML Overlay

I m want to display my blog as a Google Map overlay (each post contains geotags). How can I dynamically create a KML overlay from an RSS? Or better, how can I create a loop (PHP) that would display ...

开放街道地图管理员

我需要开放Street的标记管理员。 地图,如山角地图。

热门标签