0 votes
108 views
in HTML by (3.5k points)
edited

How to add google map in HTML?

1 Answer

0 votes
by (3.5k points)
edited

<!DOCTYPE html>

<html>

<body>

  

<h1> Google Map</h1>

  

<div id="googleMap" style="width:100%;height:400px;"></div>

  

<script>

function myMap() {

var mapProp= {

  center:new google.maps.LatLng(51.508742,-0.120850),

  zoom:5,

};

var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);

}

</script>

  

<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&callback=myMap"></script>

  

</body>

</html>

Related questions

0 votes
1 answer 94 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 141 views
asked Jun 12, 2023 in HTML by radhe (2.2k points)
0 votes
1 answer 106 views
asked Aug 19, 2022 in HTML by codelikepro (3.5k points)
0 votes
1 answer 110 views
asked Aug 19, 2022 in HTML by codelikepro (3.5k points)
0 votes
1 answer 117 views
asked Aug 19, 2022 in HTML by codelikepro (3.5k points)
0 votes
1 answer 111 views
asked Aug 19, 2022 in HTML by codelikepro (3.5k points)

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

561 users

...