Open InsertUser opened 3 months ago
This can be done in code by using the override
:
{
"builtin": [
"bike_cafe"
],
"override": {
"minzoom": 11
}
}
However, this cannot be configured in studio, only in code because this would be a lot of complexity, both to implement and for the less experienced users.
(Note that I initially setup studio to create rather simple themes and to later on fuse them back into the official mapcomplete)
OK, I've bodged that into the configuration file and it appears to be mostly working. When I zoom way out the cluster numbers still appear for the overridden layers but I think that's just a mild issue.
Doing this confuses the studio's layer tab but I suppose that's to be expected when using unsupported features.
This can be done in code by using the
override
:{ "builtin": [ "bike_cafe" ], "override": { "minzoom": 11 } }
Can this be done with custom layers as well? For example, how can I override the following layer in my theme? https://studio.mapcomplete.org/8770388/layers/groupcampsites/groupcampsites.json
When using pre-existing layers in a new theme the zoom levels for visibility are inherited from the layer
minzoom
. In many cases this is a good default, but in other this can be a distraction from the main focus of the theme especially if this "secondary" type of POI is much more prevalent than the focus of the theme.If would be very useful to be able to assign a higher
minzoom
to certain layers on theme creation rather than the author having to just use what was set up for the layer. I think this feature might be available for hand coded json themes (e.g. on the pets theme), but is not surfaced in the Studio UI.A workaround at the moment is to create a duplicate of the layer you want to modify the zoom levels of and change the
minzoom
as a layer property, but this means that the theme creator doesn't benefit form any later improvements to the original layer and in the case of official layers the layers can be very 'fragile' as they contain a number of features not available in Studio UI.