Last active
December 23, 2015 00:01
-
-
Save jorgechavz/efdf7a1ea0845d6beb03 to your computer and use it in GitHub Desktop.
Build google map from JavaScript (no iframe)
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
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBQu1pFTW2ni8iwdASum9iueNpCRoG3HCY&sensor=false"></script> | |
<script> | |
var mapa = document.getElementById("mapa-frame"); | |
if(mapa){ | |
var latlong=new google.maps.LatLng("28.6525409", "-106.1142289"), | |
mapOptions = { | |
center: latlong, | |
zoom: 14, | |
scrollwheel: false, | |
navigationControl: false, | |
mapTypeId: google.maps.MapTypeId.ROADMAP, | |
mapTypeControl: false | |
}, | |
map = new google.maps.Map(mapa,mapOptions); | |
map.set('styles', [ | |
{ | |
stylers: [ | |
{ hue: "#A98182" }, | |
{ saturation: -20 } | |
] | |
} | |
]); | |
marker = new google.maps.Marker({ | |
position: latlong, | |
map: map | |
}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment