Skip to content

Instantly share code, notes, and snippets.

@johhansantana
Created September 22, 2015 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johhansantana/136a1792ca7d5b9d9f94 to your computer and use it in GitHub Desktop.
Save johhansantana/136a1792ca7d5b9d9f94 to your computer and use it in GitHub Desktop.
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script>
function initialize() {
var myLatLng = {lat: 18.38162, lng: -66.133667};
var mapCanvas = document.getElementById('map');
var mapOptions = {
center: myLatLng,
zoom: 18,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!'
});
var map = new google.maps.Map(mapCanvas, mapOptions);
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment