JavaScript and Maps (in that order)

Mercator is the worst projection for web mapping, except for all the others.

Mercator gets a lot of crap on the internet these days. Linked post is pretty typical of them.  I want to be very clear when I say that I don’t think Mercator is very good, I just think it is better then all the current alternatives and I believe most people complaining about it haven’t thought through the pros and cons of web Mercator all the way through:

Cons:

  • Extreme size distortion as one moves away from the poles, making arctic and antarctic use impossible and making area calculations tricky.

Pros:

  • Its what people use.  This is by far the most important thing about Web Mercator and the one that cartographers coming from a world where every office uses their own custom projection are going to have trouble with.

    For 95% of maps on the web, what projection you are using doesn’t matter AT ALL. The needed precision is going to be so low that it honestly won’t matter. This means that the best projection is the one that gets the job done, which is the projection that everyone has written tools for and which data is already been created for. 

    There are a lot of tile services available for web Mercator, look at all the WMS services that you are not using to see why custom dynamic tiles are a bad idea. With current technology tiles work best when they are cached, which means you are going to need to predict what projection your data is going to be coming in.

    Speaking of all the tile services available, when you use the same projection that everyone else does it means you can easily overlay one thing on top of another without re-projecting which does tend to be time consuming operation at this point especially on mobile.

    Vector tiles may be a solution down the line, but they are still a work in progress, and no D3 tile re-projections are not going to work yet either, its slow and it will melt your phone.

  • Mercator preserves shape (conformal) and angles (technically preserves loxodromes)  There is a probably apocryphal story that I either saw on reddit or dreamed up, I can’t remember, it says that originally Google used a different projection on it’s maps, but changed it after Scandinavians complained that they couldn’t figure out which turns to take at intersections because the projection distorted angles at  high latitudes. 

    This is key because most maps are not going to be used for the whole world, they are going to be used for a subset of the earth (i.e. zoomed in). This is an advantage for Mercator because most of its cons only apply when zoomed out. 

    Same with shape, if I’m zoomed in having proper shape is much more important that it being sized relative to something I can’t see in my view.

  • Square shape, its important to not confuse simplicity with laziness. A simple thing is one that is easier to implement which is one that there are going to be more versions of faster. The square shape of the map makes calculating the zoom levels much much easier.

  • Its good enough, there actually are tools to make tiled maps in other projections these days. But the people making maps your actually looking at aren’t bothering to use them because there is honestly nothing much to gain. Sure it’s slightly more correct but at the cost of all the baggage related to conversion and making your map incompatible with so many tools.

If you really do dislike Mercator that much, here’s an idea, come up with something better that is worth the effort. I’ve outlined ideas in the past but I honestly don’t have enough of a push to bother taking the time to implement any because there really isn’t much of a need, if you disagree feel free to do something about it.

  1. valeriechristineanderson reblogged this from cwmma
  2. cwmma posted this