OpenFlights

News from OpenFlights, the site for flight logging, mapping, stats and sharing

Airport codes and dynamic clusters, oh my

4 Comments

Codes and clusters demoToday OpenFlights rolls out a very simple feature indeed: airport codes are now shown on the map, right next to each airport.  Better yet, if you happen to forget what “BHX” or “NTQ” stands for, just hover your mouse over the airport icon and it will pop up a label reminding you that they’re “Birmingham, United Kingdom” and “Wajima-Noto, Japan” respectively.

But wait, there’s more!  To speed things up a bit and reduce clutter on screen, we’ve also rolled out a funky feature called dynamic clustering.  In plain English, this means that if you’ve got a lot of airports smushed up into a small space, OpenFlights will now show only a single airport on your map.  There are two ways to know that there’s more here than meets the eye:

  1. If one airport is more important than the others (has more flights), that airport will be shown as the usual but with a “+” character added to the code, like “SIN+“.
  2. If all airports are roughly the same size, they will be shown with a special cluster icon .

In either case, just click on the airport icon to get a list of all airports, and then you can pick the one you wanted.  Alternatively, just zoom in and the hidden airports will magically show up.

One final change: the simple-yet-oh-so-confusing hand/lasso (“select/region”) map controls are now history and OpenFlights is now always in “select” mode, where a single click selects airports and a double click zooms.  If you want to select a region to zoom into, hold down the Shift key, then click and pull the selection rectangle.

Making all this happen required an upgrade to our OpenLayers mapping software and a lot of poking about in the background (an excruciatingly detailed technogeek explanation can be found here), so please do let us know ASAP if anything seems wonky.  Feedback about the clustering is also welcome: is it great, terrible or somewhere in between?  The current cluster rule is “3 or more airports within 15 pixels get clustered”, should we be more aggressive or more laid-back?

Dynamically clusterphobic,
-jani

4 thoughts on “Airport codes and dynamic clusters, oh my

  1. Great work!

    It works for me in Europe, but LGA and JFK are bunched up when zoomed out. Both have 2 flights.

    Like

  2. That’s by design: the clustering code currently only merges groups of three or more airports. Right now, the two airports are the same size, but if (say) JFK had more flights, it would be drawn on top of LGA and perhaps with a larger icon.

    -j.

    Like

  3. Openlayers 2.8 Cluster Strategy seems slow with Zooming and it is a known issue out there. How does your app render so fast when zooming while you seem to do a lot of custom cluster rendering. Please help!

    Like

Leave a comment