Skip to content

Commit

Permalink
adding geolocation call
Browse files Browse the repository at this point in the history
  • Loading branch information
alunny committed Jun 17, 2010
1 parent 040db96 commit ff0a597
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function appInit() {
// "Show My Location" button (welcome view)
document.getElementById('map_button').ontouchend = function () {
displayView('map');
navigator.geolocation.getCurrentPosition(displayGoogleMap);
}

// "Settings" button (welcome view)
Expand Down Expand Up @@ -78,7 +79,9 @@ function isNetworkAvailable(status) {
}
}

function displayGoogleMap(location) {
// replacing the placeholder image with an image based on the given location
function displayGoogleMap(position) {
var location = "" + position.coords.latitude + "," + position.coords.longitude;
var mapType = document.getElementById('map_type').value;
var zoomLevel = document.getElementById('zoom_level').value;

Expand Down

0 comments on commit ff0a597

Please sign in to comment.