this.getProjection() error in MarkerManager

1,123 views
Skip to first unread message

ebakunin

unread,
Jun 30, 2010, 3:02:48 PM6/30/10
to Google Maps JavaScript API v3
Hello,

I'm unsure if this is the best place to post this question, but here
it goes:

I'm using the latest version of MarkerManager and I always get the
error, "this.getProjection() is undefined". This is true for both the
stable and development versions. I know this issue has been raised
before (http://groups.google.com/group/google-maps-js-api-v3/
browse_thread/thread/263b763b3a034bf1?pli=1) but it was not really
answered and I don't know if there's a bugtracking option for this
project. Can anyone offer more information? Thanks for the help.

William

unread,
Jun 30, 2010, 4:56:24 PM6/30/10
to Google Maps JavaScript API v3
the MarkerManager is ready for use when it raises the 'loaded' event.
The "getProjection()" error is likely to happen when you use the
manager before it is 'loaded'. Therefore a callback function is
required for loading markers into the manager:

mgr = new MarkerManager(map);
google.maps.event.addListener(mgr, 'loaded', function() {
// load markers here
});

see the Weather Map example:
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/docs/examples.html

...

ebakunin

unread,
Jun 30, 2010, 6:33:07 PM6/30/10
to Google Maps JavaScript API v3
Works great! Thanks for the explanation.
> see the Weather Map example:http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerm...
>
> ...
Reply all
Reply to author
Forward
0 new messages