Turf has opened a wide range of possibilities for apps running entirely in the browser. In this example, we’ve built a store locator that finds all Starbucks locations near a user’s current position. Drag the little green figure to move it around and mousewheel up and down to adjust the search radius:
Trouble with the map? Try the direct link
Under the hood Turf is:
- Finding all locations around the user out to the desired search radius
- Measuring the distance to each location
- Identifying the closest location to the user
Best of all, Turf is crunching this math on a set of 19,979 locations worldwide on the fly, right in your browser. Simple experiments like this are getting us excited about Turf’s potential for giving anyone with a modern internet browser a powerful suite of tools for geospatial analysis.
The term “Starbucks” is a trademark of Starbucks Corp. This website is not affiliated with Starbucks Corp.