cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Converting address into co-ordinates

Peter_Raj
12-Amethyst

Converting address into co-ordinates

Hiii All

This is Peter Raj

I have a GPS tracker by which i can monitor all the location data of the vehicle kn Thingworx Mashup

currently I am facing a issue 

I have a Address of a vehicle but I need the address as a Co-ordinates in the form of Lat : Long so that  I can display the co-ordinates in the Google Map widgets

can anyone pls help me to overcome this issue

 

ACCEPTED SOLUTION

Accepted Solutions
wposner-2
14-Alexandrite
(To:Peter_Raj)

You will need to use the Google Maps API to do perform a geocode of the address to its lat/long.  You can either build the request via javascript and call the google APIs in this fashion, or create a resource extension that calls the APIs and returns a location value.  I had to do something similar so I created a resource extension.  I can get address via lat/long, the lat/long via address and I have services to do each using enterprise credentials and just a plain developer app key.  

View solution in original post

3 REPLIES 3

you can have a property on thing with location as base type.

further parse the address values to get lat, long and set to location object. set that location object to property and use that property over google maps

 

**********************

var location = new Object();
location.latitude = 10; // parse address value to set lat value as 10
location.longitude = 25;
location.elevation = 79;


me.locPro = location;

wposner-2
14-Alexandrite
(To:Peter_Raj)

You will need to use the Google Maps API to do perform a geocode of the address to its lat/long.  You can either build the request via javascript and call the google APIs in this fashion, or create a resource extension that calls the APIs and returns a location value.  I had to do something similar so I created a resource extension.  I can get address via lat/long, the lat/long via address and I have services to do each using enterprise credentials and just a plain developer app key.  

slangley
23-Emerald II
(To:Peter_Raj)

Hi @Peter_Raj.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements


Top Tags