This is a migrated thread and some comments may be shown as answers.

Geo Location Function

1 Answer 200 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 17 Feb 2012, 10:46 PM
Will there be a Javascript-Function to detect the geo-data like latitude and longitude of the mobile device?

In jqTouch, for example, you receive it this way:

var lookup = jQT.updateLocation(function (coords) {       
        if (coords) {
            lat = coords.latitude;
            lng = coords.longitude;         
        }
}

1 Answer, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 20 Feb 2012, 10:46 AM
Hi Thomas,

There is a Geolocation object in the HTML5 spec, which resides in navigator.geolocation. By now it is widely supported by desktop and mobile browsers and you can use the W3C standardized getCurrentPosition, watchPosition and clearWatch.

Kind regards,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Thomas
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Share this question
or