Thursday, April 24, 2014

Custom Map Layers

In the past, I've struggled with the balance between providing a wide range of map layers and keeping the layer list relevant for the majority of users.  The approach I originally adopted was to provide a large base list and a way to customize which layers were visible on the screen.

This turned out to be a bad idea all around.  It create a lot of work for me, most people never saw the customize link, and even those who did see it had no way of knowing if the list of available layers had changed.  Despite my best intentions, this was not the right way to expand CalTopo's support for regional or statewide map layers.

The almost-invisible layer customization link

The layer customization link is gone, as are some of the more obscure, little used map layers.  Instead, you can now add any tiled or WMS map source as a custom layer, and use it with almost all of CalTopo's features, including PDF generation and KMZ exports.  Start by clicking + Add New Layer in the left bar, and then Add Custom Source:

The two map types supported are tiled sources, which use Google Maps' tile pyramid structure popular with commercial map sources, and WMS, which is generally served up by government sites running some variation of ArcGIS.  The overlay property at the bottom of the dialog determines whether the layer shows up as a checkbox like the contour and fire history layers, or shows up in the standard layer dropdown with an opacity slider.

Max zoom applies to tiled layers only; many of these sources are supplied across a limited range of zoom levels (most of CalTopo's go to 16).  As long as this is set right, CalTopo will take over and automatically blow the source tiles up so you can keep zooming past this level.

This is all fairly advanced stuff.  For casual users, there's also a dropdown that auto-fills the form fields from a predefined layer list.  Currently this only has two options - the older USFS PBS maps and CalTopo's older Alaska-specific topo layer - but over time the list will grow to include datasources that don't meet the bar for inclusion in CalTopo's default list.

Beyond local and regional layers, I expect this will also include various federal government WMS datasources.


  1. I was trying to add OSM open cycle - Outdoors map layer through the custom source tool and was having issues with it. The source is from and I was trying to use the Outdoors map which is basically a modified layer of the cyclemap. Not sure if I was doing something wrong but I tried several different variations of the url and different subdomains and different settings but I could not get this to load properly. Any ideas? Or do you know if this map layer will be added as a default layer in the future? Thanks!

    1. I don't know if I'll add it as a default layer, since there isn't a ton of differentiation v. opencyclemap, some the rendering decisions are still visually distracting (e.g. patterned backgrounds) and frankly the OSM data is still not as useful as I'd like for backcountry purposes.

      Add it as a tile layer, zoom 18, with the following URL template:{Z}/{X}/{Y}.png