ActionScript Flickr API + Geo information

ActionScript Flickr API + Geo information

Jan 12
Google Buzz

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:

(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:

 

Leave a Reply

ERROR: si-captcha.php plugin says GD image support not detected in PHP!

Contact your web host and ask them why GD image support is not enabled for PHP.

ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

Contact your web host and ask them why imagepng function is not enabled for PHP.