/** * This package provides the components that you can use to visualize location-based data. * * @remarks * This package provides: * - GeoPushpinChart (single-layer pushpin chart) * - GeoAreaChart (single-layer area chart) * - GeoChart (multi-layer geo visualization) * * @packageDocumentation */ import { AttributeMeasureOrPlaceholder } from '@gooddata/sdk-ui'; import { AttributeOrPlaceholder } from '@gooddata/sdk-ui'; import { ChartFillType } from '@gooddata/sdk-ui-vis-commons'; import { ComponentType } from 'react'; import { ContentRect } from 'react-measure'; import { CustomTooltipPlacement } from '@gooddata/sdk-ui-vis-commons'; import { GeoLayerType as GeoLayerType_2 } from '@gooddata/sdk-model'; import { getColorMappingPredicate } from '@gooddata/sdk-ui-vis-commons'; import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi'; import { IAttribute } from '@gooddata/sdk-model'; import { IAttributeOrMeasure } from '@gooddata/sdk-model'; import { IColorMapping } from '@gooddata/sdk-ui-vis-commons'; import { IColorPalette } from '@gooddata/sdk-model'; import { IColorStrategy } from '@gooddata/sdk-ui-vis-commons'; import { ICustomTooltipConfig } from '@gooddata/sdk-ui-vis-commons'; import { IDataView } from '@gooddata/sdk-backend-spi'; import { IDataVisualizationProps } from '@gooddata/sdk-ui'; import { IDimension } from '@gooddata/sdk-model'; import { IDrillConfig } from '@gooddata/sdk-ui'; import { IDrillEventIntersectionElement } from '@gooddata/sdk-ui'; import { IExecutionConfig } from '@gooddata/sdk-model'; import { IExecutionDefinition } from '@gooddata/sdk-model'; import { IHeaderPredicate } from '@gooddata/sdk-ui'; import { ILoadingInjectedProps } from '@gooddata/sdk-ui'; import { IntlShape } from 'react-intl'; import { INullableFilter } from '@gooddata/sdk-model'; import { IPushpinCategoryLegendItem } from '@gooddata/sdk-ui-vis-commons'; import { ISeparators } from '@gooddata/sdk-ui'; import { ISortItem } from '@gooddata/sdk-model'; import { ITheme } from '@gooddata/sdk-model'; import { IVisualizationCallbacks } from '@gooddata/sdk-ui'; import { IVisualizationProps } from '@gooddata/sdk-ui'; import { JSX } from 'react/jsx-runtime'; import { NullableFiltersOrPlaceholders } from '@gooddata/sdk-ui'; import { OnError } from '@gooddata/sdk-ui'; import { PositionType } from '@gooddata/sdk-ui-vis-commons'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; import { SortsOrPlaceholders } from '@gooddata/sdk-ui'; import type { StyleSpecification as StyleSpecification_2 } from 'maplibre-gl'; /** * Callback fired when the map visible bounds change. * * @public */ export declare type BoundsChangedCallback = (bounds: IGeoLngLatBounds) => void; /** * Callback fired when the map center changes. * * @public */ export declare type CenterPositionChangedCallback = (center: IGeoLngLat) => void; /** * @internal */ export declare function CoreGeoChart(props: ICoreGeoChartProps & { intl: IntlShape; }): JSX.Element; /** * Creates an area layer configuration object. * * @remarks * Use this factory to create area layer definitions for GeoChart. * The factory ensures proper type and id assignment. * * @param layer - Layer configuration without type and id * @param id - Optional custom layer id, defaults to "area-layer" * @returns Complete area layer configuration * * @public */ export declare function createAreaLayer(layer: Omit, id?: string): IGeoLayerArea; /** * Creates a pushpin layer configuration object. * * @remarks * Use this factory to create pushpin layer definitions for GeoChart. * The factory ensures proper type and id assignment. * * @param layer - Layer configuration without type and id * @param id - Optional custom layer id, defaults to "pushpin-layer" * @returns Complete pushpin layer configuration * * @public */ export declare function createPushpinLayer(layer: Omit, id?: string): IGeoLayerPushpin; export { CustomTooltipPlacement } /** * @public * @deprecated Kept only for the legacy Mapbox-based implementation. */ export declare function enrichMapboxToken(config?: T & { mapboxToken?: string; }, mapboxToken?: string): (T & { mapboxToken?: string; }) | undefined; /** * GeoAreaChart wraps {@link GeoChart} for the single area-layer scenario. * * @public */ export declare function GeoAreaChart(props: IGeoAreaChartProps): ReactElement; /** * Basemap style identifier passed to the location style endpoint. * * @remarks * The available identifiers are dynamic and fetched from the * `GET /api/v1/location/styles` endpoint (e.g. `"standard-light"`, `"satellite"`). * * @alpha */ export declare type GeoBasemap = string; /** * GeoChart renders a MapLibre-based geo visualization composed of one or more data layers. * * @public */ export declare function GeoChart(props: IGeoChartProps): ReactElement; /** * Supported pushpin marker size multipliers. * * @public */ export declare type GeoChartPushpinSizeOption = "0.5x" | "0.75x" | "normal" | "1.25x" | "1.5x" | "default"; /** * Pushpin marker shape types. * * - `"circle"` – default circle markers * - `"iconByValue"` – icon resolved from a `GDC.geo.icon` label * - `"oneIcon"` – a single static icon chosen from the sprite sheet * * @remarks * Icon-based shapes require additional configuration: * - `"iconByValue"` requires the layer to provide a `geoIcon` attribute. * - `"oneIcon"` requires `IGeoChartPointsConfig.icon` to be set. * * If the required icon source is missing, the icon marker may not render. * * @public */ export declare type GeoChartShapeType = "circle" | "iconByValue" | "oneIcon"; /** * Layer types supported by GeoChart. * * @remarks * GeoChart supports two types of geographic layers: * - `"pushpin"` - Point data visualization using markers/pins * - `"area"` - Region visualization using filled polygons (choropleth maps) * * @public */ export declare type GeoLayerType = GeoLayerType_2; /** * Corner positions accepted by the new geo legend implementation. * * @public */ export declare type GeoLegendCornerPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right"; /** * Position values accepted by the new geo legend implementation. * * @public */ export declare type GeoLegendPosition = GeoLegendCornerPosition | "auto"; /** * MapLibre-based GeoPushpinChart implementation. * * @remarks * The `location` prop (single attribute encoding `lat;long`) is not supported on Tiger. * * @public */ export declare function GeoPushpinChart(props: IGeoPushpinChartProps): ReactElement; export { getColorMappingPredicate } /** * @internal */ export declare function getGeoChartDimensions(def: IExecutionDefinition): IDimension[]; /** * @internal */ export declare interface ICoreGeoChartProps extends IDataVisualizationProps { config?: IGeoConfig; height?: number; documentObj?: Document; chartRenderer?: (props: IGeoChartRendererProps) => ReactElement; legendRenderer?: (props: IGeoChartLegendRendererProps) => ReactElement; onCenterPositionChanged?: (center: IGeoLngLat) => void; onZoomChanged?: (zoom: number) => void; geoChartOptions?: IGeoChartInnerOptions; theme?: ITheme; } export { ICustomTooltipConfig } /** * Shared props for {@link GeoAreaChart} before the required area attribute is applied. * * @public */ export declare interface IGeoAreaChartBaseProps extends IGeoSingleLayerWrapperProps { /** * Measure or attribute used for color encoding. */ color?: AttributeMeasureOrPlaceholder; /** * Optional segment attribute that drives category legend items. */ segmentBy?: AttributeOrPlaceholder; /** * Configuration specific to area layers. */ config?: IGeoAreaChartConfig; } /** * Configuration for GeoAreaChart component * * @public */ export declare interface IGeoAreaChartConfig { center?: IGeoLngLat; /** * Bounding box for custom viewport. Takes priority over center/zoom * and adapts to container dimensions. */ bounds?: IGeoLngLatBounds; isExportMode?: boolean; legend?: IGeoChartLegendConfig; limit?: number; selectedSegmentItems?: string[]; /** * {@inheritDoc IGeoChartConfig.selectedPoints} * @internal */ selectedPoints?: IDrillEventIntersectionElement[][]; zoom?: number; /** * Custom MapLibre style URL or inline specification. */ mapStyle?: string | StyleSpecification; /** * Selected basemap style identifier (e.g. `"standard-light"`, `"satellite"`). * * @remarks * `undefined` uses the backend default basemap. * * @alpha */ basemap?: GeoBasemap; /** * Maximum zoom level allowed on the map. * * @remarks * - `undefined` keeps default max zoom level * - `null` switches to unrestricted zoom level */ maxZoomLevel?: number | null; separators?: ISeparators; viewport?: IGeoChartViewport; areas?: IGeoAreasConfig; colors?: string[]; colorPalette?: IColorPalette; colorMapping?: IColorMapping[]; showLabels?: boolean; /** * Specify the accessibility title for the map canvas. * * @internal */ a11yTitle?: string; /** * Enables geo accessibility enhancements introduced for map canvas, legend semantics, * live announcements, and alternate table view. * * @internal */ enableGeoChartA11yImprovements?: boolean; /** * Enables basemap configuration that relies on backend style support. * * @internal */ enableGeoBasemapConfig?: boolean; /** * Enables advanced geo viewport configuration. * * @internal */ enableGeoChartsViewportConfig?: boolean; /** * Applies viewport navigation limits (pan/zoom locks) at runtime. * * @internal */ applyViewportNavigation?: boolean; cooperativeGestures?: boolean; enableExecutionCancelling?: boolean; respectLegendPosition?: boolean; /** * Custom tooltip configuration with Markdown content and metric/attribute references. * * @alpha */ customTooltip?: ICustomTooltipConfig; /** * Feature-flag gate for custom tooltips (defaults on); when `false`, a persisted custom * tooltip is ignored at render. * * @internal */ enableCustomTooltip?: boolean; } /** * Props for {@link GeoAreaChart}. The `area` attribute is required. * * @public */ export declare interface IGeoAreaChartProps extends IGeoAreaChartBaseProps { /** * Attribute containing area identifiers (country, state, region, ...). */ area: AttributeOrPlaceholder; } /** * Configuration for area styling in area maps * * @public */ export declare interface IGeoAreasConfig { /** * Opacity of filled areas (0-1) * @defaultValue 0.7 */ fillOpacity?: number; /** * Color of area borders * @defaultValue "#FFFFFF" */ borderColor?: string; /** * Width of area borders in pixels * @defaultValue 1 */ borderWidth?: number; } /** * @public */ export declare interface IGeoAttributeItem extends IGeoDataItem { data: string[]; } /** * Unified configuration shared by {@link GeoChart} and its wrappers. * * @public */ export declare interface IGeoChartConfig { /** * Initial map center. Defaults to auto-centering based on data. */ center?: IGeoLngLat; /** * Initial zoom level (0-22). Defaults to auto-fit. */ zoom?: number; /** * Bounding box for custom viewport. Takes priority over center/zoom * and adapts to container dimensions. */ bounds?: IGeoLngLatBounds; /** * Enables export mode (disables gestures, preserves drawing buffer). */ isExportMode?: boolean; /** * Legend configuration. */ legend?: IGeoChartLegendConfig; /** * Maximum number of rendered data points. */ limit?: number; /** * Segment values that should stay visible when using legend-driven filtering. */ selectedSegmentItems?: string[]; /** * Cross-filtering selected points expressed as drill intersections. * * @remarks * When present, selected features render at full opacity while * unselected features are faded out. * * @internal */ selectedPoints?: IDrillEventIntersectionElement[][]; /** * MapLibre style URL or inline style specification. */ mapStyle?: string | StyleSpecification; /** * Selected basemap style identifier (e.g. `"standard-light"`, `"satellite"`). * * @remarks * `undefined` uses the backend default basemap. * * @alpha */ basemap?: GeoBasemap; /** * Maximum zoom level allowed on the map. * * @remarks * - `undefined` keeps default max zoom level * - `null` switches to unrestricted zoom level */ maxZoomLevel?: number | null; /** * Custom number separators used for formatting. */ separators?: ISeparators; /** * Viewport preset or explicit bounds. */ viewport?: IGeoChartViewport; /** * Pushpin-specific options (size range, clustering, ...). */ points?: IGeoChartPointsConfig; /** * Area-specific options (opacity, border styling, ...). */ areas?: IGeoAreasConfig; /** * Simple palette expressed as color strings. */ colors?: string[]; /** * Structured color palette compatible with color mapping GUIDs. */ colorPalette?: IColorPalette; /** * Explicit color-mapping overrides. */ colorMapping?: IColorMapping[]; /** * Displays data labels on the map when supported by the layer. */ showLabels?: boolean; /** * Specify the accessibility title for the map canvas. * * @internal */ a11yTitle?: string; /** * Enables geo accessibility enhancements introduced for map canvas, legend semantics, * live announcements, and alternate table view. * * @internal */ enableGeoChartA11yImprovements?: boolean; /** * Enables basemap configuration that relies on backend style support. * * @internal */ enableGeoBasemapConfig?: boolean; /** * Enables advanced geo viewport configuration. * * @internal */ enableGeoChartsViewportConfig?: boolean; /** * Applies viewport navigation limits (pan/zoom locks) at runtime. * * @internal */ applyViewportNavigation?: boolean; /** * Requires Ctrl/Cmd + scroll to zoom (helps inside scroll containers). */ cooperativeGestures?: boolean; /** * Cancels running executions when props change. */ enableExecutionCancelling?: boolean; /** * Keeps the requested legend position even when responsive heuristics disagree. */ respectLegendPosition?: boolean; /** * Custom tooltip configuration with Markdown content and metric/attribute references. * * @alpha */ customTooltip?: ICustomTooltipConfig; /** * Feature-flag gate for custom tooltips (defaults on); when `false`, a persisted custom * tooltip is ignored at render. * * @internal */ enableCustomTooltip?: boolean; } /** * @internal */ export declare interface IGeoChartInnerOptions { geoData: IGeoData; categoryItems: IPushpinCategoryLegendItem[]; colorStrategy: IColorStrategy; colorPalette: IColorPalette; } /** * @internal */ export declare type IGeoChartInnerProps = ICoreGeoChartProps & ILoadingInjectedProps & { intl: IntlShape; }; /** * Legend configuration shared by GeoChart components. * * @public */ export declare interface IGeoChartLegendConfig { /** * Enables legend rendering. * * @defaultValue true */ enabled?: boolean; /** * Legend position. `"auto"` picks a placement based on available space. * Legacy edge-based values are still accepted for backward compatibility, but are deprecated and normalized * to corner values: * - `"top"` maps to `"top-right"` * - `"right"` maps to `"top-right"` * - `"bottom"` maps to `"bottom-right"` * - `"left"` maps to `"top-left"` * * @defaultValue "auto" */ position?: GeoLegendPosition | LegacyGeoLegendPosition; /** * Responsive behavior for the geo legend. * * @remarks * `true` enables responsive legend layout. * The legacy `"autoPositionWithPopup"` value is kept for backward compatibility and preserves * the automatic legend placement heuristics used in smaller containers. * * @defaultValue false */ responsive?: boolean | "autoPositionWithPopup"; } /** * @internal */ export declare interface IGeoChartLegendRendererProps { categoryItems?: IPushpinCategoryLegendItem[]; format?: string; geoData?: IGeoData; height?: number; locale?: string; colorLegendValue: string; position?: PositionType; responsive?: boolean | "autoPositionWithPopup"; isFluidLegend?: boolean; numericSymbols?: string[]; onItemClick?: (item: IPushpinCategoryLegendItem) => void; contentRect?: ContentRect; maxRows?: number; name?: string; renderPopUp?: boolean; containerId?: string; chartFill?: ChartFillType; } /** * Pushpin-specific configuration. * * @public */ export declare interface IGeoChartPointsConfig { /** * Minimum marker size multiplier used when size measure is present. * * @defaultValue "normal" */ minSize?: GeoChartPushpinSizeOption; /** * Maximum marker size multiplier used when size measure is present. * * @defaultValue "normal" */ maxSize?: GeoChartPushpinSizeOption; /** * Groups nearby points into clusters. * * @defaultValue false */ groupNearbyPoints?: boolean; /** * Marker shape type. * * @remarks * Icon-based shapes do not fall back to circle markers automatically. * Use `"iconByValue"` only together with a layer `geoIcon` attribute, * and use `"oneIcon"` only when `icon` is set. * * @defaultValue "circle" */ shapeType?: GeoChartShapeType; /** * Icon name from the sprite sheet. * * @remarks * This must be set when `shapeType` is `"oneIcon"`. If it is missing, * the icon marker may not render. */ icon?: string; } /** * Props for {@link GeoChart}. * * @public */ export declare interface IGeoChartProps extends IGeoCommonExecutionProps { /** * Visualization type reported through pushData callbacks. Defaults to the primary layer type. */ type?: GeoLayerType; /** * Array of layer definitions rendered in order. The first layer drives legends and drilling. */ layers: IGeoLayer[]; /** * Unified configuration shared by all layers. */ config?: IGeoChartConfig; } /** * @internal */ export declare interface IGeoChartRendererProps { intl: IntlShape; config: IGeoConfig; drillableItems: IHeaderPredicate[]; drillConfig: IDrillConfig; dataView: IDataView; geoData: IGeoData; colorStrategy: IColorStrategy; afterRender(): void; onCenterPositionChanged(center: IGeoLngLat): void; onZoomChanged(zoom: number): void; onError?: OnError; } /** * Viewport configuration shared by GeoChart components. * * @public */ export declare interface IGeoChartViewport { /** * Initial viewport preset. * * @defaultValue "auto" */ area?: IGeoChartViewportArea; /** * Locks user interaction when set to true. * * @defaultValue false */ frozen?: boolean; /** * Navigation interaction settings. */ navigation?: IGeoChartViewportNavigation; } /** * Viewport presets for GeoChart. * * @public */ export declare type IGeoChartViewportArea = "auto" | "custom" | "continent_af" | "continent_as" | "continent_au" | "continent_eu" | "continent_na" | "continent_sa" | "world"; /** * Navigation interaction settings for geo viewport. * * @public */ export declare interface IGeoChartViewportNavigation { /** * Enable or disable pan interactions. * * @defaultValue true */ pan?: boolean; /** * Enable or disable zoom interactions. * * @defaultValue true */ zoom?: boolean; } /** * Common execution/host wiring props shared by all GeoChart-family components. * * @public */ export declare interface IGeoCommonExecutionProps extends IVisualizationProps, IVisualizationCallbacks { /** * Backend used for data execution. Falls back to BackendProvider when omitted. */ backend?: IAnalyticalBackend; /** * Workspace identifier. Falls back to WorkspaceProvider when omitted. */ workspace?: string; /** * Filters applied to every layer execution. * * @remarks * These filters are treated as **global** for the whole geo visualization: * - They apply to the primary layer and to all additional layer executions. * - Layer-specific filters (`IGeoLayer.filters`) are still supported. * - When both are provided, these **global** filters are applied *after* layer filters and therefore * take precedence for filter types with “last wins” merge rules (e.g. date filters for the same * date dataset, measure value filters for the same measure). Other filter types may accumulate * according to SDK merge semantics. */ filters?: NullableFiltersOrPlaceholders; /** * Resolution context for composed placeholders. * * @remarks * Required only when using composed placeholders. */ placeholdersResolutionContext?: object; /** * Theme override. Defaults to the nearest ThemeProvider. */ theme?: ITheme; /** * Additional execution configuration forwarded to backend. */ execConfig?: IExecutionConfig; /** * Callback fired when the map center changes. */ onCenterPositionChanged?: CenterPositionChangedCallback; /** * Callback fired when map zoom changes. */ onZoomChanged?: ZoomChangedCallback; /** * Callback fired when the map visible bounds change. */ onBoundsChanged?: BoundsChangedCallback; /** * Callback fired when a user-triggered viewport interaction finishes. */ onViewportInteractionEnd?: ViewportInteractionEndCallback; } /** * @public */ export declare interface IGeoConfig { center?: IGeoLngLat; isExportMode?: boolean; legend?: IGeoLegendConfig; limit?: number; selectedSegmentItems?: string[]; tooltipText?: IAttribute; zoom?: number; /** * Mapbox access token. * * @remarks * Kept for backward compatibility with the legacy Mapbox-based implementation. * The MapLibre-based geo charts ignore this value. * * @deprecated Kept only for backward compatibility. Not used by MapLibre-based geo charts. */ mapboxToken?: string; separators?: ISeparators; viewport?: IGeoConfigViewport; points?: IGeoPointsConfig; colors?: string[]; colorPalette?: IColorPalette; colorMapping?: IColorMapping[]; showLabels?: boolean; cooperativeGestures?: boolean; enableExecutionCancelling?: boolean; respectLegendPosition?: boolean; } /** * @public */ export declare interface IGeoConfigViewport { area?: IGeoConfigViewportArea; frozen?: boolean; } /** * @public */ export declare type IGeoConfigViewportArea = "auto" | "continent_af" | "continent_as" | "continent_au" | "continent_eu" | "continent_na" | "continent_sa" | "world"; /** * @public */ export declare interface IGeoData { location?: IGeoLocationItem; size?: IGeoMeasureItem; color?: IGeoMeasureItem; segment?: IGeoSegmentItem; tooltipText?: IGeoAttributeItem; } /** * @public */ export declare interface IGeoDataItem { name: string; index: number; } /** * Union type for all layer configurations. * * @remarks * Use this type when working with layers that could be either pushpin or area type. * Use the {@link isGeoLayerPushpin} and {@link isGeoLayerArea} type guards to * narrow the type in conditional logic. * @public */ export declare type IGeoLayer = IGeoLayerPushpin | IGeoLayerArea; /** * Area layer configuration. * * @remarks * An area layer renders geographic regions (countries, states, provinces, etc.) * as filled polygons, creating a choropleth map visualization. * * The area attribute should reference a geographic attribute whose values * map to known geographic regions. The component uses geocoding to match * attribute values to geographic boundaries. * * Supported region types include: * - Countries (by name or ISO code) * - States/Provinces * - Administrative regions * - Custom geographic boundaries * * Features: * - **Color-coded regions**: Use the `color` property for data-driven fill colors * - **Segmentation**: Use `segmentBy` to categorize regions * - **Opacity control**: Configure fill opacity via chart config * @public */ export declare interface IGeoLayerArea extends IGeoLayerBase { type: "area"; /** * Geographic area attribute. * * @remarks * An attribute whose values represent geographic regions (countries, states, * provinces, etc.). The attribute values are geocoded to match geographic * boundaries for polygon rendering. * * For best results, use standardized region names or ISO codes that can * be reliably matched to geographic boundaries. */ area: IAttribute; } /** * Base interface for all geo layer configurations. * * @remarks * This interface defines the common properties shared by all layer types. * Each layer operates independently with its own data execution, allowing * different data sources, filters, and configurations per layer. * * @public */ export declare interface IGeoLayerBase { /** * Unique identifier for this layer. * * @remarks * Used internally to track layer state and for debugging purposes. * Each layer in a GeoChart must have a unique id. */ id: string; /** * Human-readable name for the layer. * * @remarks * Optional display name that may be shown in legends or tooltips. * If not provided, the layer id is used. */ name?: string; /** * Layer type discriminator. * * @remarks * Determines the rendering mode for this layer. * Use `"pushpin"` for point/marker data or `"area"` for region/polygon data. */ type: GeoLayerType; /** * Color measure or attribute for this layer. * * @remarks * When a measure is provided, colors are determined by the measure values * using a color scale (gradient). When an attribute is provided, colors * are assigned categorically based on attribute values. * * For pushpin layers, this affects the fill color of the markers. * For area layers, this affects the fill color of the regions. */ color?: IAttributeOrMeasure; /** * Segment attribute for categorization. * * @remarks * Groups data points by the specified attribute, creating separate * visual categories with distinct colors. When segmentBy is used, * a category legend is displayed. * * For pushpin layers, different segments get different marker colors. * For area layers, different segments get different fill colors. */ segmentBy?: IAttribute; /** * Optional per-layer configuration. * * @remarks * This config is intentionally limited to layer-scoped options only. * * @public */ config?: IGeoLayerConfig; /** * Filters specific to this layer. * * @remarks * Array of filters applied only to this layer's data execution. * * These filters are applied **before** any global/component-level filters (e.g. `GeoChart.filters`). * When both layer and global filters are provided, the global filters are applied *after* the layer * filters and therefore take precedence for filter types with “last wins” merge rules (for example * date filters for the same date dataset or measure value filters for the same measure). Other filter * types may accumulate according to SDK merge semantics. */ filters?: INullableFilter[]; /** * Sorting for this layer. * * @remarks * Defines how data points are sorted for this layer. * Sorting can affect tooltip display order and rendering priority. */ sortBy?: ISortItem[]; /** * Tooltip text attribute for this layer. * * @remarks * An attribute whose values are displayed in tooltips when hovering over * data points in this layer. If not provided, falls back to the unified * config's `tooltipText` setting. */ tooltipText?: IAttribute; } /** * Per-layer configuration for GeoChart layers. * * @remarks * This config is intentionally limited to options that are meaningful on a per-layer basis. * It is **not** the same as {@link IGeoChartConfig} (which contains global/map-level settings). * * @public */ export declare interface IGeoLayerConfig { /** * Optional color palette override for this layer. */ colorPalette?: IColorPalette; /** * Optional custom color mappings override for this layer. */ colorMapping?: IColorMapping[]; /** * Optional custom tooltip configuration for this layer. * * @remarks * Each layer renders its own custom tooltip. When omitted, the layer has no * custom tooltip section (it does not inherit another layer's configuration). * * @alpha */ customTooltip?: ICustomTooltipConfig; } /** * Pushpin layer configuration. * * @remarks * A pushpin layer renders point data on the map as markers/pins. * It requires separate latitude and longitude attributes to specify geographic coordinates. * * Features: * - **Size scaling**: Use the `size` property to vary marker sizes based on a measure * - **Color coding**: Use the `color` property for measure-based gradients or attribute-based categories * - **Segmentation**: Use `segmentBy` to group markers by category with distinct colors * - **Clustering**: Configure point clustering in the chart config for better performance with many points * @public */ export declare interface IGeoLayerPushpin extends IGeoLayerBase { type: "pushpin"; /** * Latitude attribute. * * @remarks * An attribute containing latitude values (decimal degrees, -90 to 90). * Must be used together with `longitude`. */ latitude: IAttribute; /** * Longitude attribute. * * @remarks * An attribute containing longitude values (decimal degrees, -180 to 180). * Must be used together with `latitude`. */ longitude: IAttribute; /** * Size measure for pushpins. * * @remarks * When provided, marker sizes are scaled based on the measure values. * Larger values result in larger markers. The scaling range can be * configured via `config.points.minSize` and `config.points.maxSize`. * * If not provided, all markers are rendered at a uniform size. */ size?: IAttributeOrMeasure; /** * Additional measures displayed in pushpin tooltips. * * @remarks * When provided, these measures are displayed in tooltips without * affecting pushpin size or color. */ measures?: IAttributeOrMeasure[]; /** * Geo icon attribute for pushpins. * * @remarks * An attribute whose display form type is `GDC.geo.icon`. When provided * together with `shapeType: "iconByValue"`, each pushpin's icon is resolved * from the attribute value for that row. * * This attribute is required when `config.points.shapeType` is `"iconByValue"`. * If it is missing, the icon marker may not render. */ geoIcon?: IAttribute; } /** * @public */ export declare interface IGeoLegendConfig { /** * Indicates whether legend should be rendered or not. */ enabled?: boolean; /** * Where, relative to the chart, should the legend appear. */ position?: PositionType; /** * Turns on responsive behavior. * * @remarks * Legend items will be rendered horizontally on screens smaller than 767px. * The legacy `autoPositionWithPopup` value preserves automatic legend placement heuristics. */ responsive?: boolean | "autoPositionWithPopup"; } /** * Represents geographic coordinates in latitude/longitude format. * * @public */ export declare interface IGeoLngLat { lat: number; lng: number; } /** * Represents geographic bounds defined by north-east and south-west coordinates. * * @public */ export declare interface IGeoLngLatBounds { northEast: IGeoLngLat; southWest: IGeoLngLat; } /** * @public */ export declare interface IGeoLocationItem extends IGeoDataItem { data: IGeoLngLat[]; } /** * @public */ export declare interface IGeoMeasureItem extends IGeoDataItem { format: string; data: number[]; } /** * @public */ export declare interface IGeoPointsConfig { minSize?: PushpinSizeOption; maxSize?: PushpinSizeOption; groupNearbyPoints?: boolean; } /** * Shared props for {@link GeoPushpinChart} before the location is specified. * * @public */ export declare interface IGeoPushpinChartBaseProps extends IGeoSingleLayerWrapperProps { /** * Optional segment attribute that drives category legend items. */ segmentBy?: AttributeOrPlaceholder; /** * Measure or attribute used for size encoding. */ size?: AttributeMeasureOrPlaceholder; /** * Measure or attribute used for color encoding. */ color?: AttributeMeasureOrPlaceholder; /** * Configuration specific to pushpin layers. */ config?: IGeoPushpinChartConfig; } /** * Configuration for MapLibre-based pushpin rendering. * * @remarks * This config type is used by the MapLibre-based geo engine when rendering pushpin layers. * * @public */ export declare interface IGeoPushpinChartConfig { center?: IGeoLngLat; /** * Bounding box for custom viewport. Takes priority over center/zoom * and adapts to container dimensions. */ bounds?: IGeoLngLatBounds; isExportMode?: boolean; legend?: IGeoChartLegendConfig; limit?: number; selectedSegmentItems?: string[]; /** * {@inheritDoc IGeoChartConfig.selectedPoints} * @internal */ selectedPoints?: IDrillEventIntersectionElement[][]; /** * Location tooltip label attribute. * * @remarks * Kept for backward compatibility with the legacy GeoPushpinChart API where this lived under `config`. * Prefer `tooltipText` on pushpin layers when using {@link GeoChart}. */ tooltipText?: IAttribute; zoom?: number; /** * Mapbox access token. * * @remarks * Kept only for backward compatibility with the legacy Mapbox-based implementation. * MapLibre-based geo charts ignore this value. * * @deprecated Kept only for backward compatibility. Not used by MapLibre-based geo charts. */ mapboxToken?: string; /** * Custom MapLibre style URL or inline specification. */ mapStyle?: string | StyleSpecification; /** * Selected basemap style identifier (e.g. `"standard-light"`, `"satellite"`). * * @remarks * `undefined` uses the backend default basemap. * * @alpha */ basemap?: GeoBasemap; /** * Maximum zoom level allowed on the map. * * @remarks * - `undefined` keeps default max zoom level * - `null` switches to unrestricted zoom level */ maxZoomLevel?: number | null; separators?: ISeparators; viewport?: IGeoChartViewport; points?: IGeoChartPointsConfig; colors?: string[]; colorPalette?: IColorPalette; colorMapping?: IColorMapping[]; showLabels?: boolean; /** * Specify the accessibility title for the map canvas. * * @internal */ a11yTitle?: string; /** * Enables geo accessibility enhancements introduced for map canvas, legend semantics, * live announcements, and alternate table view. * * @internal */ enableGeoChartA11yImprovements?: boolean; /** * Enables basemap configuration that relies on backend style support. * * @internal */ enableGeoBasemapConfig?: boolean; /** * Enables advanced geo viewport configuration. * * @internal */ enableGeoChartsViewportConfig?: boolean; /** * Applies viewport navigation limits (pan/zoom locks) at runtime. * * @internal */ applyViewportNavigation?: boolean; cooperativeGestures?: boolean; enableExecutionCancelling?: boolean; respectLegendPosition?: boolean; /** * Custom tooltip configuration with Markdown content and metric/attribute references. * * @alpha */ customTooltip?: ICustomTooltipConfig; } /** * Props for {@link GeoPushpinChart} in the latitude/longitude mode. * * @public */ export declare interface IGeoPushpinChartLatitudeLongitudeProps extends IGeoPushpinChartBaseProps { /** * The attribute definition or placeholder that determines the latitude of the pins. */ latitude: AttributeOrPlaceholder; /** * The attribute definition or placeholder that determines the longitude of the pins. */ longitude: AttributeOrPlaceholder; } /** * Props for {@link GeoPushpinChart} in the (legacy) single-attribute mode. * * @remarks * The `location` prop is kept for backward compatibility with older applications. * For GoodData Cloud / Tiger, use separate `latitude` and `longitude` attributes instead. * * @deprecated Use separate `latitude` and `longitude` attributes instead. * * @public */ export declare interface IGeoPushpinChartLocationProps extends IGeoPushpinChartBaseProps { /** * The attribute definition or placeholder that determines the longitude and latitude of the pins. * Values expected in format lat;long. * * @deprecated Use separate `latitude` and `longitude` attributes instead. */ location: AttributeOrPlaceholder; } /** * Props for {@link GeoPushpinChart}. * * @public */ export declare type IGeoPushpinChartProps = IGeoPushpinChartLocationProps | IGeoPushpinChartLatitudeLongitudeProps; /** * @public */ export declare interface IGeoSegmentItem extends IGeoAttributeItem { uris: string[]; } /** * Shared props for wrappers that internally construct a primary layer and allow extra layers. * * @public */ export declare interface IGeoSingleLayerWrapperProps extends IGeoCommonExecutionProps { /** * Sorting applied to the **primary layer** execution definition. */ sortBy?: SortsOrPlaceholders; /** * Layers rendered after the primary layer (e.g., overlays). */ additionalLayers?: IGeoLayer[]; } /** * Legacy GeoPushpinChart base props (Mapbox-based implementation). * * @deprecated Use {@link IGeoPushpinChartProps} exported from `@gooddata/sdk-ui-geo` (MapLibre-based). * @public */ export declare interface ILegacyGeoPushpinChartBaseProps extends IVisualizationProps, IVisualizationCallbacks { /** * Analytical backend, from which the chart will obtain data to visualize * * @remarks * If you do not specify instance of analytical backend using this prop, then you MUST have * BackendProvider up in the component tree. */ backend?: IAnalyticalBackend; /** * Identifier of analytical workspace, from which the chart will obtain data to visualize. * * @remarks * If you do not specify workspace identifier, then you MUST have WorkspaceProvider up in the * component tree. */ workspace?: string; size?: AttributeMeasureOrPlaceholder; color?: AttributeMeasureOrPlaceholder; segmentBy?: AttributeOrPlaceholder; filters?: NullableFiltersOrPlaceholders; sortBy?: SortsOrPlaceholders; /** * Resolution context for composed placeholders. */ placeholdersResolutionContext?: any; config?: IGeoConfig; /** * Execution configuration, will provide the execution with necessary config before initiating execution. */ execConfig?: IExecutionConfig; /** * Specify function to call back when center position of the map changes. */ onCenterPositionChanged?: CenterPositionChangedCallback; /** * Specify function to call back when map zoom changes. */ onZoomChanged?: ZoomChangedCallback; } /** * Legacy GeoPushpinChart props for the latitude/longitude mode. * * @deprecated Use {@link IGeoPushpinChartProps} exported from `@gooddata/sdk-ui-geo` (MapLibre-based). * @public */ export declare interface ILegacyGeoPushpinChartLatitudeLongitudeProps extends ILegacyGeoPushpinChartBaseProps { /** * The attribute definition or placeholder that determines the latitude of the pins. * Values expected in string format representing coordinate. */ latitude: AttributeOrPlaceholder; /** * The attribute definition or placeholder that determines the longitude of the pins. * Values expected in string format representing coordinate. */ longitude: AttributeOrPlaceholder; } /** * Legacy GeoPushpinChart props for the (legacy) single-attribute mode. * * @deprecated Use {@link IGeoPushpinChartProps} exported from `@gooddata/sdk-ui-geo` (MapLibre-based). * @public */ export declare interface ILegacyGeoPushpinChartProps extends ILegacyGeoPushpinChartBaseProps { /** * The attribute definition or placeholder that determines the longitude and latitude of the pins. * Values expected in format lat;long. */ location: AttributeOrPlaceholder; } /** * Type guard for area layer. * * @remarks * Use this function to narrow an {@link IGeoLayer} to {@link IGeoLayerArea} * when you need to access area-specific properties like `area`. * * @param layer - The layer to check * @returns true if the layer is an area layer, false otherwise * @public */ export declare function isGeoLayerArea(layer: IGeoLayer): layer is IGeoLayerArea; /** * Type guard for pushpin layer. * * @remarks * Use this function to narrow an {@link IGeoLayer} to {@link IGeoLayerPushpin} * when you need to access pushpin-specific properties like `latitude`, * `longitude`, or `size`. * * @param layer - The layer to check * @returns true if the layer is a pushpin layer, false otherwise * @public */ export declare function isGeoLayerPushpin(layer: IGeoLayer): layer is IGeoLayerPushpin; /** * Type guard verifying allowed size option values. * * @public */ export declare function isValidPushpinSizeOption(value: string): value is GeoChartPushpinSizeOption; /** * Type guard verifying supported viewport presets. * * @public */ export declare function isValidViewportArea(value: string): value is IGeoChartViewportArea; /** * Legacy edge-based legend positions still accepted for read-time normalization. * * @deprecated Use corner-based positions instead: * - `"top"` maps to `"top-right"` * - `"right"` maps to `"top-right"` * - `"bottom"` maps to `"bottom-right"` * - `"left"` maps to `"top-left"` * * @public */ export declare type LegacyGeoLegendPosition = "top" | "right" | "bottom" | "left"; /** * Legacy GeoPushpinChart implementation (Mapbox-based). * * @remarks * Kept temporarily for backward compatibility and internal migration. * * @public */ export declare function LegacyGeoPushpinChart(props: ILegacyGeoPushpinChartProps | ILegacyGeoPushpinChartLatitudeLongitudeProps): JSX.Element; /** * @public * @deprecated Kept only for the legacy Mapbox-based implementation. */ export declare function MapboxTokenProvider({ token, children }: { token: string; children?: ReactNode; }): JSX.Element; /** * @public */ export declare type PushpinSizeOption = "0.5x" | "0.75x" | "normal" | "1.25x" | "1.5x" | "default"; /** * MapLibre style specification. * * @public */ export declare type StyleSpecification = StyleSpecification_2; /** * @public * @deprecated Kept only for the legacy Mapbox-based implementation. */ export declare function useMapboxToken(mapboxToken?: string): string | undefined; /** * @public * @deprecated Kept only for the legacy Mapbox-based implementation. */ export declare function useMapboxTokenStrict(mapboxToken?: string): string; /** * Callback fired when a viewport change triggered by a real user interaction finishes. * * @public */ export declare type ViewportInteractionEndCallback = () => void; /** * @public * @deprecated Kept only for the legacy Mapbox-based implementation. */ export declare function withMapboxToken(InnerComponent: ComponentType): ComponentType; /** * Callback fired when map zoom changes. * * @public */ export declare type ZoomChangedCallback = (zoom: number) => void; export { }