@@ -39,8 +39,36 @@ import type { useToastStore as ToastStore } from '@/plugins/toast/store'
3939import type { NineLayoutTag } from '../utils/NineLayoutTag'
4040import type { Locale } from './locales'
4141
42+ /**
43+ * Generic options for all plugins.
44+ *
45+ * ## Custom Plugin Positioning ({@link MapConfiguration.layout | Standard Layout})
46+ *
47+ * When `layout` is set to `'standard'`, a custom plugin can be rendered in one of two ways:
48+ *
49+ * 1. **As part of the IconMenu**: Set {@link PluginOptions.renderType | renderType}
50+ * to `'iconMenu'` and configure the plugin in the IconMenu's
51+ * {@link IconMenuPluginOptions.menus | `menus`} configuration.
52+ * The IconMenu will handle positioning and rendering the plugin at the designated location.
53+ *
54+ * 2. **Independent with CSS positioning**: Set {@link PluginOptions.renderType | renderType}
55+ * to `'independent'` (default). The plugin is responsible for its own positioning
56+ * using CSS (e.g., `position: absolute`) within the map container.
57+ */
4258export interface PluginOptions {
59+ /**
60+ * Should the component be visible at all.
61+ * Only relevant if {@link MapConfiguration.layout | layout} is set to `'nineRegions'`.
62+ *
63+ * @defaultValue `false`
64+ */
4365 displayComponent ?: boolean
66+
67+ /**
68+ * The region where the plugin should be rendered.
69+ * Required if {@link MapConfiguration.layout | layout} is set to `'nineRegions'`,
70+ * ignored otherwise.
71+ */
4472 layoutTag ?: keyof typeof NineLayoutTag
4573}
4674
@@ -194,6 +222,8 @@ export interface PluginContainer {
194222 * The component will be rendered by POLAR over the map.
195223 * The position is either to be determined by the plugin if `layout === 'standard'`
196224 * or will be determined by the layout.
225+ *
226+ * @see {@link PluginOptions } for configuration details
197227 */
198228 component ?: Component
199229
0 commit comments