custom Preset Layer selections

Keith D.'s Avatar

Keith D.

30 Mar, 2018 03:49 AM

I have a couple of custom sets of layers that I use frequently.

For example, to evaluate a landscape for photography potential, I'll setup custom relief shading with low-angle sunlight, then overlay custom DEM showing heavy tree cover in dark green and the highest peaks in red, a layer with OSM or USFS trails, and maybe one other layers depending on the amount of clutter I can tolerate. I would have a different setup for daytime hiking, and yet another for transportation to the trailhead.

The problem is, it's tedious to switch between these different layer configurations and reconfigure everything each time. request is for a way to save our own Preset Layers.

  1. Support Staff 1 Posted by matt on 30 Mar, 2018 05:07 AM

    matt's Avatar

    It's something I've thought about, and it will probably happen at some point, but I couldn't provide a timeframe.

    As a temporary workaround - I can pretty much guarantee that this will stop working at some point, and there may be hidpi related scaling issues - you can create a custom layer with your specific overlays.

    Open a blank map, set the layers up the way you want and pan the map to reset the URL hash. The URL hash has 4 parameters you care about - b (base layer), o (overlays), n (opacity of those overlays) and a (alpha layers, aka the checkboxes on the layer control). You want to combine these into a single comma separated list, overlay layers specified as layer@(100*opacity).

    For example, if you see:


    the resulting string would be:


    Do Add New Layer -> Add Custom Source. In the URL Template field, you would then enter:{Z}/{X}/{Y}.png?layers=t,r@25,sl...

    Use the "save to account" link so that you can come back to this later.

  2. 2 Posted by Keith D. on 30 Mar, 2018 12:50 PM

    Keith D.'s Avatar

    You are the best Matt!!!

    I thought of another solution too (kind of). Render the layers to a static image (take screenshots and assemble into a bigger image) and host them somewhere, then georeference the image to the map. Switch images to switch views. Would only work on small extents obviously....but probably lightens the load on your server to not have to render all the layers.

  3. Support Staff 3 Posted by matt on 30 Mar, 2018 04:03 PM

    matt's Avatar

    There's enough caching that layer rendering is pretty cheap, even viewsheds / sunlight.

  4. System closed this discussion on 02 Oct, 2019 04:24 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac