Skip to content

Instantly share code, notes, and snippets.

@jorgechavz jorgechavz/map.html
Last active Dec 23, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.