Tagged: FlickrAPI

To demonstrate the power of the Google Maps JavaScript API, I wrote a program to manipulate geotagged Flickr photos on a map. The Trackr app makes photos appear in the order they were taken, in sync with an animated timeline.

It’s similar to the Mappr app (see A Better Way to Map Photos). Once Mappr’s photos auto-disperse from each other, its map is static until you hit a key to assign the photos to new positions. Trackr’s photos don’t move; instead, their appearance reflects the set’s timeline.

The program is entered via the Trackr Panel, where you configure it to select which photos to display and how to display the photos. The panel builds parameters for the URL for the PHP program, where the real work takes place. » Continue Reading…

Previous projects combined geotagged Flickr photos with the Google static maps, but the data was presented side-by-side. To truly combine the data, I went from Static Maps API V2 to Google Maps JavaScript API V3. (ShowPix used static maps; see Using “Where on Earth” Codes in Flickr.)

The JavaScript maps are dynamic, multilayered elements that you can manipulate through the document object model (DOM). Of course, that increases their complexity, because now you have server-side code writing JavaScript to be executed on the client side.

Mappr is a small browser app that displays geotagged photos on a map. In order to keep the display free of controls, it has a separate control panel where you configure which photos to display, and how to display the photos. The Mappr Panel is the starting point for the app. » Continue Reading…

Many of the methods available in the Flickr API require an argument called “user_id,” for which you provide the user’s NSID. Flickr doesn’t seem to spell it out, but NSID typically means network services identification. Flickr users will often refer to it as the “at” number, since they all contain the @ symbol, like 77945684@N00.

When a user creates their Flickr account, the NSID (assigned by Flickr) appears in the web addresses for the photos and profile. But once a user picks a custom alias for their web addresses, it can be hard to find their NSID. An easy trick to finding it is by clicking on any user’s icon (including your own). There are also mini applications on the web that make it easy, such as Fusr and idGettr.

I created my own app, Flickr Findr, allowing you to discover the NSID given a user’s name, email, or alias. It works by sending the input to up to three Flickr API methods, stopping when an NSID is found. The first method is flickr.people.findByUsername, followed by flickr.people.findByEmail and then flickr.urls.lookupUser.

Finding a Flickr User’s ID

The previous version of the ShowPix app used a bounding box to look for geotagged photos (see Searching Time & Place by Interestingness on Flickr). But if you want to search within a political boundary, most of the time a rectangle won’t be a good fit. The Flickr API offers two solutions, both in the flickr.photos.search method: woe_id (where-on-Earth identifier) and place_id.

The place ID codes are used only within Flickr, while WOE ID codes are supported by Yahoo! Geo Technologies. (Flickr was founded in 2004, and bought by Yahoo in 2005.) So, I’m going to play with WOE ID codes since they can be reused by applications other than Flickr. Yahoo has a Key Concepts page that explains how WOE IDs work.

The app now accepts WOE IDs in place of the bounding box, which significantly shortens the URL. But first you need to find the WOE ID to use in the call. One place to start is Flickr’s Geo API Explorer, which starts off with the parent (or should I say, mother) of all other places, the Earth itself, which unsurprisingly has a code of 1. » Continue Reading…