I have a web app that uses the HTML5 geo location service, it works great except when I rolled it out to android using jasonette. Is this even possible to do?
Here is my load.jason -
{
"$jason": {
"head": {
"title": "Web Container Agent"
},
"body": {
"background": {
"type": "html",
"url": "https:mysite.com",
"id": "app",
"action": {
"type": "$default"
}
}
}
}
}
This is my main index page. Now I have a file called location.php which just for this purpose I will use the demo from w3 -
<script>
var x = document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude;
}
</script>
Would I need to add a second json file for location.php? Or write a secondary script in the current json file to allow for this? Or is it just not possible?
Thanks!