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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Thingworx and Google Maps Modelling Data Structure

tscur
13-Aquamarine

Thingworx and Google Maps Modelling Data Structure

Hello guys,

 

I'd like some help with some questions I'm facing based on the GoogleMaps Extension and the Thingworx data structure and how they interact with each other:

- How to store data such as routes defined by the user in the GoogleMaps Widget;

- Track vehicles circulating along these routes;

- User defined stops added that are independent (multiples routes can have the same stop) and how to store them.

Basically, I need help understanding WHAT these entities will be and HOW they will be stored (remembering that they will be defined by the user).

1 ACCEPTED SOLUTION

Accepted Solutions
posipova
20-Turquoise
(To:tscur)

it might be helpful to refer to the widget's property table and definitions in the helpcenter: 

http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FMashup_Builder%2...

 

The route data is an infotable so  you may consider using a data table, for example, to store the routes. There are multiple ways to go around this, but you may also create a custom service defining the vehicles (Things) using the routes.

View solution in original post

4 REPLIES 4
posipova
20-Turquoise
(To:tscur)

it might be helpful to refer to the widget's property table and definitions in the helpcenter: 

http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FMashup_Builder%2...

 

The route data is an infotable so  you may consider using a data table, for example, to store the routes. There are multiple ways to go around this, but you may also create a custom service defining the vehicles (Things) using the routes.

tscur
13-Aquamarine
(To:posipova)

Thank you for your response posipova!

Yes, I thought about using a data table to store the routes, but how can I use it to let the user define these routes? A vehicle can have different routes, and these vehicles have a group of stops they have to make, and also they can have similar stops (routes that can cross each other). 

posipova
20-Turquoise
(To:tscur)

apologize for the delayed response.

 

Considering each route is a set of data points (infotable), I would think you could store them as a property (for example). Write a custom service that assigns/sets the route? 

tscur
13-Aquamarine
(To:posipova)

Hi @posipova,

 

Yes, the data structure I came up with was to create a Data Table for the routes, therefore I'll have all the routes in the Data Table and all the Things will access this Data Table and I'll assign one of these routes to the Thing. What do you think of this structure?

 

And if you think it is possible, I'll have 2 field definitions for this Data Table, one with the number of the route (keep this in mind) and another with the type Infotable with the locations the route follows, and somehow the user will directly in the map define the points.

 

For the stops, since I have multiple stops, and different routes will have similar stops, I will do a reverse logic, I will assign multiple routes to each stop. So what I thought was to create another Data Table for the stops, so I'll have all the stops with their locations in one Data Table. Following my logic, I will have 2 field definitions for the Data Shape of this (Stops) Data Table, the location and an Infotable with the routes I will assign to this stop. Therefore I created a (routes assigned) Data Shape for this Infotable with one field definition, and I want to reference the number of the route from the Route Data Table, how can I reference a field of a Data Table to a field definition type of a Data Shape?

 

Regards,

Taciano Scur

Diphyc Ltda

Top Tags