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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to get a geocode given an address

Willie
16-Pearl

How to get a geocode given an address

Is there a way in thingworx to get a geocode with an address?  I see that the widgets take geocode as an input but not the address.  I'd like to use those widgets but I need to convert the addresses to geocode first.

ACCEPTED SOLUTION

Accepted Solutions
MarekP.Nowaczyk
14-Alexandrite
(To:Willie)

Create ThingWorx service using ContentLoaderFunctions like GetJSON to call the Google Geocode API.

You can find many articles in PTC knowledgebase with examples on how to use it like

https://community.ptc.com/t5/IoT-Tech-Tips/ContentLoaderFunctions-in-ThingWorx/m-p/535195

or in JavaDoc at http://support.ptc.com/help/thingworx_hc/javadoc/com/thingworx/resources/content/ContentLoader.html.

View solution in original post

4 REPLIES 4
MarekP.Nowaczyk
14-Alexandrite
(To:Willie)

You may want to look at different maps provider services like Google or Bing.

Google has REST API available to documented here https://developers.google.com/maps/documentation/geocoding/intro

 

Similar REST APIs are available from Bing Maps https://docs.microsoft.com/en-us/bingmaps/rest-services/

 

Hope this helps.

 

I found a youtube video tutorial on how to use the Google Geocode API.  I need to figure out how to apply this in thingworx.  Hope this helps everyone else

 

Google Geocode API & Javascript Tutotrial

https://www.youtube.com/watch?v=pRiQeo17u6c

In this video we will be working with the Google geocoding API to get all location info including latitude and longitude from an address or even from just the name of a city or state. We will build an application with a Bootstrap 4 form to interact with the API. CODE: Code for this video ...
MarekP.Nowaczyk
14-Alexandrite
(To:Willie)

Create ThingWorx service using ContentLoaderFunctions like GetJSON to call the Google Geocode API.

You can find many articles in PTC knowledgebase with examples on how to use it like

https://community.ptc.com/t5/IoT-Tech-Tips/ContentLoaderFunctions-in-ThingWorx/m-p/535195

or in JavaDoc at http://support.ptc.com/help/thingworx_hc/javadoc/com/thingworx/resources/content/ContentLoader.html.

Hi @Willie.

 

If one of the previous responses provided by @MarekP.Nowaczyk answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements

Top Tags