Issue with Google Maps API in External JS file
I have put my script in the script tag and the picture loads. However in the js file the the image is blank.
See my code
- function initMap() {
- var location = {lat: 61.109, lng: 22.100};
- var map = new google.maps.Map(document.getElementById('map'), {
- zoom: 8,
- center: location
- });
- var marker = new google.maps.Marker({
- position: location,
- map: map
- });
- marker.set(map);
- }
- initMap()