litesoft
Diff Revisions
663
vs
664
for /trunk/GWT_Sandbox/PhonegapHelloWorld/assets/www/index.html
|
@@ -1,4 +1,4 @@ |
1 |
|
- |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
1 |
+ |
<!doctype html> |
2 |
2 |
|
<html> |
3 |
3 |
|
<head> |
4 |
4 |
|
<meta name="viewport" content="width=device-width; height=device-height; user-scalable=no" /> |
|
@@ -6,34 +6,15 @@ |
6 |
6 |
|
<title>Beer Me</title> |
7 |
7 |
|
<!--<link rel="stylesheet" href="/master.css" type="text/css" media="screen" />--> |
8 |
8 |
|
<script type="text/javascript" src="cordova-1.7.0.js"></script> |
9 |
|
- |
<script type="text/javascript"> |
10 |
|
- |
function loader() { |
11 |
|
- |
var state = document.readyState; |
12 |
|
- |
if (state == 'loaded' || state == 'complete') { |
13 |
|
- |
run(); |
14 |
|
- |
} else { |
15 |
|
- |
if (navigator.userAgent.indexOf('Browzr') > -1) { |
16 |
|
- |
setTimeout(run, 250); |
17 |
|
- |
} else { |
18 |
|
- |
document.addEventListener('deviceready',run,false); |
19 |
|
- |
} |
20 |
|
- |
} |
21 |
|
- |
} |
22 |
|
- |
function run() { |
23 |
|
- |
var win = function(position) { // Grab coordinates object from the Position object passed into success callback. |
24 |
|
- |
var coords = position.coords; |
25 |
|
- |
// Call for static google maps data - make sure you use your own Google Maps API key! |
26 |
|
- |
var url = "http://maps.google.com/maps/api/staticmap?center=" + coords.latitude + "," + coords.longitude + "&zoom=13&size=320x480&maptype=roadmap&key=MyGoogleMapsAPIKey&sensor=true"; |
27 |
|
- |
document.getElementById('map').setAttribute('src',url); |
28 |
|
- |
}; |
29 |
|
- |
var fail = function(e) { |
30 |
|
- |
alert('Can\'t retrieve position.\nError: ' + e); |
31 |
|
- |
}; |
32 |
|
- |
navigator.geolocation.getCurrentPosition(win, fail); |
33 |
|
- |
} |
34 |
|
- |
</script> |
|
9 |
+ |
<script type="text/javascript" language="javascript" src="Hello/Hello.nocache.js"></script> |
35 |
10 |
|
</head> |
36 |
|
- |
<body onload="loader();"> |
37 |
|
- |
<img id="map" /> |
|
11 |
+ |
<body bgcolor="white"> |
|
12 |
+ |
<!--<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>--> |
|
13 |
+ |
<noscript> |
|
14 |
+ |
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color:white; border: 1px solid red; padding: 4px; font-family: sans-serif"> |
|
15 |
+ |
Your web browser must have JavaScript enabled |
|
16 |
+ |
in order for this application to display correctly. |
|
17 |
+ |
</div> |
|
18 |
+ |
</noscript> |
38 |
19 |
|
</body> |
39 |
20 |
|
</html> |