Geo Pushpin Chart

A geo pushpin chart visualizes point data on a map using latitude and longitude attributes. It is a convenience wrapper over Geo Chart for the single-pushpin-layer scenario.

Geo Pushpin Chart

Structure

import "@gooddata/sdk-ui-geo/styles/css/main.css";
import { GeoPushpinChart } from "@gooddata/sdk-ui-geo";

<GeoPushpinChart
    latitude={<attribute>}
    longitude={<attribute>}
    size={<measure>}
    color={<measure>}
    segmentBy={<attribute>}
    config={<geo-config>}
    
/>

Example

import "@gooddata/sdk-ui-geo/styles/css/main.css";
import { GeoPushpinChart } from "@gooddata/sdk-ui-geo";
import * as Md from "./md/full";

const config = {
    tooltipText: Md.City.Name,
    points: {
        groupNearbyPoints: true,
        minSize: "0.75x",
        maxSize: "1.25x",
    },
    viewport: {
        area: "continent_eu",
    },
    cooperativeGestures: true,
};

<div style={{ height: 600, width: 900 }}>
    <GeoPushpinChart
        latitude={Md.City.Latitude}
        longitude={Md.City.Longitude}
        size={Md.Population.Sum}
        color={Md.Density.Sum}
        segmentBy={Md.StateName}
        config={config}
        onBoundsChanged={(bounds) => console.log("Bounds:", bounds)}
    />
</div>;

Location modes

GeoPushpinChart exposes two public location modes:

  • Recommended latitude/longitude mode with separate latitude and longitude attributes
  • Legacy single-attribute location mode for older applications. For GoodData Cloud / Tiger, use separate latitude and longitude attributes instead

Latitude/longitude properties

NameRequired?TypeDescription
latitudetrueAttributeOrPlaceholderThe attribute or placeholder that determines the latitude of the pins
longitudetrueAttributeOrPlaceholderThe attribute or placeholder that determines the longitude of the pins

Legacy location property

NameRequired?TypeDescription
locationtrueAttributeOrPlaceholderDeprecated legacy single attribute containing lat;long values. For GoodData Cloud / Tiger, use separate latitude and longitude attributes instead

Properties

NameRequired?TypeDescription
segmentByfalseAttributeOrPlaceholderOptional segment attribute that categorizes the pins
sizefalseAttributeMeasureOrPlaceholderMeasure or attribute used for size encoding
colorfalseAttributeMeasureOrPlaceholderMeasure or attribute used for color encoding
filtersfalseNullableFiltersOrPlaceholdersGlobal filters applied to the primary layer and any additionalLayers
sortByfalseSortsOrPlaceholdersSorting applied to the primary pushpin layer
configfalseIGeoPushpinChartConfigPushpin wrapper configuration
additionalLayersfalseIGeoLayer[]Extra layers rendered after the primary pushpin layer (for example an area overlay)
backendfalseIAnalyticalBackendBackend used for data execution
workspacefalsestringWorkspace identifier
localefalsestringLocale used for UI localization. Defaults to en-US
drillableItemsfalseExplicitDrill[]Drill configuration for points and attribute values
ErrorComponentfalseComponentTypeComponent rendered when the visualization is in an error state
LoadingComponentfalseComponentTypeComponent rendered while the visualization is loading
onErrorfalseOnErrorCallback fired when loading or rendering fails
onExportReadyfalseOnExportReadyCallback fired when export functions become available
onLoadingChangedfalseOnLoadingChangedCallback fired when the loading state changes
onDrillfalseOnFiredDrillEventCallback fired when drilling is triggered
onCenterPositionChangedfalseCenterPositionChangedCallbackCallback fired when the map center changes
onZoomChangedfalseZoomChangedCallbackCallback fired when the map zoom level changes
onBoundsChangedfalseBoundsChangedCallbackCallback fired when the visible map bounds change
onViewportInteractionEndfalseViewportInteractionEndCallbackCallback fired when a user-triggered viewport interaction finishes

Geo Config

