Take the 2-minute tour ×

I try to draw a very large dataset on google map (2500+ rectangles). The rendering of the rectangles take more than 5 secs. The whole page just stuck for the 5 secs, so I am thinking about adding a loading indicator or progress bar during the rendering.

To do this, I need to trap events of rending (start,finish rendering).

I checked the google maps Api documentation, did not find anything useful. Just what to know whether there is some work around or something I miss in the api doc that can help me to trap rendering events.

share|improve this question
What do you mean by trap events? –  Halcyon Apr 16 '13 at 13:46
I did not realise I invented the term:( What I mean is to get the event when it is fired. something like addListener('click', function(e){ //do things}) –  GingerJim Apr 16 '13 at 14:29

2 Answers 2

up vote 0 down vote accepted

As of Google Maps v3.14 the answer is no. There's no such event to listen for in the API. If you dug through the code long enough you might be able to find a hack, but given that you're in control of the rectangles you're drawing and you have a count of them, why not iterate the progress bar as you add them? Individually they will render very quickly so whether you iterate the progress before or after each is added to the map should make no difference to the user, despite the fact that it feels like the wrong order to the developer.

share|improve this answer

This gives an overview of all the events in GMapsV3 http://gmaps-samples-v3.googlecode.com/svn/trunk/map_events/map_events.html

Check if the events you need are there.

share|improve this answer
This example is cool. but I need a event indicating the finish of drawing of overlays. seems it is not there. –  GingerJim Apr 16 '13 at 14:50
But you're adding the markers yourself .. you know when you're done. Markers have their own set of events developers.google.com/maps/documentation/javascript/… but there is no render (probably because that is the first thing it does). –  Halcyon Apr 16 '13 at 14:53
Good point, I should check whether the rendering is sync or async –  GingerJim Apr 16 '13 at 15:11
It is async. I'm running into the same problem. –  joelmdev Nov 1 '13 at 14:29

Your Answer


