Traccar on Google Earth

rodrigo.araneda9 years ago

Is possible that the platform is shown in googleearth in windows 7 or 8, if that is how you could do.

thank you very much the system works very well.

regards

Anton Tananaev9 years ago

Currently there is no way to show data in Google Earth. In future the plan is to support exporting of GPS locations in various formats which should allow to view data in Google Earth.

It is possible with the kml element: <minRefreshPeriod>.
With the actual Traccar, you cold add aline to your crontab in Cron, in oreder to launch a .php that read the MySQL or PostgreSQL database and write the result in the output.kml file each 30 seconds. Once output.kml is in Google Earth, it will refreshed each minimum Refresh Period <minRefreshPeriod> of (for example) 30 seconds. See more about in: https://developers.google.com/kml/documentation/kmlreference
NOTE: That this kml element is NOT compatible with GoogleMaps, only Earth. In the same way other apps may accept <minRefreshPeriod> or not.

Anton Tananaev4 years ago

My guess is that it's not supported.

Yes, It works!. Here you are, the full code, in two KML files (in a zip). The first file "GEautorefresh.kml" calls the second with google "network link" each 10 seconds, and still autorefreshing each 10 seconds.
I canĀ“t put the code in the forum, so I will post a pdf link with the full code and easily explained in 4 shorts steps.

http://167.172.99.239/Traccar2KmlForo.pdf
http://167.172.99.239/GEautorefresh.zip
Extraction must left this:

c:\GEautorefresh\GEautorefresh.kml
c:\GEautorefresh\MovingPoints.kml

Other Paths will not work!

Thanks a lot!!. I love Traccar.

Javier Gonzalez4 years ago

You will not believe , but I was working with Google Earth, and I thought , may be it can be ported to... voila...
may be... it is possible... I dont know... I have not tested yet, but it worth to give a try. Who know

I will love that Traccar project do KML export by its self, but mean while. I will open a github project Traccar2Kml, in order to create a .php which do some thing like this:

  1. Read from a .conf file the server, data basename and password.
  2. Reads tc_devices table in order to find the active devices.
  3. Read tc_positions tale to read lastest positions, timestamps, attributes....
  4. Write the KML file with each device+potition, with its owns respective device_name and time stamp as KML point name, and attributes and other info as description.

I am not a programmer, just a firefighter. So I will need some help.