azure-maps-control 2.1.11 → 2.1.12

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "azure-maps-control",
3
3
  "author": "Microsoft Corporation",
4
- "version": "2.1.11",
4
+ "version": "2.1.12",
5
5
  "description": "Map SDK for Azure Maps",
6
6
  "keywords": [
7
7
  "azure",
@@ -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,6 +1844,7 @@ declare namespace atlas {
1844
1844
  */
1845
1845
  export class Map {
1846
1846
  private readonly styleLayerIds;
1847
+ private readonly styleSourceIds;
1847
1848
  private readonly map;
1848
1849
  private localizedStringsPromise;
1849
1850
  private insights;
@@ -2612,7 +2613,7 @@ declare namespace atlas {
2612
2613
  */
2613
2614
  export function setLanguage(language: string): void;
2614
2615
  /**
2615
- * Sets Maximum number of images (raster tiles, sprites, icons) to load in parallel,
2616
+ * Sets Maximum number of images (raster tiles, sprites, icons) to load in parallel,
2616
2617
  * which affects performance in raster-heavy maps. 16 by default.
2617
2618
  * @param maxParallelImageRequests Maximum number of images to load in parallel.
2618
2619
  */
@@ -2820,12 +2821,6 @@ declare namespace atlas {
2820
2821
  * @default false
2821
2822
  */
2822
2823
  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;
2829
2824
  /**
2830
2825
  * Specifies the orientation of the icon when the map is pitched.
2831
2826
  * <p>`"auto"`: Automatically matches the value of `rotationAlignment`.</p>
@@ -2916,15 +2911,15 @@ declare namespace atlas {
2916
2911
  sourceLayer?: string;
2917
2912
 
2918
2913
  /**
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.
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.
2921
2916
  * 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"]`
2922
2917
  * @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"]`
2923
2918
  */
2924
2919
  color?: Expression;
2925
2920
 
2926
2921
  /**
2927
- * Similar to `heatmap-weight` but specifies the global heatmap intensity.
2922
+ * Similar to `heatmap-weight` but specifies the global heatmap intensity.
2928
2923
  * The higher this value is, the more ‘weight’ each point will contribute to the appearance.
2929
2924
  * Default `1`
2930
2925
  * @default 1
@@ -2939,7 +2934,7 @@ declare namespace atlas {
2939
2934
  opacity?: number | Expression;
2940
2935
 
2941
2936
  /**
2942
- * The radius in pixels used to render a data point on the heatmap.
2937
+ * The radius in pixels used to render a data point on the heatmap.
2943
2938
  * The radius must be a number greater or equal to 1.
2944
2939
  * Default `30`.
2945
2940
  * @default 30
@@ -2947,9 +2942,9 @@ declare namespace atlas {
2947
2942
  radius?: number | Expression;
2948
2943
 
2949
2944
  /**
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.
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.
2953
2948
  * Default `1`
2954
2949
  * @default 1
2955
2950
  */
@@ -3259,26 +3254,6 @@ declare namespace atlas {
3259
3254
  * @default "point"
3260
3255
  */
3261
3256
  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";
3282
3257
  /**
3283
3258
  * Distance in pixels between two symbol anchors along a line. Must be greater or equal to 1.
3284
3259
  * Default `250`.
@@ -3337,16 +3312,6 @@ declare namespace atlas {
3337
3312
  * @default false
3338
3313
  */
3339
3314
  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";
3350
3315
  /**
3351
3316
  * Specifies an offset distance of the icon from its anchor in ems.
3352
3317
  * Positive values indicate right and down, while negative values indicate left and up.
@@ -3362,13 +3327,6 @@ declare namespace atlas {
3362
3327
  * @default false
3363
3328
  */
3364
3329
  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;
3372
3330
  /**
3373
3331
  * Specifies the orientation of the text when the map is pitched.
3374
3332
  * <p>`"auto"`: Automatically matches the value of `rotationAlignment`.</p>
@@ -3378,13 +3336,6 @@ declare namespace atlas {
3378
3336
  * @default "auto"
3379
3337
  */
3380
3338
  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;
3388
3339
  /**
3389
3340
  * The amount to rotate the text clockwise in degrees.
3390
3341
  * Default `0`
@@ -3404,25 +3355,6 @@ declare namespace atlas {
3404
3355
  * @default "auto"
3405
3356
  */
3406
3357
  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")[];
3426
3358
  /**
3427
3359
  * The size of the font in pixels.
3428
3360
  * Must be a number greater or equal to 0.
@@ -3557,11 +3489,6 @@ declare namespace atlas {
3557
3489
  * @default ControlStyle.light
3558
3490
  */
3559
3491
  style: ControlStyle;
3560
- /**
3561
- * Inverts the direction of map rotation controls.
3562
- * @default false
3563
- */
3564
- inverted?: boolean;
3565
3492
  }
3566
3493
 
3567
3494
  /**
@@ -3580,11 +3507,6 @@ declare namespace atlas {
3580
3507
  * @default ControlStyle.light
3581
3508
  */
3582
3509
  style: ControlStyle;
3583
- /**
3584
- * Inverts the direction of map pitch controls.
3585
- * @default false
3586
- */
3587
- inverted?: boolean;
3588
3510
  }
3589
3511
 
3590
3512
  /**
@@ -3622,11 +3544,6 @@ declare namespace atlas {
3622
3544
  * Default `true`
3623
3545
  */
3624
3546
  autoSelectionMode?: boolean;
3625
- /**
3626
- * theme
3627
- * when unset - all styles are selectable
3628
- */
3629
- theme?: "auto" | string;
3630
3547
  }
3631
3548
 
3632
3549
  /**
@@ -3765,7 +3682,7 @@ declare namespace atlas {
3765
3682
  */
3766
3683
  centerOffset?: atlas.Pixel;
3767
3684
  /**
3768
- * The bearing of the map (rotation) in degrees.
3685
+ * The bearing of the map (rotation) in degrees.
3769
3686
  * When the bearing is 0, 90, 180, or 270 the top of the map container will be north, east, south or west respectively.
3770
3687
  * `default 0`
3771
3688
  * @default 0
@@ -4302,12 +4219,6 @@ declare namespace atlas {
4302
4219
  * @default true
4303
4220
  */
4304
4221
  touchInteraction?: boolean;
4305
- /**
4306
- * Whether touch rotation is enabled for touch devices. This option is not applied if touchInteraction is disabled.
4307
- * default `true`
4308
- * @default true
4309
- */
4310
- touchRotate?: boolean;
4311
4222
  /**
4312
4223
  * Sets the zoom rate of the mouse wheel
4313
4224
  * default `1/450`
@@ -4444,34 +4355,7 @@ declare namespace atlas {
4444
4355
  | 'SpriteJSON'
4445
4356
  | 'Image'
4446
4357
  | 'StyleDefinitions'
4447
- | 'Attribution'
4448
- | 'Thumbnail';
4449
-
4450
- /**
4451
- * Represents the contents of the style set.
4452
- */
4453
- export interface StyleSet {
4454
- created?: string;
4455
- defaultStyle: string;
4456
- description?: string;
4457
- id?: string;
4458
- styles: StyleSetStyle[];
4459
- version?: number;
4460
- }
4461
-
4462
- /**
4463
- * Represents the info for a single style.
4464
- */
4465
- export interface StyleSetStyle {
4466
- copyright?: string;
4467
- displayName?: string;
4468
- name: string;
4469
- shortcutKey?: string;
4470
- style?: object;
4471
- theme: string;
4472
- thumbnail?: string;
4473
- url?: string;
4474
- }
4358
+ | 'Attribution';
4475
4359
 
4476
4360
  /**
4477
4361
  * Global properties used in all atlas service requests.
@@ -4497,24 +4381,12 @@ declare namespace atlas {
4497
4381
  * @default "atlas.microsoft.com"
4498
4382
  */
4499
4383
  domain?: string;
4500
- /**
4501
- * The style set of the map. Determines which styles are available to be picked
4502
- * and what do they consist of (style names, thumbnails, URLs, etc).
4503
- */
4504
- styleSet?: StyleSet;
4505
4384
  /**
4506
4385
  * Enable accessibility
4507
4386
  * default: true
4508
4387
  * @default true
4509
4388
  */
4510
4389
  enableAccessibility?: boolean;
4511
- /**
4512
- * Enable fallback to geocoder for accessibility location, if failed to extract location from vector data.
4513
- * default: true
4514
- * @default true
4515
- * @internal
4516
- */
4517
- enableAccessibilityLocationFallback?: boolean;
4518
4390
  /**
4519
4391
  * Controls the duration of the fade-in/fade-out animation for label collisions, in milliseconds.
4520
4392
  * This setting affects all symbol layers.
@@ -4523,7 +4395,7 @@ declare namespace atlas {
4523
4395
  */
4524
4396
  fadeDuration?: number;
4525
4397
  /**
4526
- * Defines a CSS font-family for locally overriding generation of glyphs in the
4398
+ * Defines a CSS font-family for locally overriding generation of glyphs in the
4527
4399
  * 'CJK Unified Ideographs', 'Hiragana', 'Katakana' and 'Hangul Syllables' ranges.
4528
4400
  * In these ranges, font settings from the map's style will be ignored,
4529
4401
  * except for font-weight keywords (light/regular/medium/bold). Set to false,
@@ -4533,7 +4405,7 @@ declare namespace atlas {
4533
4405
  */
4534
4406
  localIdeographFontFamily?: string;
4535
4407
  /**
4536
- * Maximum number of images (raster tiles, sprites, icons) to load in parallel,
4408
+ * Maximum number of images (raster tiles, sprites, icons) to load in parallel,
4537
4409
  * which affects performance in raster-heavy maps. 16 by default.
4538
4410
  */
4539
4411
  maxParallelImageRequests?: number;
@@ -4687,12 +4559,6 @@ declare namespace atlas {
4687
4559
  * @param callback The event handler callback.
4688
4560
  */
4689
4561
  add(eventType: "stylechanged", callback: (e: StyleChangedEvent) => void): void;
4690
- /**
4691
- * Adds a styleset change event to the map.
4692
- * @param eventType A styleset changed event name
4693
- * @param callback The event handler callback
4694
- */
4695
- add(eventType: "stylesetchanged", callback: (e: StyleSet) => void): void;
4696
4562
  /**
4697
4563
  * Adds a wheel event to the map.
4698
4564
  * @param eventType The wheel event name.
@@ -4969,7 +4835,7 @@ declare namespace atlas {
4969
4835
  * @param eventType The event name.
4970
4836
  * @param callback The event handler callback.
4971
4837
  */
4972
- remove(eventType: string, callback: (e: void | atlas.layer.Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | atlas.source.Source | string | StyleSet) => void): void;
4838
+ remove(eventType: string, callback: (e: void | atlas.layer.Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | atlas.source.Source | string) => void): void;
4973
4839
  /**
4974
4840
  * Removes an event listener from the DataSource(s).
4975
4841
  * @param eventType The event name.
@@ -5053,26 +4919,6 @@ declare namespace atlas {
5053
4919
  clear(): void;
5054
4920
  }
5055
4921
 
5056
- /**
5057
- * Signature for the `options` parameter passed to `ImageSpriteManager.add`.
5058
- */
5059
- export type StyleImageMetadata = {
5060
- /** Ratio of pixels in the image to physical pixels on the screen (default: 1) */
5061
- pixelRatio?: number;
5062
-
5063
- /** Whether the image should be interpreted as an SDF image (default: false) */
5064
- sdf?: boolean;
5065
-
5066
- /** [[x1, x2], ...] if icon-text-fit is used in a layer with this image, defines the part(s) that can be stretched horizontally */
5067
- stretchX?: number[][];
5068
-
5069
- /** [[y1, y2], ...] if icon-text-fit is used in a layer with this image, defines the part(s) that can be stretched vertically */
5070
- stretchY?: number[][];
5071
-
5072
- /** [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 */
5073
- content?: number[];
5074
- };
5075
-
5076
4922
  /**
5077
4923
  * A manager for the map control's image sprite.
5078
4924
  * Exposed through the imageSprite property of the atlas.Map class.
@@ -5084,9 +4930,8 @@ declare namespace atlas {
5084
4930
  * @param id The image's id.
5085
4931
  * If the specified id matches the id of a previously added image the new image will be ignored.
5086
4932
  * @param icon The image to add to the map's sprite. Can be a data URI, inline SVG, or image URL.
5087
- * @param meta Additional options that describe the image
5088
4933
  */
5089
- add(id: string, icon: string | HTMLImageElement | ImageData, meta?: StyleImageMetadata): Promise<void>;
4934
+ add(id: string, icon: string | HTMLImageElement | ImageData): Promise<void>;
5090
4935
  /**
5091
4936
  * Removes all images added by the user.
5092
4937
  */