Google Maps
This section will guide you to setup basic google maps. for more information checkout Google Developer API.
Google Maps will not work without API Key. please create one before implementing maps
Add Google maps JavaScript
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
async defer></script>
Add the markup
<div id="map" style="height:450px;width:100%"></div>
Initialize the map
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -34.397, lng: 150.644},
zoom: 8
});
}
Last modified 5yr ago