Photos on a Map

The results of a weekend project on placing a few photos from my photo gallery on a map using the newly released virtual earth service from MSN and the associated APIs.

I have a number of thoughts around richer presentation of photos in my photo gallery beyond the simplistic album/category display I currently have, and for almost a year now, I've been wanting to do something. But progress has been slow, and the scope of the project has been growing because I tend to lump up learning new technologies and stuff along with the functionality itself. Anyway, one of the big items on my list of ideas has been to get some really rich visuals around photos on a map.

Given my current scripting mindset (from Atlas project work), I was pretty excited when Virtual Earth was recently released publicly, and came along with an API I could use to prototype some ideas (there have obviously been other implementations - the geotagging concept seems to be gathering some interest lately).

The virtual earth API is actually really simple, but functional... just a bit of JavaScript-object dumping and inspection was sufficient to reveal the model (I didn't find any public OM - is there one? Virtual Earth team?). Within an hour I had a simple map with pushpins working. The harder parts of the weekend project were actually grappling with some DHTML-sizing (I tried CSS layout - it simply doesn't work for a whole range of scenarios... I really dislike CSS when it comes to defining layout... but I deviate...), and getting the images and visuals ready. On the left is a screenshot of the UI - you'll really have to try it out for yourself to be able to get the full effect, and see photos in their full size, by heading over to this prototype photo map page. Of course it inherits for free all the work from virtual earth to get smooth panning, zooming, mouse wheel, road map view, aerial view, etc. etc.

It works in IE and Firefox, but you'll really need IE to see all the snazzy fade effects implemented using filters and transitions.

Posted on Sunday, 7/31/2005 @ 7:47 PM | #Projects


Comments

29 comments have been posted.

Rajiv Menon

Posted on 7/31/2005 @ 9:56 PM
Awesome!

Eduardo

Posted on 8/1/2005 @ 2:50 AM
I've seen your blog and I think that your project Photos on a Map is very interesting. I want to make a similar visual effect in a static map, with the thumbnail popup and the gallery. I've used this javascript: http://www.walterzorn.com/tooltip/tooltip_e.htm, but I can't give it a transparent effect like this: http://www.netflix.com/BrowseSelection, or something similar to your project. Is your code project available in somewhere or could you help me to make it?

Thanks in advance

Hermann Klinke

Posted on 8/1/2005 @ 3:11 AM
Wow, that's awesome! You should contact flickr to get them integrate all pictures with this photo map! This would be a huge success, because I think that a lot of people are interested in this.

Ben

Posted on 8/1/2005 @ 8:14 AM
This is great stuff. I can't wait to have gps built into my camera so I can automatically create stuff like this. Now we just need this integrated into an offline blogging client. I want to be able to take pictures during my day, make quick comments via ink on the tablet, then combine it all at the end of the day based time stamps and gps data into blog posts that contain all the contextual information automatically.
Wouldn't that be great?

Javier G. Lozano

Posted on 8/1/2005 @ 9:37 AM
Great project, Nikhil! I was looking at something like this to add to my blog!

Nikhil Kothari

Posted on 8/1/2005 @ 11:25 AM
Eduardo - the shadow and translucency effects are implemented using png images. For IE6 and before you have to use the AlphaImageLoader filter to have their translucency take effect (should show up in any search, since its a common technique). I have also used the Shadow filter for the photo frame itself. The fade effects are done using transitions (search for css filter attributes) - these are supported by IE only amongst other cool media stuff.

Ben - I totally agree. I wish my camera had GPS as well. As for these, I created a sample page, again using Virtual Earth, and had it report latitude/longitude coordinates wherever I clicked.

mike

Posted on 8/1/2005 @ 11:53 AM
This looks like another similar app, Google-based, that identifies bus stops in Seattle:

http://www.busmonster.com/

Pretty cool.

stuart

Posted on 8/2/2005 @ 2:51 PM
I'd really like to see the code for this!

Snorrk

Posted on 8/3/2005 @ 4:37 AM
Very nice project, although I found a bug: When you double click the map to zoom in, it zooms in to the wrong coordinates.

Ed

Posted on 8/3/2005 @ 10:43 AM
I agree with all the above. Especially the would like to see the code part. btw, you take great pictures. Looking at those SD ones made me home sick.

Dave

Posted on 8/3/2005 @ 11:55 PM
this is really great stuff!

Raghu

