Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update map.markdown for geolocation focus option #35454

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions source/_dashboards/map.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ type:
type: string
entities:
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
geo_location_sources:
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
auto_fit:
required: false
Expand Down Expand Up @@ -134,6 +134,22 @@ focus:
type: boolean
{% 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

```yaml
Expand All @@ -150,6 +166,8 @@ entities:
type: map
geo_location_sources:
- nsw_rural_fire_service_feed
- source: gdacs
focus: false
entities:
- zone.home
```
Expand Down