Geofencing for the Web

  function(serviceWorkerRegistration) {
        new CircularGeofenceRegion({
          name: "myfence",
          latitude: 37.421999,
          longitude: -122.084015,
          radius: 1000
        }), {includePosition: true}).then(
      function(geofence) {
        // If more than just a name needs to be stored with a geofence, now
        // would be the time to store this in some storage.
      }, function(error) {
        // During development it often helps to log errors to the
        // console. In a production environment it might make sense to
        // also report information about errors back to the
        // application server.

The Geofencing API lets webapps setup geographic boundaries around specific locations and then receive notifications when the hosting device enters or leaves those areas.

All hail ServiceWorkers!

Geofencing API →