import type { MapLineSeries } from "./MapLineSeries"; import type { IGeoPoint } from "../../core/util/IGeoPoint"; import type { IPoint } from "../../core/util/IPoint"; import type { IGraphics } from "../../core/render/backend/Renderer"; import { Graphics, IGraphicsSettings, IGraphicsPrivate, IGraphicsEvents } from "../../core/render/Graphics"; export interface IMapLineSettings extends IGraphicsSettings { /** * The line's path, as GeoJSON geometry. A third value in a point's * coordinates is its height in metres, used once `altitude` is set. */ geometry?: GeoJSON.LineString | GeoJSON.MultiLineString; /** * How far, in pixels, the drawn line may stray from the curve the * projection bends it into (d3-geo's resampling precision). Smaller is * more accurate but slower. * * @default 0.5 */ precision?: number; /** * Raises the line above the surface so it arcs like a trajectory: each leg, * from one point to the next, rises this many metres in its middle. * `400000` is about the height of the International Space Station. * * Once it is set (`0` included), every point of the line sits at its own * height: the third value of its coordinates, or the `altitude` of the map * point it connects, in metres too. Between points the height changes * evenly, and this arc is added on top, so `0` follows the heights alone. * A negative height goes below the surface: inside a globe, hidden where the * globe covers it. Without `altitude`, the line stays on the surface. On flat * maps height goes up the screen. * * Does not apply to `lineType: "straight"`. * * @since 5.21.0 */ altitude?: number; } export interface IMapLinePrivate extends IGraphicsPrivate { /** * @ignore */ series: MapLineSeries; } export interface IMapLineEvents extends IGraphicsEvents { /** * The line's shape was worked out again, as after its geometry or the * map's projection changed. */ linechanged: {}; } /** * A line in a [[MapLineSeries]]. */ export declare class MapLine extends Graphics { _settings: IMapLineSettings; _privateSettings: IMapLinePrivate; _events: IMapLineEvents; static className: string; static classNames: Array; protected _projectionDirty: boolean; _beforeChanged(): void; /** * @ignore */ markDirtyProjection(): void; _clearDirty(): void; protected _segments(): Array>>; protected _hasAltitude(): boolean; /** * Returns the line's altitude at a position along it. A line without * `altitude` gives `0`. * * @param position Position from `0` (start) to `1` (end) * @return Altitude in metres * @since 5.21.0 */ positionToAltitude(position: number): number; /** * Draws the line along the globe, raised by its altitude, leaving out the * parts the globe hides. */ protected _drawRaised(display: IGraphics): void; _getTooltipPoint(): IPoint; /** * Returns the geographic point at a position along the line. * * @param position Position from `0` (start) to `1` (end) * @return Geographic point */ positionToGeoPoint(position: number): IGeoPoint; } //# sourceMappingURL=MapLine.d.ts.map