Add geofencing to your on-demand app

Mapbox
maps for developers
2 min readSep 12, 2017

--

By: Amy Ghate

On-demand logistics companies deliver your Amazon packages, your DoorDash meals, the car you rented with Getaround, and the taxi you hailed with Lyft. Geofencing — virtual boundaries around geographic areas — unlocks a location-aware user experience for your on-demand apps.

Imagine sending truck drivers delivery instructions and automating check-ins when they approach a warehouse, notifying passengers when a rideshare driver is within two blocks of the pickup location, or concentrating food couriers in high-demand neighborhoods at lunchtime.

That’s what I built in the demo below:

I used Mapbox GL JS and the Maps API to build this demo showing a vehicle driving through San Francisco near several geofences. As the vehicle travels, its proximity to the geofenced zones is tracked and updated. When a vehicle enters a geofence, the driver is notified. The alert expires after the driver exits the zone.

Have a geofencing feature to build into your on-demand app? Reach out to our sales team.

--

--

mapping tools for developers + precise location data to change the way we explore the world