Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
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
Solved! Go to Solution.
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.
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;
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.
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