User Tools

Site Tools


geofencedsl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

geofencedsl [2011/01/25 14:11]
donpdonp
geofencedsl [2016/06/25 11:25]
Line 1: Line 1:
-== GeoFence DSL == 
  
-javascript language. 
- 
- 
-Variables 
-<code> 
-detail = { fence : <The specific fence that caused the event> 
-           date : <trigger date> 
-           verb : IN | OUT 
-         } 
-fences[] - access to each of the defined geofences 
- 
-inside_fences[] - list of fences currently "inside" 
-</code> 
-   
-<code> 
- if detail.verb == "IN" { 
-    email("don@don", "Fence entered!") 
- } 
-</code> 
- 
-<code> 
- ace = fences["Ace Hotel"] 
- if (detail.verb == "IN" && detail.fence == ace) { 
-    if (ace.inside_trigger_date - Time.now > 15.minutes) { 
-      email("brennan", "Nerdout at the ACE Hotel!") 
-    } 
- } 
-</code> 
geofencedsl.txt ยท Last modified: 2016/06/25 11:25 (external edit)