azure-maps-control 3.0.0 → 3.0.2
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/ReadMe.md +2 -2
- package/dist/atlas-core-bare-snr-min.js +1 -1
- package/dist/atlas-core-bare-snr.js +42 -26
- package/dist/atlas-core-bare.js +2836 -1484
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +472 -207
- package/dist/atlas-core.js +3266 -1665
- package/dist/atlas-core.min.js +4 -3
- package/dist/atlas-internal.min.js +1 -1
- package/dist/atlas.css +2 -2
- package/dist/atlas.js +3266 -1665
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +4 -3
- package/package.json +12 -16
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +70 -31
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azure-maps-control",
|
|
3
3
|
"author": "Microsoft Corporation",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.2",
|
|
5
5
|
"description": "Map SDK for Azure Maps",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"azure",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@azure/msal-browser": "^2.32.1",
|
|
38
|
-
"@mapbox/mapbox-gl-supported": "^2.0.1"
|
|
38
|
+
"@mapbox/mapbox-gl-supported": "^2.0.1",
|
|
39
|
+
"@maplibre/maplibre-gl-style-spec": "^19.3.0"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
|
@@ -48,13 +49,11 @@
|
|
|
48
49
|
"@turf/intersect": "^6.3.0",
|
|
49
50
|
"@types/jest": "^29.0.0",
|
|
50
51
|
"@types/jwt-decode": "^3.0.0",
|
|
51
|
-
"@types/lodash": "4.14.
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
55
|
-
"@typescript-eslint/parser": "^6.0.0",
|
|
52
|
+
"@types/lodash": "4.14.197",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
54
|
+
"@typescript-eslint/parser": "^6.4.0",
|
|
56
55
|
"atob": "^2.1.2",
|
|
57
|
-
"azuremaps-maplibre-gl": "^3.
|
|
56
|
+
"azuremaps-maplibre-gl": "^3.3.0",
|
|
58
57
|
"canvas": "^2.10.2",
|
|
59
58
|
"es-abstract": "^1.20.1",
|
|
60
59
|
"eslint": "^8.39.0",
|
|
@@ -68,13 +67,13 @@
|
|
|
68
67
|
"jest-environment-jsdom": "^29.6.1",
|
|
69
68
|
"jest-trx-results-processor": "^3.0.1",
|
|
70
69
|
"jwt-decode": "^3.0.0",
|
|
71
|
-
"less": "^4.
|
|
70
|
+
"less": "^4.2.0",
|
|
72
71
|
"less-plugin-clean-css": "^1.5.1",
|
|
73
72
|
"lodash": "4.17.21",
|
|
74
73
|
"node-fetch": "^2.6.8",
|
|
75
74
|
"playwright-trx-reporter": "^1.0.6",
|
|
76
|
-
"puppeteer": "^
|
|
77
|
-
"rollup": "^3.
|
|
75
|
+
"puppeteer": "^21.0.0",
|
|
76
|
+
"rollup": "^3.28.0",
|
|
78
77
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
79
78
|
"rollup-plugin-uglify": "^6.0.4",
|
|
80
79
|
"simplify-ts": "^1.0.2",
|
|
@@ -83,13 +82,10 @@
|
|
|
83
82
|
"typescript": "^5.0.0",
|
|
84
83
|
"utf-8-validate": "^6.0.0",
|
|
85
84
|
"uuid-random": "^1.3.2",
|
|
86
|
-
"yargs": "^17.
|
|
85
|
+
"yargs": "^17.7.2"
|
|
87
86
|
},
|
|
88
87
|
"overrides": {
|
|
89
|
-
"
|
|
90
|
-
"clean-css": "^5.3.1",
|
|
91
|
-
"rollup": "^3.0.0",
|
|
92
|
-
"serialize-javascript": "^6.0.0"
|
|
88
|
+
"rollup": "^3.28.0"
|
|
93
89
|
},
|
|
94
90
|
"license": "SEE LICENSE IN LICENSE.TXT",
|
|
95
91
|
"files": [
|
package/thirdpartynotices.txt
CHANGED
|
Binary file
|
package/typings/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PublicClientApplication } from "@azure/msal-browser";
|
|
2
|
-
import { DataDrivenPropertyValueSpecification, PropertyValueSpecification, ExpressionFilterSpecification
|
|
2
|
+
import { DataDrivenPropertyValueSpecification, PropertyValueSpecification, ExpressionFilterSpecification } from "@maplibre/maplibre-gl-style-spec";
|
|
3
3
|
|
|
4
|
+
type PositionAnchor = "center" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
4
5
|
type Position = atlas.data.Position;
|
|
5
6
|
declare namespace atlas {
|
|
6
7
|
|
|
@@ -221,7 +222,7 @@ declare namespace atlas {
|
|
|
221
222
|
* @param data The FeatureCollection, Feature, Geometry, Shape or array of these objects to calculate the bounding box for.
|
|
222
223
|
* @returns A bounding box in the format [minLon, minLat, maxLon, maxLat].
|
|
223
224
|
*/
|
|
224
|
-
static fromData(data: FeatureCollection | Feature<Geometry, any> | Geometry | Shape | Array<FeatureCollection | Feature<Geometry, any> | Geometry>): BoundingBox;
|
|
225
|
+
static fromData(data: FeatureCollection | Feature<Geometry, any> | Geometry | Shape | Array<FeatureCollection | Feature<Geometry, any> | Geometry | Shape>): BoundingBox;
|
|
225
226
|
/**
|
|
226
227
|
* Splits a BoundingBox that crosses the Antimeridian into two BoundingBox's. One entirely west of the Antimerdian and another entirely east of the Antimerdian.
|
|
227
228
|
* @param bounds
|
|
@@ -626,11 +627,14 @@ declare namespace atlas {
|
|
|
626
627
|
* A control for changing the rotation of the map.
|
|
627
628
|
*/
|
|
628
629
|
export class CompassControl extends ControlBase {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
630
|
+
protected static DefaultRotation: number;
|
|
631
|
+
protected static InvertOrderPositions: ControlPosition[2];
|
|
632
|
+
|
|
633
|
+
protected hasMouse: boolean;
|
|
634
|
+
protected hasFocus: boolean;
|
|
635
|
+
protected lastActiveTime: number;
|
|
636
|
+
protected options: CompassControlOptions;
|
|
637
|
+
|
|
634
638
|
/**
|
|
635
639
|
* Constructs a CompassControl.
|
|
636
640
|
* @param options The options for the control.
|
|
@@ -643,20 +647,33 @@ declare namespace atlas {
|
|
|
643
647
|
* @return An HTMLElement to be placed on the map for the control.
|
|
644
648
|
*/
|
|
645
649
|
onAdd(map: Map, options?: ControlOptions): HTMLElement;
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
650
|
+
|
|
651
|
+
protected constructRotationGrid: (map: Map, options?: ControlOptions) => HTMLElement;
|
|
652
|
+
protected constructRotationButton: (map: Map) => HTMLElement;
|
|
653
|
+
protected constructRightRotationButton: (map: Map) => HTMLElement;
|
|
654
|
+
protected constructLeftRotationButton: (map: Map) => HTMLElement;
|
|
649
655
|
}
|
|
650
656
|
|
|
651
657
|
/**
|
|
652
658
|
* A control for changing the pitch of the map.
|
|
653
659
|
*/
|
|
654
660
|
export class PitchControl extends ControlBase {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
661
|
+
protected static PITCH_DURATION_MS: number;
|
|
662
|
+
protected static DEFAULT_PITCH: number;
|
|
663
|
+
protected static INVERT_ORDER_POSITIONS: ControlPosition[];
|
|
664
|
+
|
|
665
|
+
protected container: HTMLDivElement | null;
|
|
666
|
+
protected map: Map | null;
|
|
667
|
+
protected pitchButton: HTMLButtonElement | null;
|
|
668
|
+
protected pitchIncrementButton: HTMLButtonElement | null;
|
|
669
|
+
protected pitchDecrementButton: HTMLButtonElement | null;
|
|
670
|
+
|
|
671
|
+
protected hasMouse: boolean;
|
|
672
|
+
protected hasFocus: boolean;
|
|
673
|
+
|
|
674
|
+
protected lastActiveTime: number;
|
|
675
|
+
protected options: PitchControlOptions;
|
|
676
|
+
|
|
660
677
|
/**
|
|
661
678
|
* Constructs a PitchControl.
|
|
662
679
|
* @param options The options for the control.
|
|
@@ -669,9 +686,17 @@ declare namespace atlas {
|
|
|
669
686
|
* @return An HTMLElement to be placed on the map for the control.
|
|
670
687
|
*/
|
|
671
688
|
onAdd(map: Map, options?: ControlOptions): HTMLElement;
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
689
|
+
onRemove(): void;
|
|
690
|
+
|
|
691
|
+
protected pitchChanged: (map: MapEvent) => void;
|
|
692
|
+
|
|
693
|
+
protected updatePitchButtonsState: () => void;
|
|
694
|
+
|
|
695
|
+
protected constructPitchGrid: (map: Map, options?: ControlOptions) => void;
|
|
696
|
+
|
|
697
|
+
protected constructPitchButton: (map: Map) => HTMLElement;
|
|
698
|
+
protected constructPitchDecrementButton: (map: Map) => HTMLElement;
|
|
699
|
+
protected constructPitchIncrementButton: (map: Map) => HTMLElement;
|
|
675
700
|
}
|
|
676
701
|
|
|
677
702
|
/**
|
|
@@ -730,8 +755,12 @@ declare namespace atlas {
|
|
|
730
755
|
* A control for changing the zoom of the map.
|
|
731
756
|
*/
|
|
732
757
|
export class ZoomControl extends ControlBase {
|
|
733
|
-
|
|
734
|
-
|
|
758
|
+
protected static ZOOM_DURATION_MS: number;
|
|
759
|
+
protected container: HTMLDivElement | null;
|
|
760
|
+
protected zoomInButton: HTMLButtonElement | null;
|
|
761
|
+
protected zoomOutButton: HTMLButtonElement | null;
|
|
762
|
+
protected map: Map | null;
|
|
763
|
+
protected options: ZoomControlOptions;
|
|
735
764
|
/**
|
|
736
765
|
* Constructs a ZoomControl.
|
|
737
766
|
* @param options The options for the control.
|
|
@@ -743,8 +772,15 @@ declare namespace atlas {
|
|
|
743
772
|
* @return An HTMLElement to be placed on the map for the control.
|
|
744
773
|
*/
|
|
745
774
|
onAdd(map: Map): HTMLElement;
|
|
746
|
-
|
|
747
|
-
|
|
775
|
+
onRemove (): void;
|
|
776
|
+
|
|
777
|
+
protected zoomChanged: (event: MapEvent) => void;
|
|
778
|
+
protected minZoomChanged: (zoom: number) => void;
|
|
779
|
+
protected maxZoomChanged: (zoom: number) => void;
|
|
780
|
+
|
|
781
|
+
protected updateZoomButtonsState(): void;
|
|
782
|
+
protected constructZoomInButton: (map: Map) => HTMLElement;
|
|
783
|
+
protected constructZoomOutButton: (map: Map) => HTMLElement;
|
|
748
784
|
}
|
|
749
785
|
|
|
750
786
|
/**
|
|
@@ -2045,7 +2081,7 @@ declare namespace atlas {
|
|
|
2045
2081
|
*/
|
|
2046
2082
|
getTraffic(): TrafficOptions;
|
|
2047
2083
|
/**
|
|
2048
|
-
* Removes all
|
|
2084
|
+
* Removes all sources, layers, markers, and popups from the map.
|
|
2049
2085
|
* User added images are preserved.
|
|
2050
2086
|
*/
|
|
2051
2087
|
clear(): void;
|
|
@@ -2097,7 +2133,7 @@ declare namespace atlas {
|
|
|
2097
2133
|
* @param elevationSource elevation tile source
|
|
2098
2134
|
* @param exaggeration the elevation exaggeration factor
|
|
2099
2135
|
*/
|
|
2100
|
-
enableElevation(elevationSource: string | ElevationTileSource, exaggeration?: number): void;
|
|
2136
|
+
enableElevation(elevationSource: string | atlas.source.ElevationTileSource, exaggeration?: number): void;
|
|
2101
2137
|
/**
|
|
2102
2138
|
* Disables the 3D terrain mesh.
|
|
2103
2139
|
*/
|
|
@@ -2584,9 +2620,12 @@ declare namespace atlas {
|
|
|
2584
2620
|
keypress: TargetedEvent;
|
|
2585
2621
|
keyup: TargetedEvent;
|
|
2586
2622
|
mousedown: TargetedEvent;
|
|
2587
|
-
|
|
2623
|
+
mouseenter: TargetedEvent;
|
|
2624
|
+
mouseleave: TargetedEvent;
|
|
2588
2625
|
mousemove: TargetedEvent;
|
|
2589
2626
|
mouseout: TargetedEvent;
|
|
2627
|
+
mouseover: TargetedEvent;
|
|
2628
|
+
mouseup: TargetedEvent;
|
|
2590
2629
|
}
|
|
2591
2630
|
|
|
2592
2631
|
/**
|
|
@@ -4056,19 +4095,19 @@ declare namespace atlas {
|
|
|
4056
4095
|
* Minimum number of points necessary to form a cluster if clustering is enabled.
|
|
4057
4096
|
* @default 2
|
|
4058
4097
|
*/
|
|
4059
|
-
clusterMinPoints?: number | undefined
|
|
4098
|
+
clusterMinPoints?: number | undefined;
|
|
4060
4099
|
/**
|
|
4061
4100
|
* Whether to generate ids for the geojson features. When enabled, the feature.id property will be auto assigned based on its index in the features array, over-writing any previous values.
|
|
4062
4101
|
*/
|
|
4063
|
-
generateId?: boolean | undefined
|
|
4102
|
+
generateId?: boolean | undefined;
|
|
4064
4103
|
/**
|
|
4065
4104
|
* A property to use as a feature id (for feature state). Either a property name, or an object of the form {<sourceLayer>: <propertyName>}.
|
|
4066
4105
|
*/
|
|
4067
|
-
promoteId?: { [key: string]: string } | string | undefined
|
|
4106
|
+
promoteId?: { [key: string]: string } | string | undefined;
|
|
4068
4107
|
/**
|
|
4069
4108
|
* An expression for filtering features prior to processing them for rendering.
|
|
4070
4109
|
*/
|
|
4071
|
-
filter?: any
|
|
4110
|
+
filter?: any;
|
|
4072
4111
|
}
|
|
4073
4112
|
|
|
4074
4113
|
/**
|
|
@@ -4709,7 +4748,7 @@ declare namespace atlas {
|
|
|
4709
4748
|
/**
|
|
4710
4749
|
* Disable telemetry collection
|
|
4711
4750
|
* This option may only be set when initializing the map.
|
|
4712
|
-
* default: false
|
|
4751
|
+
* default: false (true for the Azure Government cloud)
|
|
4713
4752
|
* @default false
|
|
4714
4753
|
*/
|
|
4715
4754
|
disableTelemetry?: boolean;
|
|
@@ -5445,7 +5484,7 @@ declare namespace atlas {
|
|
|
5445
5484
|
*/
|
|
5446
5485
|
add(layer: atlas.layer.Layer | atlas.layer.Layer[], before?: string | atlas.layer.Layer): void;
|
|
5447
5486
|
/**
|
|
5448
|
-
* Removes all
|
|
5487
|
+
* Removes all layers from the map.
|
|
5449
5488
|
*/
|
|
5450
5489
|
clear(): void;
|
|
5451
5490
|
/**
|