MapComplete now always zooms up to level 21 with overzoom, fix #606

This commit is contained in:
Pieter Vander Vennet 2022-01-08 20:02:07 +01:00
parent 7a43b55245
commit 965faca0e5
6 changed files with 18 additions and 13 deletions

View file

@ -156,11 +156,12 @@ export default class AvailableBaseLayersImplementation implements AvailableBaseL
const isUpper = urlObj.searchParams["LAYERS"] !== null;
const options = {
maxZoom: maxZoom ?? 19,
maxZoom: Math.max(maxZoom ?? 19, 21),
maxNativeZoom: maxZoom ?? 19,
attribution: attribution + " | ",
subdomains: domains,
uppercase: isUpper,
transparent: false
transparent: false,
};
for (const paramater of paramaters) {
@ -186,8 +187,9 @@ export default class AvailableBaseLayersImplementation implements AvailableBaseL
return L.tileLayer(url,
{
attribution: attribution,
maxZoom: maxZoom,
minZoom: 1,
maxZoom: Math.max(21, maxZoom ?? 19),
maxNativeZoom: maxZoom ?? 19,
minZoom: 1,
// @ts-ignore
wmts: isWMTS ?? false,
subdomains: domains

View file

@ -93,7 +93,7 @@ export default class UserRelatedState extends ElementsState {
return
}
if(this.layoutToUse.id.startsWith("http")){
if(this.layoutToUse?.id?.startsWith("http")){
if(!this.installedThemes.data.some(installed => installed.id === this.layoutToUse.id)){
this.installedThemes.data.push({