azure-maps-control 2.1.12 → 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atlas-core-bare.js +27768 -0
- package/dist/atlas-core-bare.min.js +55 -0
- package/dist/atlas-core.js +9174 -8745
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.css +29 -0
- package/dist/atlas.js +5302 -4873
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +171 -21
package/package.json
CHANGED
package/typings/index.d.ts
CHANGED
|
@@ -629,9 +629,9 @@ declare namespace atlas {
|
|
|
629
629
|
*/
|
|
630
630
|
onRemove(): void;
|
|
631
631
|
/**
|
|
632
|
-
* Set the style that need to be displayed as currently selected.
|
|
632
|
+
* Set the style that need to be displayed as currently selected.
|
|
633
633
|
* Style will automatically get selected if `StyleControlOptions.autoSelectionMode` is `true`
|
|
634
|
-
* @param styleName - Style name that need to be disabled as currently selected
|
|
634
|
+
* @param styleName - Style name that need to be disabled as currently selected
|
|
635
635
|
*/
|
|
636
636
|
setSelectedStyle(styleName: string): void;
|
|
637
637
|
/**
|
|
@@ -702,7 +702,7 @@ declare namespace atlas {
|
|
|
702
702
|
* Sets the control state
|
|
703
703
|
*/
|
|
704
704
|
set isActive(newValue: boolean);
|
|
705
|
-
|
|
705
|
+
|
|
706
706
|
/**
|
|
707
707
|
* Initialization method for the control which is called when added to the map.
|
|
708
708
|
* @param map The map that the control will be added to.
|
|
@@ -1817,11 +1817,11 @@ declare namespace atlas {
|
|
|
1817
1817
|
/**
|
|
1818
1818
|
* Perform a Douglas-Peucker simplification on an array of positions or pixels.
|
|
1819
1819
|
* @param points The position or pixel points to simplify.
|
|
1820
|
-
* @param tolerance A tolerance to use in the simplification.
|
|
1821
|
-
* @returns A new array of the simplified set of points.
|
|
1820
|
+
* @param tolerance A tolerance to use in the simplification.
|
|
1821
|
+
* @returns A new array of the simplified set of points.
|
|
1822
1822
|
*/
|
|
1823
1823
|
export function simplify(points: (Position | Pixel)[], tolerance: number): (Position | Pixel)[];
|
|
1824
|
-
|
|
1824
|
+
|
|
1825
1825
|
/**
|
|
1826
1826
|
* Denormalizes path on antimeridian, this makes lines with coordinates on the opposite side of the antimeridian to always cross it. Note that the path crossing antimeridian will contain longitude outside of -180 to 180 range.
|
|
1827
1827
|
* See getPathSplitByAntimeridian when this is not desired.
|
|
@@ -1844,7 +1844,6 @@ declare namespace atlas {
|
|
|
1844
1844
|
*/
|
|
1845
1845
|
export class Map {
|
|
1846
1846
|
private readonly styleLayerIds;
|
|
1847
|
-
private readonly styleSourceIds;
|
|
1848
1847
|
private readonly map;
|
|
1849
1848
|
private localizedStringsPromise;
|
|
1850
1849
|
private insights;
|
|
@@ -2613,7 +2612,7 @@ declare namespace atlas {
|
|
|
2613
2612
|
*/
|
|
2614
2613
|
export function setLanguage(language: string): void;
|
|
2615
2614
|
/**
|
|
2616
|
-
* Sets Maximum number of images (raster tiles, sprites, icons) to load in parallel,
|
|
2615
|
+
* Sets Maximum number of images (raster tiles, sprites, icons) to load in parallel,
|
|
2617
2616
|
* which affects performance in raster-heavy maps. 16 by default.
|
|
2618
2617
|
* @param maxParallelImageRequests Maximum number of images to load in parallel.
|
|
2619
2618
|
*/
|
|
@@ -2821,6 +2820,12 @@ declare namespace atlas {
|
|
|
2821
2820
|
* @default false
|
|
2822
2821
|
*/
|
|
2823
2822
|
optional?: boolean;
|
|
2823
|
+
/**
|
|
2824
|
+
* Size of the additional area around the icon bounding box used for detecting symbol collisions.
|
|
2825
|
+
* Default `2`.
|
|
2826
|
+
* @default 2
|
|
2827
|
+
*/
|
|
2828
|
+
padding?: number | Expression;
|
|
2824
2829
|
/**
|
|
2825
2830
|
* Specifies the orientation of the icon when the map is pitched.
|
|
2826
2831
|
* <p>`"auto"`: Automatically matches the value of `rotationAlignment`.</p>
|
|
@@ -2911,15 +2916,15 @@ declare namespace atlas {
|
|
|
2911
2916
|
sourceLayer?: string;
|
|
2912
2917
|
|
|
2913
2918
|
/**
|
|
2914
|
-
* Specifies the color gradient used to colorize the pixels in the heatmap.
|
|
2915
|
-
* This is defined using an expression that uses `["heatmap-density"]` as input.
|
|
2919
|
+
* Specifies the color gradient used to colorize the pixels in the heatmap.
|
|
2920
|
+
* This is defined using an expression that uses `["heatmap-density"]` as input.
|
|
2916
2921
|
* Default `["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"]`
|
|
2917
2922
|
* @default `["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"]`
|
|
2918
2923
|
*/
|
|
2919
2924
|
color?: Expression;
|
|
2920
2925
|
|
|
2921
2926
|
/**
|
|
2922
|
-
* Similar to `heatmap-weight` but specifies the global heatmap intensity.
|
|
2927
|
+
* Similar to `heatmap-weight` but specifies the global heatmap intensity.
|
|
2923
2928
|
* The higher this value is, the more ‘weight’ each point will contribute to the appearance.
|
|
2924
2929
|
* Default `1`
|
|
2925
2930
|
* @default 1
|
|
@@ -2934,7 +2939,7 @@ declare namespace atlas {
|
|
|
2934
2939
|
opacity?: number | Expression;
|
|
2935
2940
|
|
|
2936
2941
|
/**
|
|
2937
|
-
* The radius in pixels used to render a data point on the heatmap.
|
|
2942
|
+
* The radius in pixels used to render a data point on the heatmap.
|
|
2938
2943
|
* The radius must be a number greater or equal to 1.
|
|
2939
2944
|
* Default `30`.
|
|
2940
2945
|
* @default 30
|
|
@@ -2942,9 +2947,9 @@ declare namespace atlas {
|
|
|
2942
2947
|
radius?: number | Expression;
|
|
2943
2948
|
|
|
2944
2949
|
/**
|
|
2945
|
-
* Specifies how much an individual data point contributes to the heatmap.
|
|
2946
|
-
* Must be a number greater than 0. A value of 5 would be equivalent to having 5 points of weight 1 in the same spot.
|
|
2947
|
-
* This is useful when clustering points to allow heatmap rendering or large datasets.
|
|
2950
|
+
* Specifies how much an individual data point contributes to the heatmap.
|
|
2951
|
+
* Must be a number greater than 0. A value of 5 would be equivalent to having 5 points of weight 1 in the same spot.
|
|
2952
|
+
* This is useful when clustering points to allow heatmap rendering or large datasets.
|
|
2948
2953
|
* Default `1`
|
|
2949
2954
|
* @default 1
|
|
2950
2955
|
*/
|
|
@@ -3254,6 +3259,26 @@ declare namespace atlas {
|
|
|
3254
3259
|
* @default "point"
|
|
3255
3260
|
*/
|
|
3256
3261
|
placement?: "point" | "line" | "line-center";
|
|
3262
|
+
/**
|
|
3263
|
+
* Sorts features in ascending order based on this value. Features with
|
|
3264
|
+
* lower sort keys are drawn and placed first.
|
|
3265
|
+
* Default `undefined`.
|
|
3266
|
+
* @default undefined
|
|
3267
|
+
*/
|
|
3268
|
+
sortKey?: number | Expression;
|
|
3269
|
+
/**
|
|
3270
|
+
* Determines whether overlapping symbols in the same layer are rendered in the order
|
|
3271
|
+
* that they appear in the data source, or by their y position relative to the viewport.
|
|
3272
|
+
* To control the order and prioritization of symbols otherwise, use `sortKey`.
|
|
3273
|
+
* <p>`"auto"`: Sorts symbols by `sortKey` if set. Otherwise behaves like `"viewport-y"`.
|
|
3274
|
+
* <p>`"viewport-y"`: Sorts symbols by their y position if `allowOverlap` is `true` or
|
|
3275
|
+
* if `ignorePlacement` is `false`.
|
|
3276
|
+
* <p>`"source"`: Sorts symbols by `sortKey` if set. Otherwise, symbols are rendered in the
|
|
3277
|
+
* same order as the source data.
|
|
3278
|
+
* Default `"auto"`
|
|
3279
|
+
* @default "auto"
|
|
3280
|
+
*/
|
|
3281
|
+
zOrder?: "auto" | "viewport-y" | "source";
|
|
3257
3282
|
/**
|
|
3258
3283
|
* Distance in pixels between two symbol anchors along a line. Must be greater or equal to 1.
|
|
3259
3284
|
* Default `250`.
|
|
@@ -3312,6 +3337,16 @@ declare namespace atlas {
|
|
|
3312
3337
|
* @default false
|
|
3313
3338
|
*/
|
|
3314
3339
|
ignorePlacement?: boolean;
|
|
3340
|
+
/**
|
|
3341
|
+
* Text justification options.
|
|
3342
|
+
* <p>`"auto"`: The text is aligned towards the anchor position.
|
|
3343
|
+
* <p>`"left"`: The text is aligned to the left.
|
|
3344
|
+
* <p>`"center"`: The text is centered.
|
|
3345
|
+
* <p>`"right"`: The text is aligned to the right.
|
|
3346
|
+
* Default `"center"`.
|
|
3347
|
+
* @default "center"
|
|
3348
|
+
*/
|
|
3349
|
+
justify?: "auto" | "left" | "center" | "right";
|
|
3315
3350
|
/**
|
|
3316
3351
|
* Specifies an offset distance of the icon from its anchor in ems.
|
|
3317
3352
|
* Positive values indicate right and down, while negative values indicate left and up.
|
|
@@ -3327,6 +3362,13 @@ declare namespace atlas {
|
|
|
3327
3362
|
* @default false
|
|
3328
3363
|
*/
|
|
3329
3364
|
optional?: boolean;
|
|
3365
|
+
/**
|
|
3366
|
+
* Size of the additional area around the text bounding box used for detecting
|
|
3367
|
+
* symbol collisions.
|
|
3368
|
+
* Default `2`.
|
|
3369
|
+
* @default 2
|
|
3370
|
+
*/
|
|
3371
|
+
padding?: number | Expression;
|
|
3330
3372
|
/**
|
|
3331
3373
|
* Specifies the orientation of the text when the map is pitched.
|
|
3332
3374
|
* <p>`"auto"`: Automatically matches the value of `rotationAlignment`.</p>
|
|
@@ -3336,6 +3378,13 @@ declare namespace atlas {
|
|
|
3336
3378
|
* @default "auto"
|
|
3337
3379
|
*/
|
|
3338
3380
|
pitchAlignment?: "auto" | "map" | "viewport";
|
|
3381
|
+
/**
|
|
3382
|
+
* Radial offset of text, in the direction of the symbol's anchor. Useful in combination
|
|
3383
|
+
* with `variableAnchor`, which defaults to using the two-dimensional `offset` if present.
|
|
3384
|
+
* Default: `0`
|
|
3385
|
+
* @default 0
|
|
3386
|
+
*/
|
|
3387
|
+
radialOffset?: number | Expression;
|
|
3339
3388
|
/**
|
|
3340
3389
|
* The amount to rotate the text clockwise in degrees.
|
|
3341
3390
|
* Default `0`
|
|
@@ -3355,6 +3404,25 @@ declare namespace atlas {
|
|
|
3355
3404
|
* @default "auto"
|
|
3356
3405
|
*/
|
|
3357
3406
|
rotationAlignment?: "auto" | "map" | "viewport";
|
|
3407
|
+
/**
|
|
3408
|
+
* List of potential anchor locations, to increase the chance of placing high-priority
|
|
3409
|
+
* labels on the map. The renderer will attempt to place the label at each location,
|
|
3410
|
+
* in order, before moving onto the next label. Use `justify: "auto"` to choose text
|
|
3411
|
+
* justification based on anchor position. To apply an offset use the `radialOffset` or
|
|
3412
|
+
* two-dimensional `offset` options.
|
|
3413
|
+
* <p>`"center"`: The center of the icon is placed closest to the anchor.</p>
|
|
3414
|
+
* <p>`"left"`: The left side of the icon is placed closest to the anchor.</p>
|
|
3415
|
+
* <p>`"right"`: The right side of the icon is placed closest to the anchor.</p>
|
|
3416
|
+
* <p>`"top"`: The top of the icon is placed closest to the anchor.</p>
|
|
3417
|
+
* <p>`"bottom"`: The bottom of the icon is placed closest to the anchor.</p>
|
|
3418
|
+
* <p>`"top-left"`: The top left corner of the icon is placed closest to the anchor.</p>
|
|
3419
|
+
* <p>`"top-right"`: The top right corner of the icon is placed closest to the anchor.</p>
|
|
3420
|
+
* <p>`"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.</p>
|
|
3421
|
+
* <p>`"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.</p>
|
|
3422
|
+
* Default: `undefined`
|
|
3423
|
+
* @default undefined
|
|
3424
|
+
*/
|
|
3425
|
+
variableAnchor?: ("center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right")[];
|
|
3358
3426
|
/**
|
|
3359
3427
|
* The size of the font in pixels.
|
|
3360
3428
|
* Must be a number greater or equal to 0.
|
|
@@ -3489,6 +3557,11 @@ declare namespace atlas {
|
|
|
3489
3557
|
* @default ControlStyle.light
|
|
3490
3558
|
*/
|
|
3491
3559
|
style: ControlStyle;
|
|
3560
|
+
/**
|
|
3561
|
+
* Inverts the direction of map rotation controls.
|
|
3562
|
+
* @default false
|
|
3563
|
+
*/
|
|
3564
|
+
inverted?: boolean;
|
|
3492
3565
|
}
|
|
3493
3566
|
|
|
3494
3567
|
/**
|
|
@@ -3507,6 +3580,11 @@ declare namespace atlas {
|
|
|
3507
3580
|
* @default ControlStyle.light
|
|
3508
3581
|
*/
|
|
3509
3582
|
style: ControlStyle;
|
|
3583
|
+
/**
|
|
3584
|
+
* Inverts the direction of map pitch controls.
|
|
3585
|
+
* @default false
|
|
3586
|
+
*/
|
|
3587
|
+
inverted?: boolean;
|
|
3510
3588
|
}
|
|
3511
3589
|
|
|
3512
3590
|
/**
|
|
@@ -3682,7 +3760,7 @@ declare namespace atlas {
|
|
|
3682
3760
|
*/
|
|
3683
3761
|
centerOffset?: atlas.Pixel;
|
|
3684
3762
|
/**
|
|
3685
|
-
* The bearing of the map (rotation) in degrees.
|
|
3763
|
+
* The bearing of the map (rotation) in degrees.
|
|
3686
3764
|
* When the bearing is 0, 90, 180, or 270 the top of the map container will be north, east, south or west respectively.
|
|
3687
3765
|
* `default 0`
|
|
3688
3766
|
* @default 0
|
|
@@ -4219,6 +4297,12 @@ declare namespace atlas {
|
|
|
4219
4297
|
* @default true
|
|
4220
4298
|
*/
|
|
4221
4299
|
touchInteraction?: boolean;
|
|
4300
|
+
/**
|
|
4301
|
+
* Whether touch rotation is enabled for touch devices. This option is not applied if touchInteraction is disabled.
|
|
4302
|
+
* default `true`
|
|
4303
|
+
* @default true
|
|
4304
|
+
*/
|
|
4305
|
+
touchRotate?: boolean;
|
|
4222
4306
|
/**
|
|
4223
4307
|
* Sets the zoom rate of the mouse wheel
|
|
4224
4308
|
* default `1/450`
|
|
@@ -4355,7 +4439,34 @@ declare namespace atlas {
|
|
|
4355
4439
|
| 'SpriteJSON'
|
|
4356
4440
|
| 'Image'
|
|
4357
4441
|
| 'StyleDefinitions'
|
|
4358
|
-
| 'Attribution'
|
|
4442
|
+
| 'Attribution'
|
|
4443
|
+
| 'Thumbnail';
|
|
4444
|
+
|
|
4445
|
+
/**
|
|
4446
|
+
* Represents the contents of the style set.
|
|
4447
|
+
*/
|
|
4448
|
+
export interface StyleSet {
|
|
4449
|
+
created?: string;
|
|
4450
|
+
defaultStyle: string;
|
|
4451
|
+
description?: string;
|
|
4452
|
+
id?: string;
|
|
4453
|
+
styles: StyleSetStyle[];
|
|
4454
|
+
version?: number;
|
|
4455
|
+
}
|
|
4456
|
+
|
|
4457
|
+
/**
|
|
4458
|
+
* Represents the info for a single style.
|
|
4459
|
+
*/
|
|
4460
|
+
export interface StyleSetStyle {
|
|
4461
|
+
copyright?: string;
|
|
4462
|
+
displayName?: string;
|
|
4463
|
+
name: string;
|
|
4464
|
+
shortcutKey?: string;
|
|
4465
|
+
style?: object;
|
|
4466
|
+
theme: string;
|
|
4467
|
+
thumbnail?: string;
|
|
4468
|
+
url?: string;
|
|
4469
|
+
}
|
|
4359
4470
|
|
|
4360
4471
|
/**
|
|
4361
4472
|
* Global properties used in all atlas service requests.
|
|
@@ -4381,12 +4492,24 @@ declare namespace atlas {
|
|
|
4381
4492
|
* @default "atlas.microsoft.com"
|
|
4382
4493
|
*/
|
|
4383
4494
|
domain?: string;
|
|
4495
|
+
/**
|
|
4496
|
+
* The style set of the map. Determines which styles are available to be picked
|
|
4497
|
+
* and what do they consist of (style names, thumbnails, URLs, etc).
|
|
4498
|
+
*/
|
|
4499
|
+
styleSet?: StyleSet;
|
|
4384
4500
|
/**
|
|
4385
4501
|
* Enable accessibility
|
|
4386
4502
|
* default: true
|
|
4387
4503
|
* @default true
|
|
4388
4504
|
*/
|
|
4389
4505
|
enableAccessibility?: boolean;
|
|
4506
|
+
/**
|
|
4507
|
+
* Enable fallback to geocoder for accessibility location, if failed to extract location from vector data.
|
|
4508
|
+
* default: true
|
|
4509
|
+
* @default true
|
|
4510
|
+
* @internal
|
|
4511
|
+
*/
|
|
4512
|
+
enableAccessibilityLocationFallback?: boolean;
|
|
4390
4513
|
/**
|
|
4391
4514
|
* Controls the duration of the fade-in/fade-out animation for label collisions, in milliseconds.
|
|
4392
4515
|
* This setting affects all symbol layers.
|
|
@@ -4395,7 +4518,7 @@ declare namespace atlas {
|
|
|
4395
4518
|
*/
|
|
4396
4519
|
fadeDuration?: number;
|
|
4397
4520
|
/**
|
|
4398
|
-
* Defines a CSS font-family for locally overriding generation of glyphs in the
|
|
4521
|
+
* Defines a CSS font-family for locally overriding generation of glyphs in the
|
|
4399
4522
|
* 'CJK Unified Ideographs', 'Hiragana', 'Katakana' and 'Hangul Syllables' ranges.
|
|
4400
4523
|
* In these ranges, font settings from the map's style will be ignored,
|
|
4401
4524
|
* except for font-weight keywords (light/regular/medium/bold). Set to false,
|
|
@@ -4405,7 +4528,7 @@ declare namespace atlas {
|
|
|
4405
4528
|
*/
|
|
4406
4529
|
localIdeographFontFamily?: string;
|
|
4407
4530
|
/**
|
|
4408
|
-
* Maximum number of images (raster tiles, sprites, icons) to load in parallel,
|
|
4531
|
+
* Maximum number of images (raster tiles, sprites, icons) to load in parallel,
|
|
4409
4532
|
* which affects performance in raster-heavy maps. 16 by default.
|
|
4410
4533
|
*/
|
|
4411
4534
|
maxParallelImageRequests?: number;
|
|
@@ -4559,6 +4682,12 @@ declare namespace atlas {
|
|
|
4559
4682
|
* @param callback The event handler callback.
|
|
4560
4683
|
*/
|
|
4561
4684
|
add(eventType: "stylechanged", callback: (e: StyleChangedEvent) => void): void;
|
|
4685
|
+
/**
|
|
4686
|
+
* Adds a styleset change event to the map.
|
|
4687
|
+
* @param eventType A styleset changed event name
|
|
4688
|
+
* @param callback The event handler callback
|
|
4689
|
+
*/
|
|
4690
|
+
add(eventType: "stylesetchanged", callback: (e: StyleSet) => void): void;
|
|
4562
4691
|
/**
|
|
4563
4692
|
* Adds a wheel event to the map.
|
|
4564
4693
|
* @param eventType The wheel event name.
|
|
@@ -4835,7 +4964,7 @@ declare namespace atlas {
|
|
|
4835
4964
|
* @param eventType The event name.
|
|
4836
4965
|
* @param callback The event handler callback.
|
|
4837
4966
|
*/
|
|
4838
|
-
remove(eventType: string, callback: (e: void | atlas.layer.Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | atlas.source.Source | string) => void): void;
|
|
4967
|
+
remove(eventType: string, callback: (e: void | atlas.layer.Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | atlas.source.Source | string | StyleSet) => void): void;
|
|
4839
4968
|
/**
|
|
4840
4969
|
* Removes an event listener from the DataSource(s).
|
|
4841
4970
|
* @param eventType The event name.
|
|
@@ -4919,6 +5048,26 @@ declare namespace atlas {
|
|
|
4919
5048
|
clear(): void;
|
|
4920
5049
|
}
|
|
4921
5050
|
|
|
5051
|
+
/**
|
|
5052
|
+
* Signature for the `options` parameter passed to `ImageSpriteManager.add`.
|
|
5053
|
+
*/
|
|
5054
|
+
export type StyleImageMetadata = {
|
|
5055
|
+
/** Ratio of pixels in the image to physical pixels on the screen (default: 1) */
|
|
5056
|
+
pixelRatio?: number;
|
|
5057
|
+
|
|
5058
|
+
/** Whether the image should be interpreted as an SDF image (default: false) */
|
|
5059
|
+
sdf?: boolean;
|
|
5060
|
+
|
|
5061
|
+
/** [[x1, x2], ...] if icon-text-fit is used in a layer with this image, defines the part(s) that can be stretched horizontally */
|
|
5062
|
+
stretchX?: number[][];
|
|
5063
|
+
|
|
5064
|
+
/** [[y1, y2], ...] if icon-text-fit is used in a layer with this image, defines the part(s) that can be stretched vertically */
|
|
5065
|
+
stretchY?: number[][];
|
|
5066
|
+
|
|
5067
|
+
/** [x1, y1, x2, y2] if icon-text-fit is used in a layer with this image, defines the part of the image that can be covered by the content in text-field */
|
|
5068
|
+
content?: number[];
|
|
5069
|
+
};
|
|
5070
|
+
|
|
4922
5071
|
/**
|
|
4923
5072
|
* A manager for the map control's image sprite.
|
|
4924
5073
|
* Exposed through the imageSprite property of the atlas.Map class.
|
|
@@ -4930,8 +5079,9 @@ declare namespace atlas {
|
|
|
4930
5079
|
* @param id The image's id.
|
|
4931
5080
|
* If the specified id matches the id of a previously added image the new image will be ignored.
|
|
4932
5081
|
* @param icon The image to add to the map's sprite. Can be a data URI, inline SVG, or image URL.
|
|
5082
|
+
* @param meta Additional options that describe the image
|
|
4933
5083
|
*/
|
|
4934
|
-
add(id: string, icon: string | HTMLImageElement | ImageData): Promise<void>;
|
|
5084
|
+
add(id: string, icon: string | HTMLImageElement | ImageData, meta?: StyleImageMetadata): Promise<void>;
|
|
4935
5085
|
/**
|
|
4936
5086
|
* Removes all images added by the user.
|
|
4937
5087
|
*/
|