Track only inside geofences

rabidrabbit8 years ago

Hello,

Is there a way to make it so the Dashboard only displays users that are inside a geofence. If not what do you think the classes would be I would have to work with to implement this feature.

Thanks so much!

Anton Tananaev8 years ago

There is no such functionality out of the box. I guess you can hide device on map on the client side. You should probably check Map* classes.

rabidrabbit8 years ago

Thanks so much for the reply,

If I did this on the client side and used 10 smartphones with a traccar server, would that mean that I have to load a custom client app on each of these devices?

Again thanks so much for the prompt reply.

Anton Tananaev8 years ago

By client side I meant web app, not Client mobile app.

rabidrabbit8 years ago

Ah, I see, do you think there is a way to implement it through the Java-based code on the server side as I am not as polished with JavaScript as I would like.

Thanks for the help!

Anton Tananaev8 years ago

Very unlikely. You would still need some JS changes.

One Java-only option I can think of is to not update location if it's outside of geofence. The problem is that you will still see last (possibly outdated) location inside the zone.

rabidrabbit8 years ago

Got it! I guess I'll figure out javascript thanks so much for the help!

abyss8 years ago

It would be rather simple.
Devices has not used (in web-client) field "geofenceIds" that represent list of geofences where device is currently situated.
You can filter "VisibleDevices" store by this field. It will automatically hide devices from list and from map.

rabidrabbit8 years ago

Thank you for the help, I can see geofenceIDs in the device class but I'm not sure what you mean by "filter “VisibleDevices” store by this field." Sorry for the confusion.