Parameters for Custom Online Maps

Peter H shared this idea 3 months ago
Gathering feedback

TLDR: Idea: changeable parameters for Custom Online Maps

These {parameters} are defined within each <provider></provider> entry in providers.xml as a list of possible values. The user can choose a combination of these parameters from the UI in Locus. Example:

  • {background}=[satellite, hybrid, terrain, osm]
  • {sport} = [hiking, cycle, mtb, winter]
  • {theme} = [lightTheme, darkTheme]



I would to propose a feature for Custom Online Maps:

Currently, if you have an online map with many possible combinations of layers, you need to create a new <provider> for each of these combinations. Therefor you can end up with a list of dozens of maps even though only a minor customization detail varies between each map. Your list of Custom Online Maps will be completely cluttered with dozens of entries.

For example: If you have a map where you can have a combination of different background maps (Satellite, Hybrid, Terrain, OSM) for different sports (Hiking, Cycling, MTB, Winter Sports) with two themes (Light, Dark), you end up with 4*4*2=32 possible map combinations. Thus you would need 32 different <provider> entries to cover all of them, completely cluttering your list of custom online maps, e.g.:{z}/{x}/{y}.png{z}/{x}/{y}.png

[... (30x) ...]

It would be very useful if you could use a single <provider> with custom parameters in the URL, that you can choose from the UI within the app. The URL would look like that:

You could define the parameter as an XML list in each <provider> entry. e.g. {background} = [satellite, hybrid, terrain, osm] could be written as:

<parameter id="background" name="Background" defaultvalue="osm">
     <option name="Satellite" value="satellite" />   
     <option name="Hybrid" value="hybrid" />    
      <option name="Terrain" value="terrain" />    
      <option name="OSM" value="osm" />
The user can choose a combination of map parameters from from a dropdown-menu within Locus, similar to these mock-up screenshots:




For example the user choosing the values "Satellite", "Winter Sports", "Dark Theme" would result in the following url:

Therefor a single <provider> map could cover all the possible 32 combinations of this map and you could quickly switch between the map variations.

I would appreciate, if you could consider my idea and I am happy for any feedback as well! Thank you so much for the already great app!

Code Example:


Replies (3)


PS: the reason why I am asking this, is that I'd like to use an online map with a total of >200 possible combinations of layers. I'd like to split them into five maps, with two selectable parameters each that have 5-8 possible values. So it is not a hypothetical idea, but an actual use case with an existing map!


This seems like a good idea. Please share some of these in the correct format. What is it about these maps you do not get in other maps...hence you need so many variations of them?


This would be for heatmaps, that are available for more than 30 sports in 6 different colors. Depending on the underlying base map some colors work better than others.

[ Also, an option to select the <maxZoom>{myMaxZoom}<maxZoom> with a chosable parameter {myMaxZoom} inside the app would be cool. For example I often combine heatmaps with maxZoom=20 (i.e. zoom level 12 in Locus) with background maps in zoom levels 13-15, because the lower resolution heatmaps are easier to read on higher zoom levels. ]

I could provide a file via PM

Leave a Comment
Attach a file