Update map.markdown for geolocation focus option (#35454)

This commit is contained in:
Petar Petrov 2024-10-29 15:48:28 +02:00 committed by GitHub
commit f6e888f86a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,11 +58,11 @@ type:
type: string type: string
entities: entities:
required: true required: true
description: List of entity IDs or `entity` objects (see below). Either this or the `geo_location_sources` configuration option is required. description: List of entity IDs or `entity` objects (see [below](#options-for-entities)). Either this or the `geo_location_sources` configuration option is required.
type: list type: list
geo_location_sources: geo_location_sources:
required: true required: true
description: List of geolocation sources. All current entities with that source will be displayed on the map. See [Geolocation](/integrations/geo_location/) platform for valid sources. Set to `all` to use all available sources. Either this or the `entities` configuration option is required. description: List of geolocation sources or `source` objects (see [below](#options-for-geolocation-sources)). All current entities with that source will be displayed on the map. See [Geolocation](/integrations/geo_location/) platform for valid sources. Set to `all` to use all available sources. Either this or the `entities` configuration option is required.
type: list type: list
auto_fit: auto_fit:
required: false required: false
@ -134,6 +134,22 @@ focus:
type: boolean type: boolean
{% endconfiguration %} {% endconfiguration %}
## Options for geolocation sources:
If you define geolocation sources as objects instead of strings (by adding `source:` before the ID), you can add more customization and configuration.
{% configuration %}
source:
required: true
description: Name of a geolocation source, or `all`.
type: string
focus:
required: false
default: true
description: When set to `false`, the entities of this source will not be considered for determining the default zoom or fit of the map.
type: boolean
{% endconfiguration %}
## Examples ## Examples
```yaml ```yaml
@ -150,6 +166,8 @@ entities:
type: map type: map
geo_location_sources: geo_location_sources:
- nsw_rural_fire_service_feed - nsw_rural_fire_service_feed
- source: gdacs
focus: false
entities: entities:
- zone.home - zone.home
``` ```