Sunday 18 August 2019

Adding google map in html

Google Map

 <!DOCTYPE html>
<html>
<head>
<script src="https://maps.googleapis.com/maps/api/js"></script>
</head>
<body>

<h1>My First Google Map</h1>

<div id="map" style="width:400px;height:400px"></div>

<script>
var mapCanvas = document.getElementById("map");
var mapOptions = {
    center: new google.maps.LatLng(51.5, -0.2), zoom: 10
}
var map = new google.maps.Map(mapCanvas, mapOptions);
</script>

</body>
</html>