Skip to content

Instantly share code, notes, and snippets.

@jorgechavz
Last active December 23, 2015 00:01
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 jorgechavz/efdf7a1ea0845d6beb03 to your computer and use it in GitHub Desktop.
Save jorgechavz/efdf7a1ea0845d6beb03 to your computer and use it in GitHub Desktop.
Build google map from JavaScript (no iframe)
<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