How to get current location of a user to input into google maps directions API.

PranavSuj96
Mega Expert

Hello, 

 

I have created a scoped roadside assistance application and created a service portal alongside it and have a page with google maps directions API. All I need is to get the users current gps coordinates and constantly have it for about an hour. Same with the tow truck driver. How would I go about this??

 

 

1 ACCEPTED SOLUTION

current_location doesn't appear to be an available reference for sys_schema_attribute_m2m
but you should be able to add the value
current_location=true
directly into the attributes field on the dictionary form view for your string field.

 

View solution in original post

5 REPLIES 5

Adarsh Gunjan
Tera Expert

Hi,

Follow this link to get user's current location using SN Android Mobile App

https://www.servicenow.com/community/developer-forum/how-to-get-users-current-location-using-now-mob...

We don't require make current_location=true in dictionary attributes.

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Adarsh Gunjan