
212 ◾ PhoneGap Build
Listing 8.8 Code Written in the index.html File
<!DOCTYPE HTML>
<html>
<head>
<title>PhoneGap Application</title>
<script type = "text/javascript" charset = "utf-8" src = "cordova-2.3.0.js">
</script>
<script type = "text/javascript" src = "http://maps.google.com/maps/api/
js?sensor = false"></script>
<link href = "http://code.google.com/apis/maps/documentation/javascript/
examples/default.css" rel = "stylesheet" type = "text/css"/>
<script type = "text/javascript">
function onBodyLoad() {
document.addEventListener("deviceready", PhonegapLoaded, false);
}
function PhonegapLoaded(){
navigator.geolocation.getCurrentPosition(onSuccess, ...