Arranging photos on a map

179 Views Asked by At

I am trying to create an application where photos are laid out on a map such that they are close to the lat/lon they correspond to, and yet do not overlap with each other.

An example of what I am after: http://snapshot.trulia.com/NY/New_York/#most_expensive

I believe this is a physics-based layout. Any pointers on how something like this might be accomplished? Any pointers with sample code would be doubly helpful :-)

1

There are 1 best solutions below

0
On

You can frame this as an optimization problem.

For each given photo, the variables are angle and distance from the photo's desired lat/long "tie" point.

Your fitness function could be the sum of the distances for all the photos. Your optimization algorithm would work to minimize this.