Deploying car objects on google map in real time

0
Hello I’m trying to make a map service in real time like public transportation information app. My question is when i set the car entity on domain model,  which one is better, adding latitude attribute and longitude attribute on car entity, or setting another location entity including latitude attribute and longitude attribute?  I think if i add latitude and longitude on bus entity, it would be hard to change location in real time, but i have no idea how to link bus entity and location entity.  And if anyone has an idea that how to use microflow to show real time locations on google map, please help me.    
asked
1 answers
0

Both options are possible

I think to show the current position on the map, this is by far the easiest one:
AAdd the current lattitute & longitude to the car entity as attributes. When the current position changes just update the attributes and refresh the page.

If you are also interessted in the history of the location of the car, a location entity can be handy. By associating this to the car entity( 1 car has * locations)  you can build up a history. Every time there is a new location, a new location object is created with a lattitude & longitude. Only thing is you need to find a way to plot this on the map , either by also having a current lattitude & longitdue on the car entity or by marking a location entity as current for example. 

answered