The last time Hackerfall tried to access this page, it returned a not found error. A cached version of the page is below, or clickhereto continue anyway

Query Realtime SF Bus Locations With GeoFire 2.0

What is GeoFire?

GeoFire is a set of open-source libraries for JavaScript, Objective-C, and Java that allow you to store and query a set of items based on their geographic location. GeoFire uses the Firebase database for data storage, allowing query results to be updated in realtime as they change. GeoFire does more than just measure the distance between locations; it selectively loads only the data near certain locations, keeping your applications light and responsive, even with extremely large datasets.

About the demo

Firebase provides a Transit Open Data Set which contains the realtime locations of public transit vehicles in several major US cities, including San Francisco MUNI. The data set also contains GeoFire data for each vehicle which we used to create this demo. Drag around the purple circle to the left to see the vehicles which are currently within its radius. The results update in realtime as you move the circle and as vehicles travel around the city. GeoFire handles all of the hard work, telling you exactly when vehicles enter and exit the circle. It also selectively loads only the data geographically close to the circle, meaning GeoFire data for buses in New York or Chicago are not loaded into memory unnecessarily.

Download GeoFire

GeoFire is ready for your production apps and plays nicely with the full suite of products offered by Firebase. Read our blog post on GeoFire to get started and then head over to GitHub to read the full API reference, view example code, and find download instructions for all of the GeoFire clients.

Continue reading on