Posted on 8/4/2005 @ 7:34 AM
One word Awesome! Can't wait to see the code, it will be great if you can add it to your project section.

Nikhil Kothari

Posted on 8/4/2005 @ 11:38 AM
Thanks for all the compliments... the source is actually available via "view source" ... which is both good and bad about script! It is however hacky, first stab-type of code. I think it would be factored and organized better, as well as use some OOP designs when I do it for real for my photo gallery.

On the double click bug, I am not sure why it happens... its all handled by virtual earth... but it seems specific to my use. Perhaps its in the way the map is being positioned on the page, as opposed to filling the entire page. Will have to follow up...

Janak

Posted on 8/8/2005 @ 8:46 AM
Nice pictures, what kind of camera do you have? Is it a digital SLR?

Thanks, Janak

Jason

Posted on 8/17/2005 @ 5:17 PM
What a fantastic application! This would translate really nicely into a photo journal for roadtrips.

Jason

Posted on 8/18/2005 @ 4:31 PM
Any chance you'd share your page that displays the lat/long where you click?

Ingo

Posted on 8/18/2005 @ 11:43 PM
Great!

Tony

Posted on 8/23/2005 @ 1:33 PM
Nikhil, simply amazing!
it's based on AJAX or dynamic forming <script> tag ?

Shawn

Posted on 9/14/2005 @ 6:08 PM
Maybe I'm dense but how do I see the other pictures associated with a marker. I see the one image and text indicating thier are 4 pictures but don't see how to view them.

Shawn

Posted on 9/14/2005 @ 6:10 PM
NM I wasn't getting over to the + in the bottom right corner before the Info Window would close.

Jesse

Posted on 10/3/2005 @ 1:39 PM
That is really great! Best use I have seen of Virtual Earth so far. I really like the interface. I also really enjoyed your PDC samples. Great learning experience for me. There isn't any chance you could post a sample of the photobrowser using a sql datasource for the pictures source is there:)

Matt

Posted on 10/5/2005 @ 1:56 PM
Any chance you are going to port this to Atlas with the VirtualEarthMap server control?

Sachin

Posted on 10/21/2005 @ 8:16 PM
nice work, got me interested into getting same sorta funcy on Google Map. Apologies for shamelessly copying your png files and pieces of the style but given that it was the first (late night) stab, I couldn't do any better. My first attempt can be seen @
http://sachiniscool.somee.com/default.html.

S
PS: the pics don't have the best resolution but I didn't have any program which would downsize an image properly (am using a free hosting :)), so had to rely on XP Send Image via email...different story that I don't have a SLR anyway.

Nikhil Kothari

Posted on 10/30/2005 @ 9:27 AM
I will be posting some new stuff that does use Atlas - in fact I have a map UI framework in the works. Stay tuned...

Erik

Posted on 11/9/2005 @ 11:43 AM
I have links to a number of web-mapping sites on my blog, this is the slickest UI i've seen so far...

Have a look at my blog if you're interested in georeferenced photos, you might find something of interest... http://geo.novelviews.com

Aaron

Posted on 3/15/2006 @ 3:09 PM
When will this be available for download? I love the application, I would think that adding a tracklog file to show the route in addition to the pictures that were taken would be ideal.
THanks,
Aaron

Aviris

Posted on 4/5/2006 @ 9:53 AM
I like the photos - but as of April 4, 10:30am MDT no map data shows up behind the photo points. I used IE and Firefox. Tried the tab for satellite image and for map data. Nothing.

My burning question has to do with where you get the geodata from. Do you have to enter it for each picture somewhere, or would it get the coordinates from the Exif header (all my JPG photos have the GPS coordinates in the EXIF header).

m bu

Posted on 5/17/2006 @ 9:42 AM
Hi Nikhilk,

Excellent sample app. I too, am interested in a richer presentation for presenting photo galleries. Was wondering if this sample was released or available for download anywhere?

Also want to compliment you on the photos in your gallery.

Thanks

Ted

Posted on 11/13/2006 @ 9:33 AM
I, too, cannot see any map data (sat or map) behind the placemarks. I'm using a Mac with OS X 10.4.8 (current as of this writing) and Firefox 2.0. I also tried Netscape 7.0, Safari (current version) and the lame OLD IE 5.2 for Mac, none of which showed any map data.
FYI.
The discussion on this post has been closed. Please use my contact form to provide comments.