Topic: Wialon JS API - check if unit enter a specific predefined geofence
Hello,
I want to ask if it possible to check if a specific unit entered or get out from a specific predefined geofence.
Regards,
Mina Fouad
Hello,
I want to ask if it possible to check if a specific unit entered or get out from a specific predefined geofence.
Regards,
Mina Fouad
It depends on what you actually want to do.
If you want to just check, that unit right now is inside/outside of geofence — get unit coordinates by core/search_item (with position flag) and call resource/get_zones_in_point with that coordinates with specification of your resource and zone.
If you need historical data with time of entering/leaving geofences — you need to create Geofence report. Then you can call it with report/exec_report and different rows selectors.
If you need to continiously monitor this state in realtime, there is notifications by geofences. That can do a GET/POST request to your server.
Hello everyone,
I am new user for Wialon JS API.I want to get realtime data for selected unit between selected geofenes.
Can I get?
Please advice me.
Hello everyone,
I am new user for Wialon JS API.I want to get realtime data for selected unit between selected geofenes.
Can I get?
Please advice me.
Yes you get this information without problems only you needd now the resource and this resource have the necesaries permitions on this case view geofences.
1. to get the resource you can use this with the correct flags https://sdk.wialon.com/wiki/en/sidebar/ … arch_items
2. to check access use this https://sdk.wialon.com/wiki/en/sidebar/ … ms_billing
3. to check if an unit is on a geofence you can unse many methods but normally i can use this https://sdk.wialon.com/wiki/en/sidebar/ … s_by_point
I hope this information help you.