Skip to content

Add SCAN to Roaming Geofences #96

@tidwall

Description

@tidwall

This is in reference to the issue #93 filed by @amorskoy.

For example, the following command:

NEARBY people FENCE ROAM people * 5000

Which would result in notification that looks like:

{"command":"set","detect":"roam","hook":"",
"time":"2016-12-08T09:27:54.306035387-07:00",
"key":"people","id":"bob",
"object":{"type":"Point","coordinates":[-115.01,33.01]},
"nearby":{"key":"people","id":"alice","meters":1451.138152186708}}

But if you want additional details about alice, you should be able to enter:

 NEARBY people FENCE ROAM people * 5000 SCAN :*

Which would do a SCAN alice:* prior to sending each notification and the result would look like:

{"command":"set","detect":"roam","hook":"",
"time":"2016-12-08T09:27:54.306035387-07:00",
"key":"people","id":"bob",
"object":{"type":"Point","coordinates":[-115.01,33.01]},
"nearby":{
  "key":"people","id":"alice","meters":1451.13,
  "objects":[
      {"id":"alice","object":{"type":"Point","coordinates":[-115.02,33.02]}},
      {"id":"alice:lastname","object":"Denton"}
   ]
}}

Where the objects field includes all objects that match on 'SCAN alice:*` plus the target object.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions