Add Custom 1, 2, 3 Backgrounds
Description
Here is an idea that only takes one minute of coding: Instead of just:
- Custom
have:
- Custom 1
- Custom 2
- Custom 3
Screenshots

A workaround for this is, to add the different URLs with a hash # in between. This way, they are saved in your session and you can easily switch. Example for three URLs:
https://mapproxy.codefor.de/tiles/1.0.0/strassenbefahrung/mercator/{z}/{x}/{y}.png#https://mapproxy.codefor.de/tiles/1.0.0/zoom/mercator/{z}/{x}/{y}.png#https://mapproxy.codefor.de/tiles/1.0.0/baumbestand_0_1_3_4_merged/mercator/{z}/{x}/{y}.png
Here is an idea that only takes one minute of coding:
Please refrain from making work estimates without providing more precise details about the code that would need to change. Handwaving discourages others from coming up with a satisfactory solution that may be more complicated than originally thought.
A workaround for this is, to add the different URLs with a hash
#in between.
Wow. How did you figure that out?
From https://github.com/osmlab/editor-layer-index/issues/2335
Instead of having a single Custom layer that can be edited:
I would like to be able to add multiple Custom layers. I am constantly switching back and forth between Strava Heatmap and the "Hillshade Multidirectional" version of 3DEP (because the default "Hillshade Gray" 3DEP hides details in shadows when editing climbing cliffs) so I have to paste the URLs each time.
The simplest way to do this would probably just be to add a few more, so it's like "Custom 1" "Custom 2" "Custom 3" instead of just a single Custom slot.
@1ec5 How long would it actually take?
How long would it actually take?
I don’t know, but here’s where we currently define a custom source. It would have to be generalized a bit.
https://github.com/openstreetmap/iD/blob/010a812eaccbdd2a65fa6e099b4ab3cb7cc499e1/modules/renderer/background_source.js#L564-L608
Here’s where the background layer list responds to a change in selection:
https://github.com/openstreetmap/iD/blob/010a812eaccbdd2a65fa6e099b4ab3cb7cc499e1/modules/ui/sections/background_list.js#L246-L272
Here’s where the Custom Background dialog box persists the custom layer in preferences:
https://github.com/openstreetmap/iD/blob/010a812eaccbdd2a65fa6e099b4ab3cb7cc499e1/modules/ui/settings/custom_background.js#L14-L20
There are a few other odds and ends around the codebase, but that should be the meat of it.