Topic: Retrieving Nearest Geofences
Hello,
Is there a way to retrieve all nearby geofences from specific coordinates, I tried to use resource/get_zones_by_point API but it does not retrieve all Geofences only nearest one
Hello,
Is there a way to retrieve all nearby geofences from specific coordinates, I tried to use resource/get_zones_by_point API but it does not retrieve all Geofences only nearest one
Hello,
Is there a way to retrieve all nearby geofences from specific coordinates, I tried to use resource/get_zones_by_point API but it does not retrieve all Geofences only nearest one
Hello, yes, this request can show only closest geofence, not all geofences inside the indicated area.
Depends on the number of the resources and geofences, you can try to use core/batch request to pass several requests as one with different resources ID for each request, for example:
https://hst-api.wialon.com/wialon/ajax.html?svc=core/batch¶ms={"params":[{"svc":"resource/get_zones_by_point","params":{"spec":{"zoneId":{"RESOURCE_ID_1":[]},"lat":25.753,"lon":80.22222,"radius":100000}}},{"svc":"resource/get_zones_by_point","params":{"spec":{"zoneId":{"RESOURCE_ID_2":[]},"lat":25.753,"lon":80.22222,radius":100000}}},{"svc":"resource/get_zones_by_point","params":{"spec":{"zoneId":{"RESOURCE_ID_3":[]},"lat":25.753,"lon":80.22222,"radius":100000}}}],"flags":0}&sid=
Thus you will get closest geofence from each indicated resource.