modification of tc_geofences table

kris3 years ago

My customer requires very precise Geofence coordinates for Polygons.

  1. I create a Geofence manually with the map tool
  2. I modify (straighten, allign etc) the new Polygon and UPDATE it in the DB table
    Now I would like to reload / refresh the new Polygon/s and display it on the map.
    It looks like creation and update only works with the Geofence dialog (and overrides the DB content!)

Is there a way to trigger a Geofence reload (sync) from database and convert to map display ?

I'm a backend developer and not very experienced in web development and js,
but there must be some function to snchronize the geofences at some point (i.e. at first installation with existing DB)
which could be triggered with a login for example.

Or do I have to go the long way and use the REST API to read, modify and write geofences?

PS: I also noted that if you create a new record in the geofence table through SQL
then the next creation of a geofence through the frontend gets a PK violation.

Anton Tananaev3 years ago

Traccar has internal cache, so you have to restart service to pick up database changes. The right way to do it though is using API.

kris3 years ago

I understand, great, thanks