mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Add default_zoom to map card docs. (#6113)
This commit is contained in:
parent
c9e8f61ede
commit
4fafc660f5
@ -40,17 +40,29 @@ aspect_ratio:
|
|||||||
description: "The map's height:width ratio."
|
description: "The map's height:width ratio."
|
||||||
type: string
|
type: string
|
||||||
default: "100%"
|
default: "100%"
|
||||||
|
default_zoom:
|
||||||
|
required: false
|
||||||
|
description: The default zoom level of the map.
|
||||||
|
type: integer
|
||||||
|
default: 14 (or whatever zoom level is required to fit all visible markers)
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
Only entities that have latitude and longitude attributes will be displayed on the map.
|
Only entities that have latitude and longitude attributes will be displayed on the map.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p class="note">
|
||||||
|
The `default_zoom` value will be ignored if it is set higher than the current zoom level
|
||||||
|
after fitting all visible entity markers in the map window. In other words, this can only
|
||||||
|
be used to zoom the map _out_ by default.
|
||||||
|
</p>
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
## {% linkable_title Examples %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- type: map
|
- type: map
|
||||||
aspect_ratio: 100%
|
aspect_ratio: 100%
|
||||||
|
default_zoom: 8
|
||||||
entities:
|
entities:
|
||||||
- device_tracker.demo_paulus
|
- device_tracker.demo_paulus
|
||||||
- zone.home
|
- zone.home
|
||||||
|
Loading…
x
Reference in New Issue
Block a user