ActionScript Flickr API + Geo information

Many of you – at least if you have been hacking with Flex or Actionscript – have came across AS3FlickrLib. This is a really nice library to use flickr in your ActionScript projects. The project seem to have stopped at version 0.87 and this version still don’t handle Geo positioning and info.
If you are in to create a mash up between Google Maps and Flickr, Geo info is quite nice. So, messing around, I extended a bit the Library so you can get the Geo Info and do geo searches.
First, here are the golden files:
- The source: FlickrGeo Source
- The SWC: FlickrGeo SWC
(remember, thy are just the AS3FlickrLib v.0.87, with a little more code)
Now you have a new search method on the Photos class:
public function searchGeo( user_id:String = "",lat:* = null,lon:* = null, radius:* = 5,tags:String = "", tag_mode:String = "any", text:String = "",min_upload_date:Date = null, max_upload_date:Date = null,min_taken_date:Date = null, max_taken_date:Date = nulllicense:Number = -1,extras:String = null, per_page:Number = 100, page:Number = 1, sort:String = "date-posted-desc" );
This is quite similar to search function, but the only added part is just “lat”, “lon” and “radius”. They all do what you might expect, and if not defined you still receive the latitude and longitude of photos.Oh, “lat” and “lon” must be numbers ![]()
Ok, now you’ve done the search and got your photos. To access the lat / lon, just do something like “photo.latitude” or “photo.longitude”.
Pretty simple, as it was expected.
Here is an example of a mash up that show you the most interesting HDR (want to know what they are?) photos in a 32 km range of Lisbon, Portugal. (great city, so great photos). If you clicked them, the photo page will open on a new window.
Give it a try:
About this entry
You’re currently reading “ActionScript Flickr API + Geo information,” an entry on In an Airplane Under the Sea
- Published:
- 1.12.09 / 2am
- Category:
- RIA
Was it any good?





No comments
Jump to comment form | comments rss [?] | trackback uri [?]