Answers for "how to embed google map in html"

0

how to add google map in html

<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>
Posted by: Guest on February-19-2022
-1

how to embed google map in html using iframe

Go to google maps
Select your location
Click on share
Go to the 'Embed a map' tab
Copy the code and paste it in your website's code
Posted by: Guest on June-08-2021

Browse Popular Code Answers by Language