Click each option to reload the info window, and compare the elapsed time between the two APIs.
Mapplet code that calls the async Maps API functions can be slow and complex because of the individual callbacks for each async call. My new API makes it easy to combine several async calls into a single function call and callback. This can be many times faster, and your code is simpler too.
For example, this code using the standard API:
map.getSizeAsync( function( size ) { map.getZoomAsync( function( zoom ) { map.getBoundsAsync( function( bounds ) { map.getCenterAsync( function( center ) { // act on size, zoom, bounds, and center }); }); }); });
is reduced to:
GAsync( map, 'getSize', 'getZoom', 'getBounds', 'getCenter', function(size, zoom, bounds, center ) { // act on size, zoom, bounds, and center });
The API is a single function implemented on top of the existing mapplet API, so you can easily copy and paste it into your own mapplet code.
As a bonus, the same code will run unchanged in both a mapplet and a Maps API application!
Read the complete details.