Skip to content

Instantly share code, notes, and snippets.

@larswittenberg
Created June 27, 2012 09:30
Show Gist options
  • Save larswittenberg/3002886 to your computer and use it in GitHub Desktop.
Save larswittenberg/3002886 to your computer and use it in GitHub Desktop.
Google Maps
<div id="map">
<span class="loading">Karte wird geladen</span>
</div>
{include file="includes/footer.tpl" maps=true}
// Kontakt > Google Maps
if($('#map').length > 0){
var myLatlng = new google.maps.LatLng(XXX);
var map = new google.maps.Map($('#map')[0],{
zoom: 12,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
streetViewControl: false,
mapTypeControl: false,
scrollwheel: false,
navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL }
});
var marker = new google.maps.Marker({
position: myLatlng,
map: map
});
}
#map {width: 100%; height: 500px;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment