Get Current Latitude Longitude
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2020 02:51 PM
Hi,
Can we get the current position latitude and longtude through scripts?
I can see geolocation is getting the current location, but i need to get lat long through script
Any idea?
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 07:36 AM
Here also we need to pass the streetname as paramater in the API to get the lat long.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 07:12 AM
The google geocoding service does the best it can with the information passed to it (I think it does a pretty good job honestly). Here are some actual responses from their geocoding api in this format [searchPassedToApi]: latitude, longitude;
1100 Congress Ave, Austin, TX United States: 30.2747025, -97.7403448
Congress Ave, Austin, TX United States: 30.2718005, -97.74143319999999
Austin, TX United States: 30.267153, -97.7430608
TX United States: 31.9685988, -99.9018131
United States: 37.09024, -95.712891
Can you clarify a little more what you are trying to do? In your original question; is current location the location of a user (their device or browser) or is current location the cmn_location record that is associated with the user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2020 07:41 AM
Hi,
As we are using Field Services, when the user do update the task in mobile device we need to grab the location automatically. Its not abou cmn_location.
As i can see when user logged in to mobile, the system capture the mobile device infomation in the table sys_mobile_devices with latitude /longiture where the device logged in, the same logic i want to get the latitude longitude when we do update the task on mobile
For geolcation API we need to pass the street name to get Lat/Long.
I need is there any OOB script available to get the latitude longitude ?