Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
22
gaia/dev_apps/uitest/js/API/geolocation.js
Executable file
22
gaia/dev_apps/uitest/js/API/geolocation.js
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
function Location(position)//location function is defining with parameter
|
||||
{
|
||||
//Specifies the longitude estimate in decimal degrees.
|
||||
//The value range is [-180.00, +180.00].
|
||||
var latitude = position.coords.latitude;
|
||||
var longitude = position.coords.longitude;
|
||||
//latitude value is defining in label element where id is lati
|
||||
document.getElementById('lati').innerHTML = latitude;
|
||||
document.getElementById('longi').innerHTML = longitude;
|
||||
}
|
||||
|
||||
document.getElementById('submit').addEventListener('click',
|
||||
function findLocation() {
|
||||
//checking browser compatibility
|
||||
if (navigator.geolocation)
|
||||
{
|
||||
//getCurrentPosition method retrieve
|
||||
//the current geographic location of the user
|
||||
navigator.geolocation.getCurrentPosition(Location);
|
||||
}
|
||||
}
|
||||
);
|
||||
Loading…
Reference in a new issue