NameRequired?TypeDescription
centerfalseIGeoLngLatInitial map center. Defaults to auto-centering based on data
zoomfalsenumberInitial zoom level in the 0-22 range. Defaults to auto-fit
boundsfalseIGeoLngLatBoundsBounding box for a custom viewport. Takes priority over center and zoom
isExportModefalsebooleanExport mode that disables gestures and preserves the drawing buffer
legendfalseIGeoChartLegendConfigLegend configuration
limitfalsenumberMaximum number of rendered data points
tooltipTextfalseIAttributeLegacy wrapper-level tooltip label attribute. GeoChart uses layer-level tooltipText instead
mapboxTokenfalsestringDeprecated legacy Mapbox token. Kept only for backward-compatible typing and ignored by MapLibre-based charts
mapStylefalsestring | StyleSpecificationCustom MapLibre style URL or inline style specification
basemapfalseGeoBasemapAlpha. Basemap style identifier such as "standard-light" or "satellite"
maxZoomLevelfalsenumber | nullMaximum zoom level. undefined keeps the default, null removes the limit
separatorsfalseISeparatorsCustom number separators used for formatting
pointsfalseIGeoChartPointsConfigConfiguration for pushpin markers (clustering, sizing, shape type)
viewportfalseIGeoChartViewportThe viewport preset or explicit bounds that the map should focus after rendering
colorsfalsestring[]Simple color palette expressed as CSS color strings
colorPalettefalseIColorPaletteStructured color palette compatible with color mapping GUIDs
colorMappingfalseIColorMapping[]Explicit color mapping overrides
showLabelsfalsebooleanDisplays data labels on the map when supported
cooperativeGesturesfalsebooleanWhen true, requires Ctrl/Cmd + scroll to zoom (useful inside scroll containers)

For additional examples of colors, separators, or legend behavior, see Chart Config.

Points Config

NameRequired?TypeDescription
minSizefalseGeoChartPushpinSizeOptionMinimum marker size option: "0.5x" | "0.75x" | "normal" | "1.25x" | "1.5x" | "default"
maxSizefalseGeoChartPushpinSizeOptionMaximum marker size option: "0.5x" | "0.75x" | "normal" | "1.25x" | "1.5x" | "default"
groupNearbyPointsfalsebooleanGroups nearby points into clusters. Defaults to false.
shapeTypefalseGeoChartShapeTypeMarker shape: "circle" (default), "iconByValue" (icon from a geoIcon attribute), or "oneIcon" (static icon from a sprite sheet)
iconfalsestringSprite sheet icon name. Required when shapeType is "oneIcon".

Viewport Config

NameRequired?TypeDescription
areafalseIGeoChartViewportAreaViewport preset: "auto" (default) | "custom" | "world" | "continent_af" | "continent_as" | "continent_au" | "continent_eu" | "continent_na" | "continent_sa"
frozenfalsebooleanLocks user interaction (pan and zoom) when true. Defaults to false.
navigationfalseIGeoChartViewportNavigationFine-grained control: { pan?: boolean, zoom?: boolean }. Defaults to both true.

Legend Config

NameRequired?TypeDescription
enabledfalsebooleanEnables legend rendering. Defaults to true.
positionfalseGeoLegendPosition | LegacyGeoLegendPosition"auto" (default), "top-left", "top-right", "bottom-left", or "bottom-right". Legacy edge values are deprecated.
responsivefalseboolean | "autoPositionWithPopup"true enables responsive legend layout. Legacy "autoPositionWithPopup" preserves older automatic legend placement behavior in smaller containers. Defaults to false.

The following example shows the supported config structure with sample values:

{
    points: {
        minSize: "0.5x", // "0.5x" | "0.75x" | "normal" | "1.25x" | "1.5x" | "default"
        maxSize: "1.5x",
        groupNearbyPoints: true,
        shapeType: "circle", // "circle" | "iconByValue" | "oneIcon"
    },
    viewport: {
        area: "world", // "auto" | "custom" | "world" | "continent_af" | "continent_as" | "continent_au" | "continent_eu" | "continent_na" | "continent_sa"
        frozen: false,
        navigation: {
            pan: true,
            zoom: true,
        },
    },
    bounds: {
        northEast: { lat: 50.5, lng: 20.0 },
        southWest: { lat: 45.0, lng: 12.0 },
    },
    maxZoomLevel: 15,
    cooperativeGestures: true,
    tooltipText: Md.City.Name,
    colors: ["rgb(195, 49, 73)", "rgb(168, 194, 86)"],
    colorPalette: [{
        guid: "01",
        fill: {
            r: 195,
            g: 49,
            b: 73
        }
    }, {
        guid: "02",
        fill: {
            r: 168,
            g: 194,
            b: 86
        }
    }],
    colorMapping: [{
        predicate: (headerItem) => {
            return headerItem.attributeHeaderItem && (headerItem.attributeHeaderItem.name === "adult");
        },
        color: {
            type: "guid",
            value: "02"
        }
    }],
    legend: {
        enabled: true,
        position: "top-right",
    },
    separators: {
        thousand: ",",
        decimal: "."
    }
}

Notes

  • GeoPushpinChart is a convenience wrapper over GeoChart for the single-pushpin-layer scenario.
  • The location prop is deprecated. Use separate latitude and longitude attributes instead.
  • mapboxToken is deprecated and ignored by the MapLibre-based implementation. MapboxTokenProvider is relevant only for LegacyGeoPushpinChart.