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

Animation In Thingworx

SOLVED

Animation In Thingworx

Hello,

Is there a way I can animate the google map widget to track the location of the car. Currently, I am working on a project for car race tracking, so after each 10 sec, I will be getting a set of data which will have a timestamp and latitude & longitude. I need the structure of track and at each second I want the location of the car. So ideally the track should be visible(track of the race course at each point need to be mapped with google map) and in the background, the google map should work in such a way that it should track the car location over the racing-track.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Animation In Thingworx

Hi isha shrivastava​,

There are two parts of your questions:

1. Creating the Route: You can try it with Planned Route and Actual Route or even Region as Pai Chung said.

2. For Tracking the Car; You will have to Bind the Data in the Google Map widget. Then you will have to call the service every 1 minute to update the value, you can do it using Refresh Widget.

View solution in original post

12 REPLIES 12

Re: Animation In Thingworx

Hi isha shrivastava​, such a functionality of google maps widget is not available.

Re: Animation In Thingworx

You might be able to do something with Planned Route and Actual Route or even Region for the Track

Re: Animation In Thingworx

Thanks for reply, Do I have to create service which give infotable as outpur for Planned Route. What are the fields that infotable should contains? As Planned Route is the target to which we are mapping infotable right?

Re: Animation In Thingworx

It will take the Input as Infotable which contains the Set of Location DataType which will define your Route.

Re: Animation In Thingworx

Hi isha shrivastava​,

There are two parts of your questions:

1. Creating the Route: You can try it with Planned Route and Actual Route or even Region as Pai Chung said.

2. For Tracking the Car; You will have to Bind the Data in the Google Map widget. Then you will have to call the service every 1 minute to update the value, you can do it using Refresh Widget.

View solution in original post

Re: Animation In Thingworx

Thanks Ankit Gupta​ for reply, I think its helpful... I need one more help how can I do Region formatting. I have to show the track between the markers in different color or  path traced by the car in 10 sec . Is Region formatting the right way to achieve this?. I have mapped all data of service(infotable as output) to region data. I am not able to see any locations on map. I am able to see route and planned route data using same service.

Re: Animation In Thingworx

My thought was that Route and Planned Route would've sufficed.

Regions takes an InfoTable of regions which are described by an info table field ie a table in a table where the parent table is a list of regions and the inner table is the location points that draws the region.

Re: Animation In Thingworx

Pai Chung Nice information.I haven't tried Regions in Google Map before. Will check it out.

Re: Animation In Thingworx

Hi isha shrivastava​,

You would not actually need the Region here.

Let me show you with an example:

Let's say our Route is Connaught Place circle in New Delhi.

So, in Blue (can be changed) I have shown my Route by Binding my Route location Infotable to Google Map RouteData and setting showRoute as true.

Second, I am showing my Car path in Green (can be changed) and Race Start Point (Marker with Green dot) and Current location of Car (Shown by car icon). This I did by by Binding Car location Data to Google Map data and Showing start and end Marker.

I hope it helps.

Thanks,

Ankit Gupta

Re: Animation In Thingworx

Hi,

Thanks for reply Ankit Gupta , I am able to plot track by mapping all data to Google map widget. But I want to animate the car by moving the car along the track. I have stored location values in info table. How should i get these values by fetching row by row data and plot it on google map widget so that every time the values are fetched from info table it show the moving car along the track. This is the result of my  service.

idtimestampvalue

---

41.0526 : 335.3009

---

41.0526 : 335.3019

---

41.0526 : 335.3030

---

41.0526 : 335.3040

---

41.0526 : 335.3040

---

41.0526 : 335.3040

---

41.0526 : 335.3040

---

41.0526 : 335.3040

---

41.0526 : 335.3040

---

41.0526 : 335.3061

---

41.0526 : 335.3070

---

41.0526 : 335.3079

---

41.0526 : 335.3088

---

41.0526 : 335.3095

Re: Animation In Thingworx

Hi isha shrivastava​,

The car would actually move with my original answer itself because the end point of the path would change regularly.

Thanks,

Ankit Gupta

Re: Animation In Thingworx

Hi Ankit, how do you set the route to circle ( I thought it's only straight lines), how to give the route different colors and what difference is a planned route than route?

Announcements

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