Skip to content

Commit

Permalink
Set default location when no GPS data exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
econpy committed Dec 31, 2013
1 parent 64b1c30 commit 7a93c81
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mapdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
$imapdata = implode(",\n ", $mapdata);

// Centering location for the map is the most recent location
$centerlat = $latlong[0]["latitude"];
$centerlong = $latlong[0]["longitude"];
if (isset($latlong[0])) {
$centerlat = $latlong[0]["latitude"];
$centerlong = $latlong[0]["longitude"];
}
else {
$centerlat = 38.5;
$centerlong = -98;
}
?>

0 comments on commit 7a93c81

Please sign in to comment.