Skip to content

The funnel node

Erick Navarro edited this page Aug 30, 2017 · 2 revisions
    new GeoEvent<GeoPlace>(
            latitude,
            longitude,
            GeoDistances.TWO_KM,
            GeoPlace.class,
            "locations",
            "cl"
    ) {
        @Override
        protected void results(List<GeoPlace> geoPods) {
            for (GeoPlace geoPlace : geoPods) {
                //TODO do something with your objects
            }
        }
    };

In this case "cl" is the ISO country code obtained from the SIM card (if you are interested see the example app), but you can use whatever you want, it can be a category, or maybe some other division in your country, etc.

It can even be an empty String, this library enforce the use of the funnel node as a good way to have scalable data availability, however it does not force you to do it. As long as you never use null it will work.

A more sophisticated app could get the location first then based on that get the city and then do the queries based on that, the sky is the limit.

Beautifull

Clone this wiki locally