import type { IMapLineSeriesDataItem } from "./MapLineSeries"; import type { IMapPolygonSeriesDataItem } from "./MapPolygonSeries"; import type { Bullet } from "../../core/render/Bullet"; import type { DataItem } from "../../core/render/Component"; import type { MapLine } from "./MapLine"; import { MapSeries, IMapSeriesSettings, IMapSeriesDataItem, IMapSeriesPrivate } from "./MapSeries"; import type { IPoint } from "../../core/util/IPoint"; import type { Animation } from "../../core/util/Entity"; import type { IDisposer } from "../../core/util/Disposer"; import type { IGeoPoint } from "../../core/util/IGeoPoint"; import type { IDeform } from "../../core/render/backend/Renderer"; export interface IMapPointSeriesPrivate extends IMapSeriesPrivate { } export interface IMapPointSeriesDataItem extends IMapSeriesDataItem { /** * GeoJSON geometry of the point. */ geometry?: GeoJSON.Point | GeoJSON.MultiPoint; /** * Longitude of the point, in degrees. */ longitude?: number; /** * Latitude of the point, in degrees. */ latitude?: number; /** * Height above the ground, in metres: `400000` is about the height of the * International Space Station. On flat maps the point rises up the screen. * * Read from data only when the series sets `altitudeField`. A point on a * line takes the line's altitude instead. * * @since 5.21.0 */ altitude?: number; /** * Where on its line the point sits, from `0` (start) to `1` (end). */ positionOnLine?: number; /** * Turns the bullet to face the way its line runs. */ autoRotate?: boolean; /** * Degrees added to the angle `autoRotate` works out, such as `180` to face * the other way. */ autoRotateAngle?: number; /** * Data item of a line in a [[MapLineSeries]] to place the point on, at * `positionOnLine`. */ lineDataItem?: DataItem; /** * Id of a line, in any [[MapLineSeries]] of the chart, to place the point * on, at `positionOnLine`. */ lineId?: string; /** * Data item of a polygon in a [[MapPolygonSeries]] to place the point at, * in its visual center. */ polygonDataItem?: DataItem; /** * Id of a polygon, in any [[MapPolygonSeries]] of the chart, to place the * point at, in its visual center. */ polygonId?: string; /** * Places the point by its bullet's own `x` and `y` instead of its longitude * and latitude, so it stays put as the map moves. * * A [[MapLineSeries]] can't connect fixed points. * * @default false * @since 5.2.34 */ fixed?: boolean; /** * Where the point is drawn, in pixels, relative to the map's area. Set by * the series. */ point?: IPoint; /** * @ignore */ clipped?: boolean; } export interface IMapPointSeriesSettings extends IMapSeriesSettings { /** * Field in `data` that holds the id of a polygon to place the point at, in * its visual center. Not set by default. */ polygonIdField?: string; /** * Hides the points on the side of the map facing the viewer. With * `clipBack: false`, only the points behind a globe show. * * @default false */ clipFront?: boolean; /** * Hides the points on the far side of a globe. Only projections with a * hidden side, such as `geoOrthographic`, are affected. * * @default true */ clipBack?: boolean; /** * Lays bullets onto the map's surface: each bullet turns, squashes and * stretches with the projection where it is, as if painted on the map. * On a globe they flatten towards the edge; on Mercator they grow towards * the poles. * * @default false * @since 5.21.0 */ surfaceBullets?: boolean; /** * Field in `data` that holds the point's latitude. * * @default "latitude" */ latitudeField?: string; /** * Field in `data` that holds the point's longitude. * * @default "longitude" */ longitudeField?: string; /** * Field in `data` that holds whether the point is `fixed`. Not set by * default. */ fixedField?: string; /** * Field in `data` that holds the id of the line the point sits on. * * @default "lineId" * @since 5.20.6 */ lineIdField?: string; /** * Field in `data` that holds the point's height above the ground, in * metres. * * Not set by default, so a data column that happens to be called * "altitude" (perhaps in feet, or above sea level) isn't read as heights. * * @since 5.21.0 */ altitudeField?: string; /** * Field in `data` that holds where on its line the point sits, from `0` * (start) to `1` (end). * * @default "positionOnLine" * @since 5.20.6 */ positionOnLineField?: string; /** * Field in `data` that holds whether the point turns to face the way its * line runs. * * @default "autoRotate" * @since 5.20.6 */ autoRotateField?: string; /** * Field in `data` that holds degrees added to the angle `autoRotate` works * out. * * @default "autoRotateAngle" * @since 5.20.6 */ autoRotateAngleField?: string; /** * Scales bullets with the map's zoom level, so they grow as the map zooms * in. * * @since 5.2.8 * @default false */ autoScale?: boolean; } /** * A map series of points, shown as bullets. A point sits at a longitude and * latitude, in a polygon, or on a line. * * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-point-series/} for more info * @important */ export declare class MapPointSeries extends MapSeries { static className: string; static classNames: Array; _settings: IMapPointSeriesSettings; _privateSettings: IMapPointSeriesPrivate; _dataItemSettings: IMapPointSeriesDataItem; protected _types: Array; protected _travel: WeakMap, { position: number; back: boolean; }>; /** * Is the point travelling towards the start of its line? Only while an * `animations` entry of its bullet moves it: a point set in place faces the * way the line runs, and one moved from code is turned by that code, as the * flight demos do. */ protected _movingBack(dataItem: DataItem, position: number, bullet: Bullet): boolean; protected _lineChangedDps: Map, { line: MapLine; dp: IDisposer; }>; protected _afterNew(): void; /** * @ignore */ markDirtyProjection(): void; /** * Redraws the series, and places the bullets of `dataItem` again. * * @param dataItem Data item whose bullets to place * @since 5.0.21 */ markDirtyValues(dataItem: DataItem): void; protected processDataItem(dataItem: DataItem): void; protected _makeBullets(dataItem: DataItem): void; protected _setBulletParent(bullet?: Bullet): void; _positionBullet(bullet: Bullet): void; protected _raisedPoint(geoPoint: IGeoPoint, altitude: number): IPoint | undefined; protected _positionBulletReal(bullet: Bullet, geometry: GeoJSON.Geometry, coordinates: [number, number], angle?: number, altitude?: number): void; _prepareChildren(): void; /** * How the surface looks at a point, against the map's center: the * projected east and north directions, as a 2x2 transform for a bullet. */ protected _surfaceDeform(longitude: number, latitude: number): IDeform | undefined; /** * Zooms the map to a point, centered. * * @param dataItem Data item of the point * @param zoomLevel Zoom level * @param rotate Also rotate the map to bring the point to the middle, as on a globe * @return Zoom level animation */ zoomToDataItem(dataItem: DataItem, zoomLevel: number, rotate?: boolean): Animation | undefined; /** * Zooms the map to fit several points. * * @param dataItems Data items of the points * @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.5.6 */ zoomToDataItems(dataItems: Array>, rotate?: boolean): Animation | undefined; /** * @ignore */ disposeDataItem(dataItem: DataItem): void; protected _dispose(): 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; } //# sourceMappingURL=MapPointSeries.d.ts.map