You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c5c54ec
Browse filesBrowse the repository at this point in the historyBrowse files
| `show_area` | boolean | `false` | Draw the feed's area, if it has one |
253
-
| `area_color` | string | `#1565c0` | Colour of the area outline: a name, hex or `rgb()` value. CSS variables do not work here |
254
-
| `labels` | boolean / `hover` / number | `hover` | Labels next to markers:`false`off, `hover` on mouse-over, `true` always, or a zoom level (e.g. `12`) to show them always from that level up and on mouse-over below it |
253
+
| `area_color` | string | `#1565c0` | Colour of the area outline as a name, hex or `rgb()` value. CSS variables do not work here |
254
+
| `labels` | boolean / `hover` / number | `hover` | Labels next to markers. `false` off, `hover` on mouse-over, `true` always, or a zoom level (e.g. `12`) to show them always from that level up and on mouse-over below it |
255
255
| `color_by` | enum | `kind` | `kind`, or `delay` for items with a delay (e.g. trains) |
256
256
| `delay_thresholds` | list | `[3, 10]` | Minutes late from which an item is shown as late (yellow) and very late (red) |
257
257
| `max_age_minutes` | number | none | Hide items whose position is older than this |
@@ -303,7 +303,7 @@ Without this plugin, ha-map-card's own `geojson` option draws the same entity as
303
303
## Development
304
304
305
305
The plugin is written in TypeScript and bundled with esbuild into the single file HACS installs,
306
-
`dist/ha-map-card-plugin-map-feed.js`. It has no runtime dependencies:Leaflet comes from ha-map-card.
306
+
`dist/ha-map-card-plugin-map-feed.js`. It has no runtime dependencies, since Leaflet comes from ha-map-card.
|`id`| string |**MUST**| Unique within the feed and stable between updates. The card uses it to move an existing marker and keep its popup open. Prefix it with the kind of identifier:`ship:230113940`, `train:2026-09-14/8`, `vehicle:LPR/1042`. |
66
-
|`geometry`| object |**MUST**| A GeoJSON `Point`, or a line or polygon: see [lines and polygons](#lines-and-polygons). WGS84 `[longitude, latitude]`. |
|`id`| string |**MUST**| Unique within the feed and stable between updates. The card uses it to move an existing marker and keep its popup open. Prefix it with the kind of identifier, as in`ship:230113940`, `train:2026-09-14/8`, `vehicle:LPR/1042`. |
66
+
|`geometry`| object |**MUST**| A GeoJSON `Point`, or a line or polygon (see [lines and polygons](#lines-and-polygons)). WGS84 `[longitude, latitude]`.|
67
67
68
68
## Feature properties
69
69
@@ -77,16 +77,16 @@ longitude first.
77
77
|`speed_kmh`| number | MAY | Speed over ground. Shown in knots for `ship.*` kinds, km/h otherwise. |
78
78
|`delay_minutes`| number | MAY | Negative means early. Used by `color_by: delay`. |
79
79
|`cancelled`| boolean | MAY | Shown as cancelled. |
80
-
|`badge`| string | MAY | Short text drawn inside the marker: `IC 8`, `5`. Keep it to a few characters.|
80
+
|`badge`| string | MAY | Short text drawn inside the marker, such as `IC 8` or `5`. Keep it to a few characters. |
81
81
|`label`| string | MAY | Text beside the marker when labels are on. Defaults to `name`. |
82
-
|`subtitle`| string | MAY | Second line of the popup: `Joensuu → Helsinki`.|
82
+
|`subtitle`| string | MAY | Second line of the popup, such as `Joensuu → Helsinki`. |
83
83
|`color`| string | MAY | CSS hex colour. Replaces the kind's default colour when the card colours by kind. |
84
84
|`details`| row[]| MAY | Popup rows, in display order. See [rows](#rows). |
85
85
|`notices`| string[]| MAY | Free-text notices shown under the rows. |
86
-
|`footer`| string | MAY | Small grey line at the bottom of the popup: `MMSI 210533000 · IMO 9466219`.|
86
+
|`footer`| string | MAY | Small grey line at the bottom of the popup, such as `MMSI 210533000 · IMO 9466219`. |
87
87
|`detail_action`| object | MAY | More details, loaded when the popup opens. See [detail actions](#detail-actions). |
88
88
|`images`| image[]| MAY | Pictures shown in the popup, such as a road camera's views. See [images](#images). |
89
-
|`point`| string | MAY |Lines and polygons only: the `id` of the Point feature they belong to. |
89
+
|`point`| string | MAY |The `id` of the Point feature a line or polygon belongs to.|
90
90
91
91
Properties the card doesn't know are ignored.
92
92
@@ -106,7 +106,7 @@ kind is drawn as a plain dot.
106
106
107
107
Road works, announcements, accidents, weight restrictions and exempted transports are drawn as a warning sign,
108
108
`road.camera` as a camera, and `bird` as a bird. A bird's badge starts with a small bird. The popup of something
109
-
that moves (ships, trains, transit and `road.maintenance`) shows how old its position is; for everything else it
109
+
that moves (ships, trains, transit and `road.maintenance`) shows how old its position is. For everything else it
110
110
shows when the item was updated.
111
111
112
112
### Rows
@@ -138,7 +138,7 @@ a place, and the item's `images` when the pictures belong to the item as a whole
138
138
}
139
139
```
140
140
141
-
The card translates only what it renders itself: ages, speeds, delays and "cancelled". Everything else
141
+
The card translates only what it renders itself, which is ages, speeds, delays and "cancelled". Everything else
142
142
comes from the source in its own words, so a feed can carry any data without a card release.
143
143
144
144
### Images
@@ -174,13 +174,13 @@ When the popup is opened, the card calls the action with a response requested. T
174
174
175
175
## Lines and polygons
176
176
177
-
Features MAY have a `LineString`, `MultiLineString`, `Polygon` or `MultiPolygon` geometry: a stretch of road
178
-
under construction, the route a snow plough has driven, a road section's driving conditions, an area.
177
+
Features MAY have a `LineString`, `MultiLineString`, `Polygon` or `MultiPolygon` geometry, such as a stretch of
178
+
road under construction, the route a snow plough has driven, a road section's driving conditions or an area.
179
179
180
180
They take the same properties as points, apart from the ones about movement and markers (`heading`,
181
181
`stationary`, `speed_kmh`, `delay_minutes`, `cancelled`, `badge`, `label`, `detail_action`), which are ignored.
182
182
The card colours them by `kind` or `color`, shows `name` on hover, and opens a popup when they are tapped and
183
-
have something to show. Road kinds are drawn wider than other lines;`road.maintenance_track` is drawn thin and
183
+
have something to show. Road kinds are drawn wider than other lines, and`road.maintenance_track` is drawn thin and
184
184
faint, so routes stay in the background.
185
185
186
186
A line or polygon MAY belong to a Point feature, named in its `point` property. It is then drawn in that point's
@@ -229,7 +229,7 @@ example with the Douglas–Peucker algorithm and a tolerance of 10–20 metres.
229
229
## Rules for sources
230
230
231
231
- Integrations **MUST** list `geojson` in `_unrecorded_attributes`, so only the count reaches the database.
232
-
Template entities can't do this: exclude them from the recorder instead. Without that, the recorder drops
232
+
Template entities can't do this, so exclude them from the recorder instead. Without that, the recorder drops
233
233
all attributes above 16 384 bytes and logs a warning on every update.
234
234
- Feature ids **MUST** be stable between updates, and coordinates **MUST** be `[longitude, latitude]`.
235
235
- Actions named in `detail_action`**MUST** be read-only.
0 commit comments