geofencedsl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
geofencedsl [2011/01/25 22:10] – donpdonp | geofencedsl [2011/01/25 22:26] – donpdonp | ||
---|---|---|---|
Line 1: | Line 1: | ||
== GeoFence DSL == | == GeoFence DSL == | ||
- | javascript | + | Allow users to write javascript to do what they want to with geofence events. |
- | + | ||
- | fences[] - access | + | |
- | + | ||
- | inside_fences | + | |
+ | Variables | ||
< | < | ||
- | detail | + | event = { "fence" |
- | date : <trigger date> | + | "date" |
- | verb : IN | OUT | + | "verb" |
} | } | ||
+ | fences[] - access to each of the user defined geofences | ||
+ | fence = { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], | ||
+ | [100.0, 1.0], [100.0, 0.0] ] | ||
+ | ] | ||
+ | } /* from http:// | ||
+ | inside_fences[] - list of fences currently " | ||
</ | </ | ||
| | ||
+ | Send an email on every fence crossing | ||
< | < | ||
- | | + | |
email(" | email(" | ||
} | } | ||
</ | </ | ||
+ | Email Brennan after being at the Ace for more than 10 minutes | ||
< | < | ||
ace = fences[" | ace = fences[" | ||
- | if (detail.verb == " | + | if (event.verb == " |
- | if (ace.inside_trigger_date | + | if ((new Date()) |
email(" | email(" | ||
} | } | ||
} | } | ||
</ | </ |
geofencedsl.txt · Last modified: 2024/01/31 04:08 by 127.0.0.1