From cfe527905c4ceb41fd459a682f720802e94b1ccb Mon Sep 17 00:00:00 2001 From: Dan Leech Date: Tue, 20 Oct 2026 11:04:35 +0100 Subject: [PATCH] Document the datasets hasMenu option and when the Layers button is shown --- docs/plugins/datasets.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/plugins/datasets.md b/docs/plugins/datasets.md index 75109794..79ba5568 100644 --- a/docs/plugins/datasets.md +++ b/docs/plugins/datasets.md @@ -92,6 +92,15 @@ Array of dataset configurations to render on the map. See [Dataset configuration --- +### `hasMenu` + +**Type:** `boolean` +**Default:** `true` + +Shows the Layers button and LayersMenu panel. Set to `false` to leave them out, for example when the layers are controlled by your own UI. + +--- + ## Dataset configuration Each entry in the `datasets` array describes one data source and how it should be rendered. @@ -290,6 +299,8 @@ When `true`, the dataset appears in the Key panel with its style symbol and labe When `true`, the dataset appears in the LayersMenu panel and can be toggled on and off by the user. Sublayers inherit this value — set `showInMenu: false` on an individual sublayer to opt it out. +If no dataset or sublayer has `showInMenu: true` when the map loads, the Layers button and LayersMenu panel are not shown. + --- ### `groupLabel`