Inspiration

The original idea was to start developing a landmark-based Pokemon game here at LA Hacks. That's where the Google Places API first came in. Then we realized how the information we were reading would be perfect for an at-a-glance device like the Pebble. If you're walking around in a new place, PebbleArea can tell you what interesting things are around you and it can give you a feel for what kind of a place you're in.

How it works

PebbleArea first grabs GPS coordinates when it launches and then makes a HTTP request to the Google Places API with the latitude, longitude, and radius within which to scan. Google Places then sends over a JSON file containing a list of twenty "most relevant" places which range from Cafes and Bookstores to Dentists and Stadiums. More results are pulled recursively from the API. All of these places of interest are then sorted within the app into twelve standard categories (food, shopping, services, education) . Categories display next to their names on the main menu how many locations fall under themselves and those without any entries aren't shown at all in order to save space.

Challenges I ran into

Navigating my way around web-based APIs for the first time and using JSON was a new experience for me. Figuring out how to sort each "place type" returned by Google Places into a category and filtering out all of the "routes" and "mailboxes" that it also returns was a fun challenge.

Accomplishments that I'm proud of

Building my first app. Getting the asynchronous ajax and navigator (GPS) javascript code to work together.

What I learned

I think I've really got the hang of JSON now and how to organize objects in arrays, and objects in arrays in other objects... in an array. With how Google Places formats its JSON files and how I wanted to organize my app, I ended up having to create a convoluted JSON-ish variable as a reference chart.

What's next for PebbleArea - Proximity information for Pebble

A lot of optimization. And then features to take advantage of more of the information that the Google Places API provides. More detailed pages for each location and maybe a compass that would point to a selected location? And then after a lot of polishing up, the Pebble app store.

Share this project:

Updates