Speed ​​up Google map downloads

I am trying to speed up my web page, and one thing that slows it down is my google map. Currently, I configured it like this:

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=key_goes_here&amp;sensor=false"></script> <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/src/infobox.js"></script> 

and in my document. already script:

 google.maps.event.addDomListener(window, 'load', initialize); 

Is there an alternative to this, I tried asynchronous loading, but I could not get it to work with infoboxes, any help would be greatly appreciated :)

+4
source share
3 answers

You can download the map asynchronously: see https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simple-async

If the static map does this, you can use this. Once users need a complete map, you can download it then.

If you do not need Infobox.js, uninstall it. If you still need to download the packaged version that is smaller (infobox_packed.js).

Last but not least, how do you load a webpage into an assignment profiler, such as google chromes.

+1
source

You can speed things up if you add script tags at the bottom of the document or use a javascript download library like HeadJS .

0
source

You can load the Google APIs asynchronously, and after that you can create a custom event that indicates when the map loading process is complete. You can use a photo with a map, and when the event is triggered, hide the photo and you will have a map without the “slow load effect”.

0
source

All Articles