To demonstrate how this works, I?e created a quick mashup of neighborhoods in San Francisco derived from Craigslist. It looks like this:
First, I used the badger page to generate my HTML snippet. By default, the badger will use the World Explorer GeoRSS feed we created of tags derived from over 7M geotagged photos on Flickr. But we also allow you to create your own custom GeoRSS tag feed to display on the map. That is what I did here - I created a GeoRSS feed containing the name of each neighborhood as the tag to display on the map, along with the lat/long coordinates of where to place the tag. On the badger page, I specified my own custom GeoRSS feed rather than using the default World Explorer GeoRSS feed. Finally on the badger page, I also specified that I will be implementing a callback function.
function onTagSelected(tag, tagid, tagLat, tagLon,
mapMinLat, mapMinLon, mapMaxLat, mapMaxLon, mapZoom)
This function will be called when the user selects a tag on my TagMaps badge. I know the tag that the user selected, the lat/long of the tag, as well as the bounding box (upper left, lower right) coordinates of the current map view. Read the documentation here.
Next, I implemented my 'onTagSelected" function to fetch and display interesting and useful information for the tag selected. First I grab the most interesting photos from Flickr with that tag, and videos from Yahoo! Video, questions and answers from Y! Answers using the Yahoo! APIs via JSON. I also grab the Wikipedia entry for the selected neighborhood tag and apartment listings from Craigslist, with a little help from our new friend, Yahoo! Pipes. You can see how I built my Wikipedia pipe here. If you haven? experimented with Pipes, I can? recommend it highly enough -- it? an incredibly powerful tool that will let you "rewire the web" with very little effort.
Finally, I put it up on my website. You can play with it live at: http://shaneahern.com/sfexplorer.html.
So hopefully this quick example of the new powerful what-you-asked-for embeddable TagMaps has sparked your imagination. The rest is really up to you. We?e looking forward to what you come up with.
Yahoo! Research Berkeley