import type { DataItem } from "../../core/render/Component"; import type { Animation } from "../../core/util/Entity"; import type { IPoint } from "../../core/util/IPoint"; import type { IGeoPoint } from "../../core/util/IGeoPoint"; import type { IDisposer } from "../../core/util/Disposer"; import type { MapChart } from "./MapChart"; import { MapSeries, IMapSeriesSettings, IMapSeriesDataItem, IMapSeriesPrivate } from "./MapSeries"; import { MapPolygon } from "./MapPolygon"; import { ListTemplate } from "../../core/util/List"; export interface IMapPolygonSeriesPrivate extends IMapSeriesPrivate { } export interface IMapPolygonSeriesDataItem extends IMapSeriesDataItem { /** * The polygon that shows the data item. */ mapPolygon: MapPolygon; /** * GeoJSON geometry of the polygon. */ geometry?: GeoJSON.Polygon | GeoJSON.MultiPolygon; } export interface IMapPolygonSeriesSettings extends IMapSeriesSettings { /** * Reverses the order of the points in each polygon ring (their winding * order). Some GeoJSON tools wind polygons the other way, so try this if a * custom map looks garbled. * * @default false * @since 5.2.42 */ reverseGeodata?: boolean; /** * Zooms the map to a polygon when it is clicked, and back to the home * position when it is clicked again or the map's background is clicked. * * On a map panned by rotating (`panX: "rotateX"` or `panY: "rotateY"`), * the polygon also turns to the middle. * * The polygon zoomed to is `active`, so an `"active"` state can mark it. * * @default false * @since 5.21.0 */ clickZoom?: boolean; } /** * A map series of polygons, such as countries or regions. * * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-polygon-series/} for more info * @important */ export declare class MapPolygonSeries extends MapSeries { /** * @ignore */ makeMapPolygon(dataItem: DataItem): MapPolygon; protected _newMapPolygon(): MapPolygon; protected _clickDps: Map; protected _clickBackgroundDp?: IDisposer; protected _clickZoomChart?: MapChart; protected _zoomedDataItem?: DataItem; /** * All polygons of the series. Configure them through * `mapPolygons.template`. * * @default new ListTemplate */ readonly mapPolygons: ListTemplate; static className: string; static classNames: Array; _settings: IMapPolygonSeriesSettings; _privateSettings: IMapPolygonSeriesPrivate; _dataItemSettings: IMapPolygonSeriesDataItem; protected _types: Array; /** * @ignore */ markDirtyProjection(): void; _prepareChildren(): void; protected processDataItem(dataItem: DataItem): void; /** * @ignore */ disposeDataItem(dataItem: DataItem): void; /** * @ignore */ protected _excludeDataItem(dataItem: DataItem): void; /** * @ignore */ protected _unexcludeDataItem(dataItem: DataItem): void; /** * @ignore */ protected _notIncludeDataItem(dataItem: DataItem): void; /** * @ignore */ protected _unNotIncludeDataItem(dataItem: DataItem): void; /** * Redraws the series, and the polygon of `dataItem` from its `geometry`, * such as after the geometry was changed in place. * * @param dataItem Data item whose polygon to redraw * @since 5.0.21 */ markDirtyValues(dataItem: DataItem): void; protected _watchClick(mapPolygon: MapPolygon): void; protected _unwatchClicks(): void; protected _setUpClickZoom(): void; /** * @ignore */ _onGoHome(): void; protected _dispose(): void; protected _clickZoomTo(mapPolygon: MapPolygon): void; protected _clickZoomOut(clicked?: MapPolygon): void; protected _markZoomed(dataItem: DataItem | undefined, clicked?: MapPolygon): void; /** * Zooms the map to fit a polygon, centered. * * @param dataItem Data item of the polygon * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-pan-zoom/#Zooming_to_clicked_object} for more info * @param rotate Also rotate the map to bring the polygon's center to the middle, as on a globe * @return Zoom level animation */ zoomToDataItem(dataItem: DataItem, rotate?: boolean): Animation | undefined; /** * Zooms the map to fit several polygons. * * @param dataItems Data items of the polygons * @param rotate Also rotate the map to bring the middle of their bounds to the middle of the view * @return Zoom level animation * @since 5.9.0 */ zoomToDataItems(dataItems: Array>, rotate?: boolean): Animation | undefined; /** * Returns the polygon of this series drawn at a point, if any. * * @since 5.9.8 * @param point Point in pixels, relative to the root * @return Polygon */ getPolygonByPoint(point: IPoint): MapPolygon | undefined; /** * Returns the polygon of this series drawn at a geographic point, if any. * * @param point Geographic point * @return Polygon */ getPolygonByGeoPoint(point: IGeoPoint): MapPolygon | undefined; } //# sourceMappingURL=MapPolygonSeries.d.ts.map