Location Check-Ins | Location Annotation of Twitter Streams | Greasemonkey Script for Twitter | Media Layers | What's Near Me? | Twitter Empire
To show off some cool stuff you can do with GeoAPI, we've put together some quick demos. Note that these were all written in a day of work or less, so usual and full disclaimers apply.
Demo #1: Location Check-Ins [Top]
Uses: parents (lat/lon), search, userview methods.
GeoAPI makes it easy to build a social location broadcast application. In this demo, you can specify latitude/longitude coordinates by clicking on a map, or you could have an iPhone or Android device pass in a lat/lon. GeoAPI returns a set of nearby businesses. Users then click on a business to "check in". They then enter a comment to annotate the business in the app-specific writeable layer, which is readable only by other users of this application.
Using this as a base, you can easily write location broadcast apps. Or, you could write an augmented reality app where, for example, users store "pots of gold" at various coffee shops that are only visible to users of that app.
Key point: From the developer perspective, this is an all Javascript demo. In it, you are both reading locations from the API but also writing data to your own virtual overlay of the world.

How to try it out:
- Go to http://geoapi.com/demos/checkin-stream/checkin.html
- Click on a location on the map. Nearby POIs and businesses appear on the map.
- Below the map is a list of links to the entities shown on the map. Click on a link and add a comment.
- Above the map, click on the "Check-Ins Nearby" link. If the map is still showing your chosen location, your comment should appear under the map in the Check-Ins list. If there are no Check-Ins near the location, you'll see "No results match your query" instead of the list.
Source Code:
http://code.google.com/p/geo-api/source/browse/#svn/trunk/demos/checkin-stream
Uses: search method.
Some tweets are annotated with lat/lon values. But these coordinates aren't converted into locations, so it's hard to tell where the user tweeted from without doing a search.
This demo takes a live stream of tweets and does location lookups using their lat/lon values. In real time, it then annotates nearby (rather then exact) locations and displays the result. Users can then see that someone tweeted from "Near Dolores Park / Mission District / San Francisco" instead of from "37.7600, -122.4270", giving them a "real location" context for Twitter's real time information.

How to try it out:
iPhone use: When running this from an iPhone, it gets your phone's lat/lon values and uses them to show a nearby Tweet.
Caveats: Since one person built this demo in a few hours, there are some caveats:
- The Twitter stream refreshes every 5 seconds so our server doesn't send too many requests to Twitter. Integration into a Twitter client would substantially improve performance.
- Since we already have a business demo above, this demo relates tweets to the nearest point of interest. For cities with fewer points of interest, there may be few such nearby and/or fewer or no tweets.
Source Code: http://code.google.com/p/geo-api/source/browse/#svn/trunk/demos/twitter-nearby
Shout out to Zboogs!
This Greasemonkey script does two things:
- Convert Place Names Into Canonical Locations
It'd be cool to have a bit.ly or hash tags for locations. So we wrote a Greasemonkey script for Twitter that converts ::<POI-name> (some name preceded by two colons) into a linked url for a point of interest near the user.
This script assumes that the user is close to Ritual Roasters in San Francisco. For example, if you write "::ritual", it automatically converts "::ritual" to a link for Ritual Roasters. Or, if you write "::Dosa", it resolves it to Dosa Restaurant. In this proof of concept demo, we actually resolve to the closest POI or business that matches the string, and there is nothing that resolves ambiguities.

- Part 2: Convert Coordinates into Neighborhoods
The Greasemonkey script converts a tweet's lat/lon values to the neighborhood it's in. For example, if a tweet has the coordinates "37.7600, -122.4270", a line is added below it showing that it's in the neighborhood "Mission". When running, it annotates your Twitter stream in real time, letting you know where the people you're following are tweeting from.

How to try it out:
Source Code:
http://code.google.com/p/geo-api/source/browse/#svn/trunk/demos/twitter-greasemonkey
Uses: twitter, flickr methods respectively.
This demo spotlights two of GeoAPI's media layers by letting you see the tweets and Flickr photos sent/taken within a polygon/boundried location, such as a neighborhood, a city, a park, etc.. So you could view all tweets from the Mission District or Flickr photos from SOMA, both San Francisco neighborhoods.
- Tweets: We map the subset of tweets with lat/lon coordinates to neighborhoods, and only show tweets made within a given neighborhood. The screen automatically refreshes every 30 seconds.

- Flickr Photos: We map Flickr photos with lat/lon coordinates to neighborhoods, and only show photos taken within a given neighborhood. Since we only show photos from the last few days, sometimes there are few, if any, photos for a neighborhood.

How to try it out:
Source Code:
Demo #5: What's Near Me? [Top]
Uses: listing, q (MQL Search) methods.
This is a JavaScript app for mobile devices that shows you nearby businesses by category. It automatically gets your location from your iPhone and lets you choose the nearest bars, restaurants, parking lots, and more.
This demo highlights GeoAPI's ability to query the API based on business categories, such as Thai restaurants, and other attributes.

How to try it out:
- From an iPhone, go to: http://geoapi.com/demos/wnm/
- Let the page get your current location.
- Select a business category.
- Either select an individual business or view all results on a map.
Source Code:
http://code.google.com/p/geo-api/source/browse/trunk#trunk/demos/wnm
Demo #6: Twitter Empire [Top]
Uses: userview, twitter methods, creating and reading a user-entity.
This demo uses the Entity Creation API to add new entities on top of the tens of millions of entities built into GeoAPI. Users create new entities by simply clicking on a map to set a point or polygon, providing a name, and creating it. After creating a new entity, a Twitter View query shows the tweets either near the defined point or within the defined polygon.

How to try it out:
- Go to http://geoapi.com/demos/empire/
- Click on the map to define a polygon entity.
- Enter a name for the polygon.
- Click on "Add place".
- See tweets from your new entity!
Source Code:
http://code.google.com/p/geo-api/source/browse/trunk#trunk/demos/empire