function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hanimi ReddyHanimi Reddy 

continuous user geolocation tracking .

Hi All,
Below is the usecase for salesforce 1 APP.
UseCase :
             Manger want to see his sales peoples location in google map.
             There should be provision for sales users, to allow his location tracking.

Please help me on this ,how can i achive the above usecase?
Gaurav KheterpalGaurav Kheterpal
You can do this programatically using the Google Directions API and HTML5 Geolocation API.

You can get the location by using this approach
 
navigator.geolocation.getCurrentPosition(function (position) {
    var latitude = position.coords.latitude; 
    var longitude = position.coords.longitude; 
    var coords = new google.maps.LatLng(latitude, longitude);

    var request = {
        origin: coords,
        destination: "{!Account.BillingStreet},{!Account.BillingCity},{!Account.BillingState}",
        travelMode: google.maps.DirectionsTravelMode.DRIVING
    }
There's some sample code available here (http://github.com/sready/Directions) and a tutorial (https://developer.salesforce.com/blogs/developer-relations/2013/12/extend-your-salesforce1-app-with-mobile-cards.html) which should be helpful. Please post another thread if you face any issues.

If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.

Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker