🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@2gis/mapgl

Package Overview
Dependencies
Maintainers
9
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@2gis/mapgl - npm Package Compare versions

Comparing version
1.71.0
to
1.72.0
+34
types/objects/arrow.d.ts
import type { Map } from '../map';
import type { ArrowOptions } from '../types/index';
import type { DynamicObjectEventTable } from '../types/events';
import { Evented } from '../utils/evented';
/**
* Class for creating an arrow on the map.
*/
export declare class Arrow extends Evented<DynamicObjectEventTable<Arrow>> {
/**
* User specific data. Empty by default
*/
userData: any;
/**
* Example:
* ```js
* const arrow = new mapgl.Arrow(map, {
* coordinates: [
* [
* [82.920412, 55.030111],
* [82.920437, 55.030231],
* ],
* ],
* });
* ```
* @param map The map instance.
* @param options Arrow options.
*/
constructor(map: Map, options: ArrowOptions);
/**
* Destroys the arrow.
*/
destroy(): void;
private _emitPointerEvent;
}
+1
-1
{
"name": "@2gis/mapgl",
"version": "1.71.0",
"version": "1.72.0",
"description": "MapGL API script loader with typings",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -10,2 +10,3 @@ import { Map } from './map';

import { Raster } from './objects/raster';
import { Arrow } from './objects/arrow';
import { GltfModel } from './objects/gltfModel';

@@ -21,7 +22,7 @@ import { Control } from './controls/control';

import { DefaultSource } from './sources/defaultSource';
export { Map, Marker, Label, HtmlMarker, Control, ZoomControl, TrafficControl, ScaleControl, FloorControl, CircleMarker, Circle, Polygon, Polyline, GeoJsonSource, GeoJsonViewportSource, DefaultSource, RasterTileSource, Raster, GltfModel, };
export { Map, Marker, Label, HtmlMarker, Control, ZoomControl, TrafficControl, ScaleControl, FloorControl, CircleMarker, Circle, Polygon, Polyline, GeoJsonSource, GeoJsonViewportSource, DefaultSource, RasterTileSource, Raster, Arrow, GltfModel, };
export { type LngLatBounds, LngLatBoundsClass } from './objects/lngLatBounds';
export type { StyleIconConfig, StyleOptions } from './types/styles';
export type { AnimationOptions, RotationAnimationOptions, Easing } from './types/animations';
export type { GltfModelOptions, GltfModelTransformationOptions, CircleMarkerOptions, CircleOptions, ControlOptions, ControlPosition, FitBoundsOptions, GeoJsonSourceOptions, GeoJsonViewportSourceOptions, HtmlMarkerOptions, LabelImage, LabelOptions, MapOptions, MapSupportOptions, MarkerIconOptions, MarkerLabelOptions, MarkerOptions, Padding, PolygonOptions, PolylineOptions, RasterTileSourceOptions, SourceAttributes, RasterOptions, RasterSource, FeatureState, FeatureStateMap, } from './types';
export type { GltfModelOptions, GltfModelTransformationOptions, CircleMarkerOptions, CircleOptions, ArrowOptions, ControlOptions, ControlPosition, FitBoundsOptions, GeoJsonSourceOptions, GeoJsonViewportSourceOptions, HtmlMarkerOptions, LabelImage, LabelOptions, MapOptions, MapSupportOptions, MarkerIconOptions, MarkerLabelOptions, MarkerOptions, Padding, PolygonOptions, PolylineOptions, RasterTileSourceOptions, SourceAttributes, RasterOptions, RasterSource, FeatureState, FeatureStateMap, } from './types';
export type { DefaultEventTargetData, DynamicObjectEventTable, DynamicObjectPointerEvent, EventTarget, EventTargetData, FloorLevelChangeEvent, FloorPlanHideEvent, FloorPlanShowEvent, GeoJsonEventTargetData, MapEvent, MapEventTable, MapPointerEvent, PointerEvent, StyleLoadEvent, TrafficScoreEvent, TrafficVisibilityEvent, } from './types/events';

@@ -28,0 +29,0 @@ export { isSupported, notSupportedReason } from './isSuported';

@@ -885,2 +885,85 @@ import type { LngLatBounds } from '../objects/lngLatBounds';

/**
* Arrow initialization options.
*/
export interface ArrowOptions extends TierOption {
/**
* Arrow path or an array of arrow paths.
*
* **Simple case — a single arrow** (`number[][]`):
* An array of points `[firstPoint, secondPoint, ...]`,
* where each point is a geographical coordinate `[longitude, latitude]`.
*
* **General case — multiple arrows** (`number[][][]`):
* An array of paths `[firstArrowPath, secondArrowPath, ...]`,
* where each path is an array of points `[firstPoint, secondPoint, ...]`,
* and each point is a geographical coordinate `[longitude, latitude]`.
*
* Each path defines a single arrow drawn along it with an arrow tip at the end.
* Multiple paths can be provided to draw several arrows within one Arrow object.
*/
coordinates: number[][] | number[][][];
/**
* Draw order.
*/
zIndex?: number;
/**
* Minimum display styleZoom.
*/
minZoom?: number;
/**
* Maximum display styleZoom.
*/
maxZoom?: number;
/**
* Fill color in hexadecimal RGB (`#ff0000`) or RGBA (`#ff0000ff`) format.
*/
color?: string;
/**
* Stroke color in hexadecimal RGB (`#ff0000`) or RGBA (`#ff0000ff`) format.
*/
strokeColor?: string;
/**
* Line width in pixels.
*/
width?: number;
/**
* Stroke width in pixels.
*/
strokeWidth?: number;
/**
* The rounding radius of arrow corners in pixels. Should correspond the width value.
*/
roundingRadius?: number;
/**
* The width multiplier of the arrow tip.
*/
tipWidthMultiplier?: number;
/**
* The height multiplier of the arrow tip.
*/
tipHeightMultiplier?: number;
/**
* The amplitude of the tip movement during animation in pixels.
*/
tipMovementAmplitude?: number;
/**
* Whether to animate the arrow. `false` by default.
*/
animate?: boolean;
/**
* Number of animation iterations.
* Set to `1` for a single animation or a higher number for repeated animations.
* Note: This option takes effect only when `animate` is `true`.
*/
iterationCount?: number;
/**
* User specific data.
*/
userData?: any;
/**
* Whether the arrow responds to pointer events. `true` by default.
*/
interactive?: boolean;
}
/**
* Source image for text label background.

@@ -1354,3 +1437,3 @@ */

*/
export type GraphicsPresetFeatureFlag = 'skyOff' | 'fogOff' | 'shadowsOff' | 'immersiveRoadsOff' | 'modelsOff' | 'globeOff';
export type GraphicsPresetFeatureFlag = 'skyOff' | 'fogOff' | 'shadowsOff' | 'immersiveRoadsOff' | 'reliefOff' | 'modelsOff' | 'globeOff';
/**

@@ -1357,0 +1440,0 @@ * Graphics preset.