Thursday, May 28, 2009

Mapping EXIF Images With GPS Info

Was tasked to load an EXIF image with GPS info onto a map using the Flex API for AGS. So I first looked around for existing AS3 libraries and found ExifInfo. Downloaded it and tried it, but somehow it failed loading some EXIF images. Then I remembered a JavaScript library that a colleague pointed it out to me. So I ported the code to AS3 (optimization will come later) and here is the result. I used picasa to load some images and geo-tagged them using Google Earth (that is from the Tools menu BTW) and it worked pretty well. I borrowed some ideas and code from the author of ExifInfo and made my own EXIF mxml enabled class. Like usual here is the source code. BTW - There is a TextInput field at the bottom of the application, enter the url of your image (make sure that you have a crossdomain.xml at the base of your url) and if the image has EXIF GPS info, the map will display it. Try "assets/sample1.jpg" and hit enter.

8 comments:

Unknown said...

Hey,

great sample.

We've taken mapping georeferenced photographs to the next level.

Check out http://photomapperserver.alta4gis.de/ for a demo. Use the guest account and upload your own pictures.

It's all based on ArcGIS Server 9.3.1 and the FLEX API. However we made some heavy adjustments like server side clustering, implemented user authentification and are currently working on roles and organizing photos in albums.

Ole

thunderhead said...

This is _very_ cool - glad to see how u put all these technologies together. Stay tuned more to come :-)

CheckMate808 said...

oh.. cool. I didn't realize what this was doing until looking at the exif library site. it's reading the file tags off the jpg.

surfball2006 said...
This comment has been removed by the author.
thunderhead said...

Welcome to flex and ags - srouce code link is in the post :-)

surfball2006 said...

Hi Ole

This questions was ment for you. I realy liked the http://photomapperserver.alta4gis.de/ you have done. Looking for the source code as to use it on my server(Also going the FLEX way). As previosly said, I am a newbee and would apprecate as much help.

Petr said...

Hi, Ole,

I´d like to implement somethink as you prezent in your AGS 9.3.1 and Flex application. Is it possible to get advice or some sample source code for inspiration ? I´m not progerammer, but bigginer with FlexViewer. I´m modifiing the FlexViewer 2.4 and use AGS 9.3.1 as You.
Thanks in advance for any help.

Petr

Petr said...

Hi, Ole,

I´d like to implement somethink as you prezent in your AGS 9.3.1 and Flex application (http://photomapperserver.alta4gis.de). Is it possible to get advice or some sample source code for inspiration ? I´m not progerammer, only bigginer with FlexViewer. I´m modifiing the FlexViewer 2.4 and use AGS 9.3.1 as You.
Thanks in advance for any help.

Petr