mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Better configure Carto Basemaps (#1267)
This commit is contained in:
parent
673f769237
commit
0ae676d9ba
@ -64,10 +64,12 @@ class HaPanelMap extends LocalizeMixin(PolymerElement) {
|
|||||||
this.$.map.parentNode.appendChild(style);
|
this.$.map.parentNode.appendChild(style);
|
||||||
map.setView([51.505, -0.09], 13);
|
map.setView([51.505, -0.09], 13);
|
||||||
Leaflet.tileLayer(
|
Leaflet.tileLayer(
|
||||||
'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png',
|
`https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}${Leaflet.Browser.retina ? '@2x.png' : '.png'}`,
|
||||||
{
|
{
|
||||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="https://carto.com/attributions">CARTO</a>',
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>, © <a href="https://carto.com/attributions">CARTO</a>',
|
||||||
maxZoom: 18,
|
subdomains: 'abcd',
|
||||||
|
minZoom: 0,
|
||||||
|
maxZoom: 20,
|
||||||
}
|
}
|
||||||
).addTo(map);
|
).addTo(map);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user