mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Geomap: support multiple layers (#40906)
This commit is contained in:
@@ -66,10 +66,15 @@ export interface MapLayerOptions<TConfig = any> {
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export interface MapLayerHandler {
|
||||
export interface MapLayerHandler<TConfig = any> {
|
||||
init: () => BaseLayer;
|
||||
update?: (data: PanelData) => void;
|
||||
legend?: ReactNode;
|
||||
|
||||
/**
|
||||
* Show custom elements in the panel edit UI
|
||||
*/
|
||||
registerOptionsUI?: (builder: PanelOptionsEditorBuilder<MapLayerOptions<TConfig>>) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,9 +103,4 @@ export interface MapLayerRegistryItem<TConfig = MapLayerOptions> extends Registr
|
||||
* @param options
|
||||
*/
|
||||
create: (map: Map, options: MapLayerOptions<TConfig>, theme: GrafanaTheme2) => Promise<MapLayerHandler>;
|
||||
|
||||
/**
|
||||
* Show custom elements in the panel edit UI
|
||||
*/
|
||||
registerOptionsUI?: (builder: PanelOptionsEditorBuilder<MapLayerOptions<TConfig>>) => void;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
UnitFieldConfigSettings,
|
||||
unitOverrideProcessor,
|
||||
FieldNamePickerConfigSettings,
|
||||
StandardEditorContext,
|
||||
} from '../field';
|
||||
import { PanelOptionsSupplier } from '../panel/PanelPlugin';
|
||||
|
||||
@@ -133,6 +134,7 @@ export class FieldConfigEditorBuilder<TOptions> extends OptionsUIRegistryBuilder
|
||||
export interface NestedValueAccess {
|
||||
getValue: (path: string) => any;
|
||||
onChange: (path: string, value: any) => void;
|
||||
getContext?: (parent: StandardEditorContext<any, any>) => StandardEditorContext<any, any>;
|
||||
}
|
||||
export interface NestedPanelOptions<TSub = any> {
|
||||
path: string;
|
||||
|
||||
Reference in New Issue
Block a user