javascript - Google Map - getting error while loading -


in website, when i'm doing design google map worked. after hosting shows error:

oops! went wrong"

i tried find solution , found api key missing. had created key personal gmail account , added footer place below.

<script async defer src="https://maps.googleapis.com/maps/api/js?key=my api key=google-map" type="text/javascript"></script>

but after didn't work. below google map script in html , js.

	//google map  	var latitude = $('#google-map').data('latitude')  	var longitude = $('#google-map').data('longitude')  	function initialize_map() {  		var mylatlng = new google.maps.latlng(latitude,longitude);  		var mapoptions = {  			zoom: 14,  			scrollwheel: false,  			center: mylatlng  		};  		var map = new google.maps.map(document.getelementbyid('google-map'), mapoptions);  		var contentstring = '';  		var infowindow = new google.maps.infowindow({  			content: '<div class="map-content"><ul class="address">' + $('.address').html() + '</ul></div>'  		});  		var marker = new google.maps.marker({  			position: mylatlng,  			map: map  		});  		google.maps.event.addlistener(marker, 'click', function() {  			infowindow.open(map,marker);  		});  	}  	google.maps.event.adddomlistener(window, 'load', initialize_map);  	  });
<div id="google-map" class="wow fadein" data-latitude="13.0938666" data-longitude="80.202357" data-wow-duration="1000ms" data-wow-delay="400ms"></div>


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -