5

标记管理器不适用于 Google Maps API v3.10 和当前版本。

如果您检查它的示例页面 http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/examples/google_northamerica_offices.html 您会看到地图没有被缩放控制改变,并且没有任何标记。您将看到以下 JavaScript 错误:

未捕获的类型错误:无法调用未定义的方法“substr”

但是,如果您为 version 加载 Maps API v=3.9,那么一切都会好起来的(我在测试页面上检查过)。

我认为经理的脚本文件中有一个错误。

4

1 回答 1

1

标记管理器与 Google Maps API v 3.10 及更高版本不兼容。在包含 Google Maps 时指定版本或将 markermanager.js(版本 1.0)中的第 98 行从

if (typeof map.mapTypes.get(sType) === 'object' && typeof map.mapTypes.get(sType).maxZoom === 'number') {

if (sType != "constructor" && typeof map.mapTypes.get(sType) === 'object' && typeof map.mapTypes.get(sType).maxZoom === 'number') {
于 2012-11-21T10:31:25.243 回答