Hi. You could keep an array of requested tiles - each time your getTileUrl() method is called it add's a reference to the requested tile to the array.
Then you can add an event listener to the tile image listening for the 'onload' event. The event listener can remove the reference to the tile from the array once it has loaded and if the array length is now zero then all requested tiles have been loaded. Martin. On Sep 8, 2:27 am, millz <[email protected]> wrote: > Hi, > > I'm working with the Google Maps v3 API, and I have a custom overlay layer > based on the ImageMapType class. I would like to show a loading indicator of > some sort while the overlay's tiles are loading, but I don't see any way to > know when they are finished. > > The code to create the overlay looks similar to the following: > > var myOverlay = new google.maps.ImageMapType({ > getTileUrl: myGetTileUrl, > tileSize: new google.maps.Size(256, 256), > isPng: true}); > > myMap.overlayMapTypes.push(myOverlay); > > The above works just fine, and the overlay successfully loads; it just seems > that no events are emitted by the map to indicate anything about the > ImageMapType overlay's status. I would expect the map to at least emit an > "idle" event when the tiles are finished loading, but as far as I can tell > it does not. > > How may I know when the ImageMapType overlay is finished loading? > > (I posted the same question on > SO:http://stackoverflow.com/questions/7341769/google-maps-v3-how-to-tell.... > If I get an answer in one place I'll make sure to copy it to the other.) > > Thanks! > > Regards, > Dave -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
