Google Maps Api Shows Grey Map
I'm trying to integrate Google Maps Javascript API in my wordpress website. I created an API key, and I added a pure html code block in my page. Before it worked perfectly, but no
Solution 1:
<script>
var map;
functioninitMap() {
map = new google.maps.Map(document.getElementById('googlemaps'), {
center: {lat: 51.341667, lng: 4.21444},
zoom: 8,
backgroundColor: '#fffff',
});
}
</script>
<scriptsrc="https://maps.googleapis.com/maps/api/js?key=YOUR-API-KEY&callback=initMap"asyncdefer></script
<divid="googlemaps"></div>
Use backgroundColor property
Post a Comment for "Google Maps Api Shows Grey Map"