azure-maps-control 2.3.5 → 2.3.7
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-snr.js +285 -197
- package/dist/atlas-core-bare.js +287 -199
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +285 -197
- package/dist/atlas-core.js +287 -199
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.css +3 -2
- package/dist/atlas.js +287 -199
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +81 -3
package/package.json
CHANGED
package/typings/index.d.ts
CHANGED
|
@@ -673,6 +673,38 @@ declare namespace atlas {
|
|
|
673
673
|
private constructPitchIncrementButton;
|
|
674
674
|
}
|
|
675
675
|
|
|
676
|
+
/**
|
|
677
|
+
* A control to display a scale bar on the map.
|
|
678
|
+
*/
|
|
679
|
+
export class ScaleControl extends ControlBase {
|
|
680
|
+
private map: Map | null;
|
|
681
|
+
private control;
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Constructs a ScaleControl.
|
|
685
|
+
* @param options The options for the control.
|
|
686
|
+
*/
|
|
687
|
+
constructor(options?: ScaleControlOptions);
|
|
688
|
+
/**
|
|
689
|
+
* Initialization method for the control which is called when added to the map.
|
|
690
|
+
* @param map The map that the control will be added to.
|
|
691
|
+
* @param options The ControlOptions for this control.
|
|
692
|
+
* @return An HTMLElement to be placed on the map for the control.
|
|
693
|
+
*/
|
|
694
|
+
onAdd(map: Map, options?: ControlOptions): HTMLElement;
|
|
695
|
+
/**
|
|
696
|
+
* Method that is called when the control is removed from the map. Should perform any necessary cleanup for the
|
|
697
|
+
* control.
|
|
698
|
+
*/
|
|
699
|
+
onRemove(): void;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Set the scale's unit of the distance
|
|
703
|
+
* @param unit - Unit of the distance (`'imperial'`, `'metric'` or `'nautical'`).
|
|
704
|
+
*/
|
|
705
|
+
setUnit(unit: "imperial" | "metric" | "nautical"): void;
|
|
706
|
+
}
|
|
707
|
+
|
|
676
708
|
/**
|
|
677
709
|
* A control for changing the style of the map.
|
|
678
710
|
*/
|
|
@@ -3326,11 +3358,16 @@ declare namespace atlas {
|
|
|
3326
3358
|
* @default 0.5
|
|
3327
3359
|
*/
|
|
3328
3360
|
fillOpacity?: number | Expression;
|
|
3329
|
-
|
|
3330
3361
|
/**
|
|
3331
3362
|
* Name of image in sprite to use for drawing image fills. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
|
|
3332
3363
|
*/
|
|
3333
3364
|
fillPattern?: string | Expression;
|
|
3365
|
+
/**
|
|
3366
|
+
* Whether or not the fill should be antialiased.
|
|
3367
|
+
* Default `true`.
|
|
3368
|
+
* @default true
|
|
3369
|
+
*/
|
|
3370
|
+
fillAntialias?: boolean;
|
|
3334
3371
|
}
|
|
3335
3372
|
|
|
3336
3373
|
/**
|
|
@@ -3706,6 +3743,24 @@ declare namespace atlas {
|
|
|
3706
3743
|
inverted?: boolean;
|
|
3707
3744
|
}
|
|
3708
3745
|
|
|
3746
|
+
/**
|
|
3747
|
+
* The options for a ScaleControl object.
|
|
3748
|
+
*/
|
|
3749
|
+
export interface ScaleControlOptions extends Options {
|
|
3750
|
+
/**
|
|
3751
|
+
* The maximum length of the scale control in pixels.
|
|
3752
|
+
* Default `100`.
|
|
3753
|
+
* @default 100
|
|
3754
|
+
*/
|
|
3755
|
+
maxWidth?: number;
|
|
3756
|
+
/**
|
|
3757
|
+
* Unit of the distance (`'imperial'`, `'metric'` or `'nautical'`).
|
|
3758
|
+
* Default `'metric'`.
|
|
3759
|
+
* @default 'metric'
|
|
3760
|
+
*/
|
|
3761
|
+
unit?: "imperial" | "metric" | "nautical";
|
|
3762
|
+
}
|
|
3763
|
+
|
|
3709
3764
|
/**
|
|
3710
3765
|
* The options for a StyleControl object.
|
|
3711
3766
|
*/
|
|
@@ -4668,10 +4723,10 @@ declare namespace atlas {
|
|
|
4668
4723
|
*/
|
|
4669
4724
|
enableAccessibility?: boolean;
|
|
4670
4725
|
/**
|
|
4671
|
-
* Enable fallback to geocoder for
|
|
4726
|
+
* Enable the fallback to the REST API geocoder for detecting location accessibility if extracting location from vector data fails.
|
|
4727
|
+
* Disabling this option will prevent the generation of geocode API requests but may lead to a lack of location information for screen readers.
|
|
4672
4728
|
* default: true
|
|
4673
4729
|
* @default true
|
|
4674
|
-
* @internal
|
|
4675
4730
|
*/
|
|
4676
4731
|
enableAccessibilityLocationFallback?: boolean;
|
|
4677
4732
|
/**
|
|
@@ -5459,6 +5514,29 @@ declare namespace atlas {
|
|
|
5459
5514
|
* @param sourceLayer the layer where shapes and features are matched
|
|
5460
5515
|
*/
|
|
5461
5516
|
getRenderedShapes(source: string | atlas.source.Source, filter?: Expression, sourceLayer?: string): Array<atlas.data.Feature<atlas.data.Geometry, any> | Shape>;
|
|
5517
|
+
/**
|
|
5518
|
+
* Gets the state of a feature
|
|
5519
|
+
* @param feature the ID of the feature
|
|
5520
|
+
* @param source the ID of the source
|
|
5521
|
+
* @param sourceLayer the ID of the layer
|
|
5522
|
+
*/
|
|
5523
|
+
getFeatureState(feature: string | Shape | atlas.data.Feature<atlas.data.Geometry, any>, source: string | atlas.source.Source, sourceLayer?: string): object;
|
|
5524
|
+
/**
|
|
5525
|
+
* Removes the state or a single key value of the state of a feature.
|
|
5526
|
+
* @param feature the ID of the feature
|
|
5527
|
+
* @param source the ID of the source
|
|
5528
|
+
* @param sourceLayer the ID of the layer
|
|
5529
|
+
* @param key the key in the feature state to update
|
|
5530
|
+
*/
|
|
5531
|
+
removeFeatureState(feature: string | Shape | atlas.data.Feature<atlas.data.Geometry, any>, source: string | atlas.source.Source, sourceLayer?: string, key?: string): void;
|
|
5532
|
+
/**
|
|
5533
|
+
* Sets the state of the feature by passing in a key value pair object.
|
|
5534
|
+
* @param feature the ID of the feature
|
|
5535
|
+
* @param source the ID of the source
|
|
5536
|
+
* @param sourceLayer the ID of the layer
|
|
5537
|
+
* @param key the key in the feature state to update
|
|
5538
|
+
*/
|
|
5539
|
+
setFeatureState(feature: string | Shape | atlas.data.Feature<atlas.data.Geometry, any>, source: string | atlas.source.Source, state: object, sourceLayer?: string): void;
|
|
5462
5540
|
/**
|
|
5463
5541
|
* Removes all sources from the map.
|
|
5464
5542
|
*/
|