Permalink
Browse files

Upgraded detect.html to Google Maps v3 as it had a broken v2 API key …

…on diveintohtml5.info and v3 doesn't require a key.
  • Loading branch information...
1 parent 21c9303 commit 837e2d0fa566471ad99d7edf24ec80af941d7629 @mammo mammo committed Oct 5, 2011
Showing with 5 additions and 7 deletions.
  1. +5 −7 detect.html
View
@@ -598,7 +598,7 @@ <h4>Did You Know?</h4>
<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 type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true"></script>
<script>
function supports(bool, suffix) {
var s = "Your browser ";
@@ -623,12 +623,10 @@ <h4>Did You Know?</h4>
}
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 837e2d0

Please sign in to comment.