Google Map Getting "initmap Is Not A Function" In Chrome Browser Only
Google map getting 'initMap is not a function' in chrome browser only. In other browsers (Firefox, IE, etc ) are working fine. I am using the Google MAP API for location search and
Solution 1:
The script should be on the below section. It can't find the "map" div hence creates a problem that leads to "initMap is not a function" problem.
<html><head></head><body><div><divid="map"style="width: 500px; height: 400px;"></div></div><script>// scripts goes here</script><scriptasyncdefersrc="https://maps.googleapis.com/maps/api/js?key={{KEY}}&callback=initMap"></script></body></html>
Solution 2:
use this
<script
src="http://maps.googleapis.com/maps/api/js?v=3&sensor=false"></script>
$(document).ready(function() {
...
google.maps.event.addDomListener(window, 'load', initMap);
});
Post a Comment for "Google Map Getting "initmap Is Not A Function" In Chrome Browser Only"