azure-maps-control 3.0.3 → 3.1.1
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-min.js +1 -1
- package/dist/atlas-core-bare-snr.js +179 -189
- package/dist/atlas-core-bare.js +348 -302
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +179 -189
- package/dist/atlas-core.js +348 -302
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas-esm.js +2455 -993
- package/dist/atlas-esm.min.js +4 -4
- package/dist/atlas.js +2455 -993
- package/dist/atlas.min.js +3 -3
- package/package.json +12 -12
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +77 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azure-maps-control",
|
|
3
3
|
"author": "Microsoft Corporation",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1.1",
|
|
5
5
|
"description": "Map SDK for Azure Maps",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"azure",
|
|
@@ -40,31 +40,31 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
|
43
|
-
"@microsoft/applicationinsights-web": "^3.0.
|
|
44
|
-
"@playwright/test": "^1.
|
|
45
|
-
"@rollup/plugin-commonjs": "^25.0.
|
|
43
|
+
"@microsoft/applicationinsights-web": "^3.0.7",
|
|
44
|
+
"@playwright/test": "^1.40.0",
|
|
45
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
46
46
|
"@rollup/plugin-json": "^6.0.0",
|
|
47
47
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
48
|
-
"@testing-library/dom": "^9.3.
|
|
48
|
+
"@testing-library/dom": "^9.3.1",
|
|
49
49
|
"@turf/intersect": "^6.3.0",
|
|
50
|
-
"@types/jest": "^29.
|
|
50
|
+
"@types/jest": "^29.5.3",
|
|
51
51
|
"@types/jwt-decode": "^3.0.0",
|
|
52
|
-
"@types/lodash": "4.14.
|
|
52
|
+
"@types/lodash": "4.14.202",
|
|
53
53
|
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
54
54
|
"@typescript-eslint/parser": "^6.4.0",
|
|
55
55
|
"atob": "^2.1.2",
|
|
56
56
|
"azuremaps-maplibre-gl": "^3.6.1",
|
|
57
57
|
"canvas": "^2.10.2",
|
|
58
|
-
"es-abstract": "^1.
|
|
59
|
-
"eslint": "^8.
|
|
58
|
+
"es-abstract": "^1.22.1",
|
|
59
|
+
"eslint": "^8.55.0",
|
|
60
60
|
"eslint-plugin-security": "^1.5.0",
|
|
61
61
|
"estree-walker": "^3.0.0",
|
|
62
62
|
"fs-extra": "^11.0.0",
|
|
63
63
|
"gl": "^6.0.1",
|
|
64
64
|
"glob": "^10.0.0",
|
|
65
65
|
"grunt": "^1.6.1",
|
|
66
|
-
"jest": "^29.
|
|
67
|
-
"jest-environment-jsdom": "^29.
|
|
66
|
+
"jest": "^29.7.0",
|
|
67
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
68
68
|
"jest-trx-results-processor": "^3.0.1",
|
|
69
69
|
"jwt-decode": "^3.0.0",
|
|
70
70
|
"less": "^4.2.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"yargs": "^17.7.2"
|
|
86
86
|
},
|
|
87
87
|
"overrides": {
|
|
88
|
-
"@babel/core": "7.23.
|
|
88
|
+
"@babel/core": "7.23.3",
|
|
89
89
|
"rollup": "^3.28.0"
|
|
90
90
|
},
|
|
91
91
|
"license": "SEE LICENSE IN LICENSE.TXT",
|
package/thirdpartynotices.txt
CHANGED
|
Binary file
|
package/typings/index.d.ts
CHANGED
|
@@ -699,6 +699,38 @@ declare namespace atlas {
|
|
|
699
699
|
protected constructPitchIncrementButton: (map: Map) => HTMLElement;
|
|
700
700
|
}
|
|
701
701
|
|
|
702
|
+
/**
|
|
703
|
+
* A control to display a scale bar on the map.
|
|
704
|
+
*/
|
|
705
|
+
export class ScaleControl extends ControlBase {
|
|
706
|
+
private map: Map | null;
|
|
707
|
+
private control;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Constructs a ScaleControl.
|
|
711
|
+
* @param options The options for the control.
|
|
712
|
+
*/
|
|
713
|
+
constructor(options?: ScaleControlOptions);
|
|
714
|
+
/**
|
|
715
|
+
* Initialization method for the control which is called when added to the map.
|
|
716
|
+
* @param map The map that the control will be added to.
|
|
717
|
+
* @param options The ControlOptions for this control.
|
|
718
|
+
* @return An HTMLElement to be placed on the map for the control.
|
|
719
|
+
*/
|
|
720
|
+
onAdd(map: Map, options?: ControlOptions): HTMLElement;
|
|
721
|
+
/**
|
|
722
|
+
* Method that is called when the control is removed from the map. Should perform any necessary cleanup for the
|
|
723
|
+
* control.
|
|
724
|
+
*/
|
|
725
|
+
onRemove(): void;
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Set the scale's unit of the distance
|
|
729
|
+
* @param unit - Unit of the distance (`'imperial'`, `'metric'` or `'nautical'`).
|
|
730
|
+
*/
|
|
731
|
+
setUnit(unit: "imperial" | "metric" | "nautical"): void;
|
|
732
|
+
}
|
|
733
|
+
|
|
702
734
|
/**
|
|
703
735
|
* A control for changing the style of the map.
|
|
704
736
|
*/
|
|
@@ -1127,6 +1159,8 @@ declare namespace atlas {
|
|
|
1127
1159
|
|
|
1128
1160
|
/**
|
|
1129
1161
|
* Sets the options of the polygon layer.
|
|
1162
|
+
* When `fillPattern` is set, `fillColor` will be ignored.
|
|
1163
|
+
* To set `fillColor`, make sure `fillPattern` is set to `undefined`.
|
|
1130
1164
|
* @param newOptions The new options of the polygon layer.
|
|
1131
1165
|
*/
|
|
1132
1166
|
setOptions(options: PolygonLayerOptions): void;
|
|
@@ -3772,6 +3806,24 @@ declare namespace atlas {
|
|
|
3772
3806
|
inverted?: boolean;
|
|
3773
3807
|
}
|
|
3774
3808
|
|
|
3809
|
+
/**
|
|
3810
|
+
* The options for a ScaleControl object.
|
|
3811
|
+
*/
|
|
3812
|
+
export interface ScaleControlOptions extends Options {
|
|
3813
|
+
/**
|
|
3814
|
+
* The maximum length of the scale control in pixels.
|
|
3815
|
+
* Default `100`.
|
|
3816
|
+
* @default 100
|
|
3817
|
+
*/
|
|
3818
|
+
maxWidth?: number;
|
|
3819
|
+
/**
|
|
3820
|
+
* Unit of the distance (`'imperial'`, `'metric'` or `'nautical'`).
|
|
3821
|
+
* Default `'metric'`.
|
|
3822
|
+
* @default 'metric'
|
|
3823
|
+
*/
|
|
3824
|
+
unit?: "imperial" | "metric" | "nautical";
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3775
3827
|
/**
|
|
3776
3828
|
* The options for a StyleControl object.
|
|
3777
3829
|
*/
|
|
@@ -4779,10 +4831,10 @@ declare namespace atlas {
|
|
|
4779
4831
|
*/
|
|
4780
4832
|
enableAccessibility?: boolean;
|
|
4781
4833
|
/**
|
|
4782
|
-
* Enable fallback to geocoder for
|
|
4834
|
+
* Enable the fallback to the REST API geocoder for detecting location accessibility if extracting location from vector data fails.
|
|
4835
|
+
* Disabling this option will prevent the generation of geocode API requests but may lead to a lack of location information for screen readers.
|
|
4783
4836
|
* default: true
|
|
4784
4837
|
* @default true
|
|
4785
|
-
* @internal
|
|
4786
4838
|
*/
|
|
4787
4839
|
enableAccessibilityLocationFallback?: boolean;
|
|
4788
4840
|
/**
|
|
@@ -5575,6 +5627,29 @@ declare namespace atlas {
|
|
|
5575
5627
|
* @param sourceLayer the layer where shapes and features are matched
|
|
5576
5628
|
*/
|
|
5577
5629
|
getRenderedShapes(source: string | atlas.source.Source, filter?: Expression, sourceLayer?: string): Array<atlas.data.Feature<atlas.data.Geometry, any> | Shape>;
|
|
5630
|
+
/**
|
|
5631
|
+
* Gets the state of a feature
|
|
5632
|
+
* @param feature the ID of the feature
|
|
5633
|
+
* @param source the ID of the source
|
|
5634
|
+
* @param sourceLayer the ID of the layer
|
|
5635
|
+
*/
|
|
5636
|
+
getFeatureState(feature: string | Shape | atlas.data.Feature<atlas.data.Geometry, any>, source: string | atlas.source.Source, sourceLayer?: string): object;
|
|
5637
|
+
/**
|
|
5638
|
+
* Removes the state or a single key value of the state of a feature.
|
|
5639
|
+
* @param feature the ID of the feature
|
|
5640
|
+
* @param source the ID of the source
|
|
5641
|
+
* @param sourceLayer the ID of the layer
|
|
5642
|
+
* @param key the key in the feature state to update
|
|
5643
|
+
*/
|
|
5644
|
+
removeFeatureState(feature: string | Shape | atlas.data.Feature<atlas.data.Geometry, any>, source: string | atlas.source.Source, sourceLayer?: string, key?: string): void;
|
|
5645
|
+
/**
|
|
5646
|
+
* Sets the state of the feature by passing in a key value pair object.
|
|
5647
|
+
* @param feature the ID of the feature
|
|
5648
|
+
* @param source the ID of the source
|
|
5649
|
+
* @param sourceLayer the ID of the layer
|
|
5650
|
+
* @param key the key in the feature state to update
|
|
5651
|
+
*/
|
|
5652
|
+
setFeatureState(feature: string | Shape | atlas.data.Feature<atlas.data.Geometry, any>, source: string | atlas.source.Source, state: object, sourceLayer?: string): void;
|
|
5578
5653
|
/**
|
|
5579
5654
|
* Removes all sources from the map.
|
|
5580
5655
|
*/
|