genericGeoFence v1.0.9

by Veselin Pizurica

genericGeoFence calculator based on the runtime location.

Input data:

[{
    id: name,
    coordinates : circle [{ lat: 51.04, long:3.7}], polygon [{ lat: 51.04, long:3.7},{ lat: 52.04, long:3.7}] or polygon with multiple locations
    radius: in metres, in case of circle
}]

for radius

[ { “id”:“Depo1”, “radius”: 10000,    “coordinates”: [{“lat” : 51.07, “long” : 3.51} ]  }  ]
for polygon
[ {  “id”:“Depo1”, “coordinates”: [{“lat” : 50.07, “long” : 3}, {“lat” : 50.07, “long” : 4}, {“lat” : 52.07, “long” : 3.5}] }]
or
[ {  “id”: “Depo1”, “coordinates”: [{“lat”: 51.07,“long”: 3.51},{“lat”: 52.07,“long”: 4.51 }] } ]

Raw data:

  • latitude
  • longitude
  • location
  • oldLocation, if it is out, provides the previous geofence location (only once)
  • distance (if circle)

Required properties:

  • locations

States:

  • IN
  • OUT

Raw data:

  • distance (double)
  • latitude (double)
  • location (object)
  • longitude (double)
  • oldLocation (double)