I get two error in my console when using google map api :
1-Uncaught ReferenceError: initialize is not defined
2-You have included the Google Maps API multiple times on this page. This may cause unexpected errors any help please ?
JS
<script type="text/javascript">
function initialize() {
var myLatLng = {lat: 42.52501, lng: 2.938979};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 12,
center: myLatLng,
scrollwheel: false,
draggable:true,
});
var image='logo.png';
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
icon:image
});
}
</script>
HEADER.PHP
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key='YOUR API KEY HERE'"></script>
<script src='https://maps.googleapis.com/maps/api/js?v=3.exp'></script>
<body onload="initialize()";></body>