Jump to content

Smartphone GPS and UNIGUI !!


sagt3k

Recommended Posts

Hello, I want to know if it was possible by using a UNIGUI form, a smatphone and a browser, create a form page / frame where I can acquire data from the GPS directly by the device with some API (for example) and then be able to save the lat./long. on a database?

Thanks

Link to comment
Share on other sites

<script type="text/javascript">
 
function success(position) {
 alert(position.coords.latitude + ' / ' + position.coords.longitude);
}
 
function error(msg) {
 alert('failed');
}
 
 
if (navigator.geolocation) {
 navigator.geolocation.getCurrentPosition(success, error);
} else {
 alert('not supported');
};
 
</script>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...