Dmi*_*huk 5 google-maps google-maps-api-3 markermanager
标记管理器无法在Google Maps API v3.10和当前版本中使用.
如果您查看它的示例页面 http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/examples/google_northamerica_offices.html, 您会看到地图未通过缩放控制更改,而且没有任何标记.您将看到以下JavaScript错误:
未捕获的TypeError:无法调用未定义的方法'substr'
但是如果您为版本加载Maps API v=3.9,那么一切都会好的(我在我的测试页面上检查过它).
我认为经理的脚本文件中有一个错误.
标记管理器与 Google Maps API v 3.10 及更高版本不兼容。包含 Google 地图时指定版本,或将markermanager.js(版本 1.0)中的第 98 行更改为
if (typeof map.mapTypes.get(sType) === 'object' && typeof map.mapTypes.get(sType).maxZoom === 'number') {
Run Code Online (Sandbox Code Playgroud)
到
if (sType != "constructor" && typeof map.mapTypes.get(sType) === 'object' && typeof map.mapTypes.get(sType).maxZoom === 'number') {
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1558 次 |
| 最近记录: |