I am using Google Maps API to display a map on a certain page.
Problem is that the file http://maps.google.com/maps?file=api.....
sometimes happens to load very slow - decreasing the page's performance, because the rest of the JavaScript is first loaded on document ready, which its rarely reaches - because the browser locks up waiting for the file from Google.
I have tried to move the JavaScript file from the <head>
tag to under my content. But the rest of the JavaScript is never fired because the browser waits for the file from Google.
Is there a way around this, or have anyone else experienced same problem? It began recently, and I have no idea why.
This is my code, if anyone is interested:
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=true&key=ABQIAAAAa24xicak8_ghHX58i7La7hRFh9iM79SNC94rOejOtdMRvQmJiBS6Uv5F_1BNSh9ZuSzFXyekHISgew"> </script>
<script type="text/javascript" src="/js/maps.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// Google Maps
initialize();
// Other JavaScript comes here....
});
</script>
If I access
http://maps.google.com/maps?file=api&v=2&sensor=true&key=ABQIAAAAa24xicak8_ghHX58i7La7hRFh9iM79SNC94rOejOtdMRvQmJiBS6Uv5F_1BNSh9ZuSzFXyekHISgew
The file loads instantly.
Update Google Maps App Thus, updating the app should be your first step in fixing the slow Google Maps on your Android or iPhone. Open up the Play Store or App Store on your phone and search for Google Maps. Install any pending updates before running Google Maps again.
In case Google Maps takes too long to load, the first one to blame is the latest app update. As a result, you just need to uninstall the most recent version installed on the device, and going back to the original app version is one easy way to do this.
Since Google Map APIs support both json and xml , it can be safely said they they are implemented in REST.
Customer can cache Geocoding API Place ID (place_id) values, in accordance with the Geocoding API Policies.
This is a rather old question now - the solution was to disable firebug (atleast for me).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With