Created
September 26, 2020 15:10
-
-
Save anjalbinayak/39896186d4dabe436721c7532f6ae85c to your computer and use it in GitHub Desktop.
This gist just serves as a part of a code in medium article
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Map Embed</title> | |
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script> | |
<script | |
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&libraries=&v=weekly" | |
defer | |
></script> | |
<link rel="stylesheet" type="text/css" href="./style.css" /> | |
<script src="./simple-map-embed.js"></script> | |
</head> | |
<body> | |
<div id="map"></div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let map; | |
function initMap() { | |
map = new google.maps.Map(document.getElementById("map"), { | |
center: { lat: -34.397, lng: 150.644 }, | |
zoom: 8, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment