I'm creating a website for a local business and have added a Google Map to the page using the API v3. I've been working on reducing the page size and load time and have noticed that Google Maps is by the biggest and slowest thing on the page. I'm still running it locally and don't have anywhere to host it currently, so all my related code is below.
Without Maps (Emulation for HDPI screen):
- Server Requests: 14 - Data Transferred: 1.5mb - Load Time: 1.19s
With Maps (Emulation for HDPI screen):
- Server Requests: 82 - Data Transferred: 2.6mb - Load Time: 8.08s
I am using the Google Maps API v3 to create the map.
With the script:
Is there something I am doing wrong or could do better in order to increase the speed of this process? I would very much like to make the load time and size much faster. I think I've got it set up to be asynchronous so that the rest of the page will display and the user won't wait up to 10s for the page to show, but it's still pretty terrible.