parent
8eab89e5eb
commit
44a3a0f85c
|
@ -0,0 +1,87 @@
|
||||||
|
{
|
||||||
|
"name": "Compass",
|
||||||
|
"short_name": "Compass",
|
||||||
|
"author": "Keith Irwin",
|
||||||
|
"description": "Compass and GPS web app",
|
||||||
|
"homepage_url": "https://github.com/keith24/Compass",
|
||||||
|
|
||||||
|
"background_color": "black",
|
||||||
|
"display": "standalone",
|
||||||
|
"icons": [{
|
||||||
|
"src": "icons/apple-touch-icon-114x114.png",
|
||||||
|
"sizes": "114x114",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/apple-touch-icon-120x120.png",
|
||||||
|
"sizes": "120x120",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/apple-touch-icon-144x144.png",
|
||||||
|
"sizes": "144x144",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/apple-touch-icon-152x152.png",
|
||||||
|
"sizes": "152x152",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/apple-touch-icon-57x57.png",
|
||||||
|
"sizes": "57x57",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/apple-touch-icon-60x60.png",
|
||||||
|
"sizes": "60x60",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/apple-touch-icon-72x72.png",
|
||||||
|
"sizes": "72x72",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/apple-touch-icon-76x76.png",
|
||||||
|
"sizes": "76x76",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/favicon-128.png",
|
||||||
|
"sizes": "128x128",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/favicon-16x16.png",
|
||||||
|
"sizes": "16x16",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/favicon-196x196.png",
|
||||||
|
"sizes": "196x196",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/favicon-32x32.png",
|
||||||
|
"sizes": "32x32",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/favicon-96x96.png",
|
||||||
|
"sizes": "96x96",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/favicon.ico",
|
||||||
|
"sizes": "16x16 24x24 32x32 48x48 64x64",
|
||||||
|
"type": "image/ico"
|
||||||
|
}, {
|
||||||
|
"src": "icons/mstile-144x144.png",
|
||||||
|
"sizes": "144x144",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/mstile-150x150.png",
|
||||||
|
"sizes": "150x150",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/mstile-310x150.png",
|
||||||
|
"sizes": "310x150",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/mstile-310x310.png",
|
||||||
|
"sizes": "310x310",
|
||||||
|
"type": "image/png"
|
||||||
|
}, {
|
||||||
|
"src": "icons/mstile-70x70.png",
|
||||||
|
"sizes": "70x70",
|
||||||
|
"type": "image/png"
|
||||||
|
}]
|
||||||
|
}
|
10
script.js
10
script.js
|
@ -4,9 +4,13 @@ if (!navigator.geolocation){ $('#no-gps').show(); }
|
||||||
else {
|
else {
|
||||||
navigator.geolocation.watchPosition(
|
navigator.geolocation.watchPosition(
|
||||||
// success
|
// success
|
||||||
function(e) {
|
function(pos) {
|
||||||
$('#lat').text(e.coords.latitude);
|
var lat = pos.coords.latitude.toFixed(5);
|
||||||
$('#lon').text(e.coords.longitude);
|
var lon = pos.coords.longitude.toFixed(5);
|
||||||
|
lat = (lat.substring(0,1)=='-')? lat.substring(1)+' S' : lat+' N';
|
||||||
|
lon = (lon.substring(0,1)=='-')? lon.substring(1)+' E' : lon+' W';
|
||||||
|
$('#lat').text(lat);
|
||||||
|
$('#lon').text(lon);
|
||||||
},
|
},
|
||||||
// error
|
// error
|
||||||
function() {
|
function() {
|
||||||
|
|
11
style.css
11
style.css
|
@ -11,14 +11,23 @@ body {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 4vw;
|
padding: 4vw;
|
||||||
background-color: #111;
|
background-color: #000;
|
||||||
background-color: rgba(0,0,0,.85);
|
background-color: rgba(0,0,0,.85);
|
||||||
} .error {
|
} .error {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.coord {
|
||||||
|
height: 50%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 44px;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
#rose {
|
#rose {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
-webkit-transition-duration: 2s;
|
||||||
|
transition-duration: .2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (orientation:portrait) {
|
@media (orientation:portrait) {
|
||||||
|
|
Loading…
Reference in New Issue