Closed iwpnd closed 2 years ago
Totals | |
---|---|
Change from base Build c3aeca0fa: | 0.0% |
Covered Lines: | 5599 |
Relevant Lines: | 12367 |
Now that i think of it, it might not be necessary. It might suffice if you prompt the user that 0 is not a supported min zoom level and/or default to 1. Either way, your input would be much appreciated here @ARolek
@iwpnd the change you submitted is really simple, so no issues there. I'm trying to figure out why I put the logic check in for zoom == 0. Looking back at the blame history it was something I put in 5 years ago when I originally authored this file and I can't for the life of me remember why.
It might suffice if you prompt the user that 0 is not a supported min zoom level and/or default to 1
I like this idea. Just add a log in saying min_zoom of 0 is not supported. adjusting to '1'
.
Thanks for the PR and investigation.
@ARolek I'm afraid that won't work for max_zoom 0 as tegola sets the constant max zoom of 22 if the MaxZoom is left blank in the toml. Modifying ParseInt would potentially negatively impact other variables in the config, so that is not an option either.
edit: nevermind my dumb ass, i can just check whether value is 0 after I make sure that l.MaxZoom
is not a nil pointer.
Prior to this, setting min_zoom=0 and max_zoom=0 would result in the layer being present across the entire zoom range.
Should fix #870