Update geofences (with api) without reloading the app

Nicolas R 7 years ago

Hello, i'am using the API to add new geofences, which are a list of places the "devices" have to go, and be monitored. These geofences, are created using the API in other web app.

It works ok, the geofences are created. The problem is the geofences don't appear in the map if you don't reload the app, so i need to update the geofences without reloading the page to see the changes.

Is that possible?

Thanks and Regards.

Nicolas R 7 years ago

If not possible, i would like to know how can achieve it in the code, or if there are a workaround to reload the page every-time a geofence is pushed. Because i'am using traccar in a TV screen, so i can't reload the page easily.

Anton Tananaev 7 years ago

It works for me.

Nicolas R 7 years ago

Not for me. The geofence is being created, and stored. But the web-app don't shows anything, when i reload the page, then i can see the new geofences. Any suggestion of where to start looking?

Anton Tananaev 7 years ago

Are you creating it from the web app? If not, then of course it won't work.

Nicolas R 7 years ago

Iam talking about creating from the api. Is there a way to achive It?

Anton Tananaev 7 years ago

Web app also uses API, so you haven't answered my question.

Nicolas R 7 years ago

Okay, didn't know that.
I'am talking about the REST API, which is accessed in path.com/api

Anton Tananaev 7 years ago

If you call API from one place and expect web app to automatically reflect the change, it won't happen. Unfortunately it doesn't work like that.

Nicolas R 7 years ago

Okay. So i want to implement it. Can you guide me about the way that you would do it? You know better the app classes, so your help will be very useful.
Also if you are interested i can do a pull request when i finish doing the job.

The function will be reflecting the changes in the UI made from the API.

Thanks and hope you can help (Y)

Anton Tananaev 7 years ago

We can help with customisation. It's part of professional services offer:

https://www.traccar.org/product/professional-services/