Skip to content

add maxZoom for vectore#301

Open
T0biii wants to merge 2 commits intofreifunk:mainfrom
T0biii:patch-1
Open

add maxZoom for vectore#301
T0biii wants to merge 2 commits intofreifunk:mainfrom
T0biii:patch-1

Conversation

@T0biii
Copy link

@T0biii T0biii commented Feb 24, 2026

Description

maxZoom was missing when using vectore
still missing is order and mode (for nightmode)

Motivation and Context

How Has This Been Tested?

Tested via Codespaces npm install and npm run dev and custom vectore tiles config:
https://github.com/freifunkMUC/meshviewer/tree/test-vectore

Screenshots/links:

layers array bevor:

[
    {
        "name": "versatiles light",
        "layer": {
            "options": {
                "style": "light.json",
                "attributionControl": {
                    "customAttribution": "<a href='https://github.com/freifunk/meshviewer/issues' target='_blank'>Report Bug</a> | Map data &copy; <a href\"http://openstreetmap.org\">OpenStreetMap</a> contributor"
                }
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "versatiles dark",
        "layer": {
            "options": {
                "style": "dark.json",
                "attributionControl": {
                    "customAttribution": "<a href='https://github.com/freifunk/meshviewer/issues' target='_blank'>Report Bug</a> | Map data &copy; <a href\"http://openstreetmap.org\">OpenStreetMap</a> contributor"
                }
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "FFMUC OSM Proxy",
        "layer": {
            "options": {
                "maxZoom": 19,
                "attribution": "&copy; Openstreetmap | &copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
                "order": 2,
                "subdomains": [
                    "a",
                    "b",
                    "c"
                ]
            },
            "_url": "https://tiles.ext.ffmuc.net/osm/{z}/{x}/{y}.png",
            "_events": {
                "tileunload": [
                    {}
                ]
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "FFMUC OSM Proxy (Night)",
        "layer": {
            "options": {
                "maxZoom": 19,
                "mode": "night",
                "attribution": "&copy; Openstreetmap | &copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
                "order": 3,
                "subdomains": [
                    "a",
                    "b",
                    "c"
                ]
            },
            "_url": "https://tiles.ext.ffmuc.net/osm/{z}/{x}/{y}.png",
            "_events": {
                "tileunload": [
                    {}
                ]
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "FFMUC OSM.HOT Proxy",
        "layer": {
            "options": {
                "maxZoom": 20,
                "attribution": "&copy; Openstreetmap France | &copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
                "order": 4,
                "subdomains": [
                    "a",
                    "b",
                    "c"
                ]
            },
            "_url": "https://tiles.ext.ffmuc.net/hot/{z}/{x}/{y}.png",
            "_events": {
                "tileunload": [
                    {}
                ]
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "Esri.WorldImagery",
        "layer": {
            "options": {
                "maxZoom": 20,
                "attribution": "Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",
                "order": 5,
                "subdomains": [
                    "a",
                    "b",
                    "c"
                ]
            },
            "_url": "//server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
            "_events": {
                "tileunload": [
                    {}
                ]
            },
            "_initHooksCalled": true
        }
    }
]

layers array now:

[
    {
        "name": "versatiles light",
        "layer": {
            "options": {
                "style": "light.json",
                "attributionControl": {
                    "customAttribution": "<a href='https://github.com/freifunk/meshviewer/issues' target='_blank'>Report Bug</a> | Map data &copy; <a href\"http://openstreetmap.org\">OpenStreetMap</a> contributor"
                },
                "maxZoom": 19
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "versatiles dark",
        "layer": {
            "options": {
                "style": "dark.json",
                "attributionControl": {
                    "customAttribution": "<a href='https://github.com/freifunk/meshviewer/issues' target='_blank'>Report Bug</a> | Map data &copy; <a href\"http://openstreetmap.org\">OpenStreetMap</a> contributor"
                },
                "maxZoom": 19
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "FFMUC OSM Proxy",
        "layer": {
            "options": {
                "maxZoom": 19,
                "attribution": "&copy; Openstreetmap | &copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
                "order": 2,
                "subdomains": [
                    "a",
                    "b",
                    "c"
                ]
            },
            "_url": "https://tiles.ext.ffmuc.net/osm/{z}/{x}/{y}.png",
            "_events": {
                "tileunload": [
                    {}
                ]
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "FFMUC OSM Proxy (Night)",
        "layer": {
            "options": {
                "maxZoom": 19,
                "mode": "night",
                "attribution": "&copy; Openstreetmap | &copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
                "order": 3,
                "subdomains": [
                    "a",
                    "b",
                    "c"
                ]
            },
            "_url": "https://tiles.ext.ffmuc.net/osm/{z}/{x}/{y}.png",
            "_events": {
                "tileunload": [
                    {}
                ]
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "FFMUC OSM.HOT Proxy",
        "layer": {
            "options": {
                "maxZoom": 20,
                "attribution": "&copy; Openstreetmap France | &copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
                "order": 4,
                "subdomains": [
                    "a",
                    "b",
                    "c"
                ]
            },
            "_url": "https://tiles.ext.ffmuc.net/hot/{z}/{x}/{y}.png",
            "_events": {
                "tileunload": [
                    {}
                ]
            },
            "_initHooksCalled": true
        }
    },
    {
        "name": "Esri.WorldImagery",
        "layer": {
            "options": {
                "maxZoom": 20,
                "attribution": "Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",
                "order": 5,
                "subdomains": [
                    "a",
                    "b",
                    "c"
                ]
            },
            "_url": "//server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
            "_events": {
                "tileunload": [
                    {}
                ]
            },
            "_initHooksCalled": true
        }
    }
]

setting breakpoints works good to get all the infos
without zoom:
image

with zoom:
image

maxZoom was missing when using vectore
@T0biii T0biii mentioned this pull request Feb 24, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants