How to get address of a location on MAP

wakespirit
Kilo Guru

Dear all,

From a mobile page in servicenow I am retrieving the location of a map point which return Lat and Long coordinate.

From that coordinate, how can I get the corresponding address of those coordinate ?

Any idea?

regards

1 ACCEPTED SOLUTION

as of now i dont have ready made solution available.

did you try to have a look on service-now google maps doc. here you need to use the google map api and you have to pass the API Key and other details in the system properties .

if you see the OOTB map page script it's cureently showing the incident location on the map but i think you can customize that map page based on your need.

i would suggest here kindly have a look on that.

 

https://docs.servicenow.com/bundle/madrid-platform-administration/page/administer/navigation-and-ui/...

 

https://docs.servicenow.com/bundle/madrid-platform-user-interface/page/administer/navigation-and-ui/...

View solution in original post

10 REPLIES 10

you can try to call the ui action( system classic mobile UI >> UI Action - Classic mobile ) here that will redirect you to the google map page.

example: i tried to get the caller id location latitude and longitude and then whenever user will click on the ui action it will open the google map page .

 

find_real_file.png

 

Mobile view

 

find_real_file.png

 

find_real_file.png

 

Script:

 

var lat = current.caller_id.location.latitude;
var lon = current.caller_id.location.longitude;
var url = 'https://www.google.com/maps/?q='+lat+','+lon;
action.setRedirectURL(url);

 

Ok got it.

I can open it and it display my Incident on the map.

HOw can I define the querry for google map for having :

my Incident position as To destination and my current location as From in order that my maps is redy to navigate ?

thanks for advise

you mean to say you want to set the incident created location as "Current location" and your location as "Destination Location" on google maps and then you want to check the route or distance on google maps ? am i right?

The reverse.

I need to set my location as Current Location and Incident Location as Destination Location, and then check the route yes .

Any idea ?

 

Next point is that actually when calling goolgle map on my phone it call my default app for navigation, so that means it switch to an other application.

Is it possible to stay in ServiceNow mobile app and get get direction from an embeded map ?

as of now i dont have ready made solution available.

did you try to have a look on service-now google maps doc. here you need to use the google map api and you have to pass the API Key and other details in the system properties .

if you see the OOTB map page script it's cureently showing the incident location on the map but i think you can customize that map page based on your need.

i would suggest here kindly have a look on that.

 

https://docs.servicenow.com/bundle/madrid-platform-administration/page/administer/navigation-and-ui/...

 

https://docs.servicenow.com/bundle/madrid-platform-user-interface/page/administer/navigation-and-ui/...