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

Converting address into co-ordinates

Bedrock

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

 

2 REPLIES 2

Re: Converting address into co-ordinates

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;

Re: Converting address into co-ordinates

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.  

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________