Skip to content

tanbur/geofencing_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geofencing

This is an example script that shows how to implement geofencing using OpenLayers v4 and OpenStreetMap. In addition to showing useful debugging stats, it also shows how one might use closures to write functions that will only be called once - useful when building adventures 😉

See the Camden Adventure.

Note:

  1. The "Camden Town Hall" tag will appear and disappear as you enter and leave the town hall.
  2. The "auditorium" tag will appear once, the first time you enter the auditorium, and disappear whenever you leave it.
  3. The "small park" tag will appear when you enter the park for the first time, and won't disappear.
  4. The "Brunswick Square" tag will appear/disappear upon entering/leaving. Same as the Camden Town Hall.

Onigo Example

The Onigo Example is a more bespoke example script for Onigo-like adventures. The tags are as above, except the code will sequentially hide and show the tags/instructions while popping the sections so they don't get retriggered. This code lives in the example_onigo script.

Polygon Selection

The polygon selection tool is great for easily selecting polygons for use in geofencing. This code lives in the polygon_selection script.

About

An example of geofencing using OpenLayers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published