Created
June 17, 2013 13:04
-
-
Save Quinten/5796705 to your computer and use it in GitHub Desktop.
implement a google map (js) fast
This file contains hidden or 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
<div class="contact-map"> | |
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=nl"></script> | |
<script type="text/javascript">// <![CDATA[ | |
function initialize() { | |
var myLatlng = new google.maps.LatLng(51.2074746, 3.2263338000000203); | |
var mapOptions = { | |
zoom: 16, | |
center: myLatlng, | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
} | |
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); | |
var contentString = '<div id="content">'+ | |
'<div id="siteNotice">'+ | |
'</div>'+ | |
'<h1 id="firstHeading" class="firstHeading">Mille fleurs</h1>'+ | |
'<div id="bodyContent">'+ | |
'<p>Wollestraat 33<br />8000 Brugge</p>'+ | |
'</div>'+ | |
'</div>'; | |
var infowindow = new google.maps.InfoWindow({ | |
content: contentString | |
}); | |
var marker = new google.maps.Marker({ | |
position: myLatlng, | |
map: map, | |
title: 'Mille Fleurs' | |
}); | |
google.maps.event.addListener(marker, 'click', function() { | |
infowindow.open(map,marker); | |
}); | |
} | |
google.maps.event.addDomListener(window, 'load', initialize); | |
// ]]></script> | |
<div id="map-canvas" style="width: 470px; height: 350px;"> </div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment