Marker Manager doesnt work in Maps API 3.10

1.6k Views Asked by At

Marker Manager doesn't work on Google Maps API v3.10 and in current.

If you check it's example page http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/examples/google_northamerica_offices.html you'll see that map is not changed by zoom control, and there is no any marker. And you will see the following JavaScript error:

Uncaught TypeError: Cannot call method 'substr' of undefined

But if you load Maps API for version v=3.9, then all will be OK (I checked it on my test page).

I think there is a bug in manager's script file.

1

There are 1 best solutions below

2
Emil Rasmussen On

Marker Manager is not compatible with Google Maps API v 3.10 and above. Either specify the version when including Google Maps or change line 98 in markermanager.js (version 1.0) from

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

to

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