So I’m going to do some writing on zoom-level design techniques or tactics for digital, interactive, mapping on devices. I figure this is one of the biggest issues we face as cartographers of digital map products so it merits quite a bit of in-depth instructional material. However, that kind of material hasn’t really been written up in a systematic way that I know of yet. We’ve got some guidance on it over at Mapbox (Styling for zoom levels) but not much else.
These are some of the topics that I think should be covered, but I am sure there are more:
- How to create and use a zoom field in your data. This would be a tutorial on, for example, showing only the larger cities at larger zoom levels and adding in smaller cities as the user zooms in. To do this you have to specify both the zoom level that the user has clicked on as well as specify what data to grab using the zoom field. So let’s say you have a zoom field in the data called “zoomlevel”, you’d have code that looks something like
[zoom<8][zoomlevel=1] {styling for cities with zoomlevel of 1}
[zoom>=8][zoomlevel=2]{styling for cities with zoomlevel of 2}
- How to incrementally change the styling based on the zoom level. So your line styling for road widths might increase by .5 at each zoom level, for instance. Along with this is the idea of best practices. If you are using the same width for all road lines at zooms 3 through 5 you could just denote it in one line of code such as
[zoom>=3][zoom<=5] { styling }
This has the benefit of simplifying and lessening the length of your code. But it might be better to separate it out into different lines so that you can go back in and tweak the styling more easily (I prefer it this way as long as it doesn’t get too long):
[zoom=3] { styling }
[zoom=4] { styling }
[zoom=5] { styling }
- I think there should be some tips on how to test as well. For example, I’ve found that testing figure-ground separators (land/water halos) at zooms 3 and 4 is easiest when looking at small islands, because then you can really see if you are completely obscuring the land or not with your halo. Other testing tips* might include making sure you pan around to find where the seams are in the tiles to ascertain whether or not labels are being cut off, and what to do if that occurs.
- Including a nice table on how zoom levels relate to map scale would be handy for the reader too.
- Guidelines on which common map features might be best to show at which zoom levels. Maybe this would also be a table that shows, for example, that local roads should show up at zooms 12 and higher. Of course, these would just be guidelines for those who need to construct quick maps, not standards to adhere to at all costs.
This is just a start. Please, if you have anything to add that will help those who are just beginning to create digital maps, things that you wish you had known from the get-go, let us know in the comments!
* Could be a whole chapter of itself. Especially if you open the can of worms called “unit testing for maps”. Which is sorely needed. Anyone having information on techniques for that or links for us please share.
#1 by Keith on August 22, 2013 - 4:43 pm
The most important thing to me about coding maps is to make sure you go through each and every zoom level that you’re going to export and scrutinize it. Just because it looks good at zoom 5 doesn’t mean it’ll look good at zoom 12!
#2 by Edward on August 23, 2013 - 3:10 am
Overall aim of the exercise is to show enough detail at each zoom level. On the one hand avoid information overload, but certainly when it comes to reference maps, you have to ensure geographic consistency as well. With this, I mean topological consistency within a road network, but also the geographic relations between “layers”, e.g, the interplay between road network density and settlement patterns.
My primary tool is some form of the ScaleMaster grid by Cynthia Brewer et.al. (http://www.personal.psu.edu/cab38/ScaleMaster/).
Instead of putting a zoomlevel field in the data, I would suggest to emphasise on classification of the data that allow you to show classes of map objects at particular zoom levels. This allows you to play with the visualisation without having to update the zoomlevel field in case you decide not to show a particular class of map objects at that zoom level.
Also, Eric Fisher’s experience is very insightful (http://www.mapbox.com/blog/mapping-millions-of-dots/), in the sense that scaling does not only involve object resizing and object removal, but also changing the brightness.
#3 by G.P. on August 23, 2013 - 6:44 am
@Edward Thanks for your insight!
#4 by G.P. on August 23, 2013 - 11:23 am
@Keith Good point!