Skip to content
Browse files

Merge pull request #3 from mammo/master

Google Maps v3 API for geolocation.html
  • Loading branch information...
2 parents 2b4e45b + 8af6b1f commit e72d325baf38f4978f42be41da81c061242f2c7d @jonathantneal jonathantneal committed Oct 5, 2011
Showing with 5 additions and 7 deletions.
  1. +5 −7 geolocation.html
View
12 geolocation.html
@@ -343,7 +343,7 @@ <h2 id=further-reading>Further Reading</h2>
<script src=j/gears_init.js></script>
<script src=j/geo.js></script>
<script src=j/dih5.js></script>
-<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAA9KK0oCozk3pdOlGYD6hrthR5pnyo8QWLgiiZq1vJ3YhZL8oiJBQk9j0jg4PxEDmO36mYgldwXseYGw"></script>
+<script src="http://maps.googleapis.com/maps/api/js?sensor=true"></script>
<script>
function supports(bool, suffix) {
var s = "Your browser ";
@@ -359,12 +359,10 @@ <h2 id=further-reading>Further Reading</h2>
}
function show_map(loc) {
$("#geo-wrapper").css({'width':'320px','height':'350px'});
- var map = new GMap2(document.getElementById("geo-wrapper"));
- var center = new GLatLng(loc.coords.latitude,loc.coords.longitude);
- map.setCenter(center, 14);
- map.addControl(new GSmallMapControl());
- map.addControl(new GMapTypeControl());
- map.addOverlay(new GMarker(center, {draggable: false, title: "You are here (more or less)"}));
+ var map = new google.maps.Map(document.getElementById("geo-wrapper"), {zoom: 14, mapTypeControl:true, zoomControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP});
+ var center = new google.maps.LatLng(loc.coords.latitude,loc.coords.longitude);
+ map.setCenter(center);
+ var marker = new google.maps.Marker({map: map, position: center, draggable: false, title: "You are here (more or less)"});
}
function show_map_error() {
$("#live-geolocation").html('Unable to determine your location.');

0 comments on commit e72d325

Please sign in to comment.
Something went wrong with that request. Please try again.