Closed ildar170975 closed 1 month ago
You can override the maxZoom of the tile layer: https://leafletjs.com/reference.html#tilelayer
tile_layer_options:
maxZoom: 25
@ildar170975 would you mind adding this in the readme in a PR?
I would add details to readme as soon as understand it... See some strange behaviour:
Define maxZoom=20 - a map is not shown:
Zoom out, zoom in (press "-", then "+") - a map is shown.
type: custom:map-card
entities:
- entity: person.ildar
tile_layer_options:
maxZoom: 20
Odd, can you look at the console and see if there are any issues loading? (especially in the networking tab)
Console:
As for "Network" - not sure where to find:
It does mention BadRequest on the zoomed in 20 ones (first screenshot).
As for PR for readme: in a stock map card a value is 20: https://github.com/home-assistant/frontend/blob/76daa2bb7fa0676399d2ec40055deba0db23de9a/src/common/dom/setup-leaflet-map.ts#L50 So may be we should add as an example this "maxZoom: 20" case.
It does mention BadRequest on the zoomed in 20 ones (first screenshot).
Interesting, I wonder are there any differences with a stock map card then. No errors here:
type: map
entities:
- entity: person.ildar
default_zoom: 20
theme_mode: auto
@nathan-gs Thanks for a useful example in Readme!
Do you have any idea what could be a reason of a glitch described here?
Compare these cards - ha-map (left) & stock map (right):
Same building; on the left card I cannot zoom in more. Seems to be using same OpenStreetMap. Are there any limitations for zooming?