Skip to content

Instantly share code, notes, and snippets.

@TravelTime-Frontend
Created February 21, 2023 08:08
Show Gist options
  • Save TravelTime-Frontend/095ef607037755d08e6d2ca736c1c45a to your computer and use it in GitHub Desktop.
Save TravelTime-Frontend/095ef607037755d08e6d2ca736c1c45a to your computer and use it in GitHub Desktop.
<body>
<div id='map'></div>
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY_GOES_HERE&callback=initMap" async
defer></script>
<script>
var map;
function initMap() {
var mapOpts = {
center: { lat: 51.5031653, lng: -0.1123051 },
zoom: 13,
};
map = new google.maps.Map(document.getElementById('map'), mapOpts);
var marker0 = new google.maps.Marker({
position: { lat: 51.5031653, lng: -0.1123051 },
map: map,
title: 'London Waterloo train station',
animation: google.maps.Animation.DROP
});
}
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment