azure-maps-control 3.3.0 → 3.5.0

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": "3.3.0",
4
+ "version": "3.5.0",
5
5
  "description": "Map SDK for Azure Maps",
6
6
  "keywords": [
7
7
  "azure",
@@ -36,20 +36,21 @@
36
36
  "dependencies": {
37
37
  "@azure/msal-browser": "^2.32.1",
38
38
  "@mapbox/mapbox-gl-supported": "^2.0.1",
39
- "@maplibre/maplibre-gl-style-spec": "^20.0.0"
39
+ "@maplibre/maplibre-gl-style-spec": "^20.0.0",
40
+ "@types/geojson": "^7946.0.14"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@mapbox/mapbox-gl-rtl-text": "^0.2.3",
43
- "@microsoft/applicationinsights-web": "^3.1.1",
44
+ "@microsoft/applicationinsights-web": "^3.3.0",
44
45
  "@playwright/test": "^1.42.1",
45
- "@rollup/plugin-commonjs": "^25.0.4",
46
+ "@rollup/plugin-commonjs": "^25.0.7",
46
47
  "@rollup/plugin-json": "^6.0.0",
47
48
  "@rollup/plugin-node-resolve": "^15.1.0",
48
49
  "@testing-library/dom": "^9.3.3",
49
50
  "@turf/intersect": "^6.3.0",
50
51
  "@types/jest": "^29.5.3",
51
52
  "@types/jwt-decode": "^3.0.0",
52
- "@types/lodash": "4.17.0",
53
+ "@types/lodash": "4.17.12",
53
54
  "@typescript-eslint/eslint-plugin": "^6.4.0",
54
55
  "@typescript-eslint/parser": "^6.4.0",
55
56
  "atob": "^2.1.2",
@@ -68,7 +69,7 @@
68
69
  "jest-trx-results-processor": "^3.0.1",
69
70
  "jwt-decode": "^3.0.0",
70
71
  "less": "^4.2.0",
71
- "less-plugin-clean-css": "^1.5.1",
72
+ "less-plugin-clean-css": "^1.6.0",
72
73
  "lodash": "4.17.21",
73
74
  "node-fetch": "^2.6.8",
74
75
  "playwright-trx-reporter": "^1.0.6",
@@ -77,15 +78,15 @@
77
78
  "rollup-plugin-sourcemaps": "^0.6.3",
78
79
  "rollup-plugin-uglify": "^6.0.4",
79
80
  "simplify-ts": "^1.0.2",
80
- "ts-jest": "^29.1.1",
81
+ "ts-jest": "^29.2.2",
81
82
  "ts-node": "^10.0.0",
82
83
  "typescript": "^5.0.0",
83
- "utf-8-validate": "^6.0.0",
84
+ "utf-8-validate": "^6.0.3",
84
85
  "uuid-random": "^1.3.2",
85
86
  "yargs": "^17.7.2"
86
87
  },
87
88
  "overrides": {
88
- "@babel/core": "7.24.4",
89
+ "@babel/core": "7.25.8",
89
90
  "rollup": "^3.28.0"
90
91
  },
91
92
  "license": "SEE LICENSE.TXT",
Binary file
@@ -889,6 +889,47 @@ declare namespace atlas {
889
889
  onAdd (map: Map): HTMLElement;
890
890
  private buildTrafficLegendDiv;
891
891
  }
892
+
893
+ /**
894
+ * A control to make the map or a specified element fullscreen.
895
+ */
896
+ export class FullscreenControl extends ControlBase {
897
+ private map: Map | null;
898
+ private options: FullscreenControlOptions;
899
+ private control;
900
+ private isFullscreenState: boolean;
901
+
902
+ /**
903
+ * A control to make the map or a specified element fullscreen.
904
+ * @param options Options for defining how the control is rendered and the container to be made fullscreen.
905
+ */
906
+ constructor(options?: FullscreenControlOptions);
907
+
908
+ /**
909
+ * Initialization method for the control which is called when added to the map.
910
+ * @param map The map that the control will be added to.
911
+ * @param options The ControlOptions for this control.
912
+ * @return An HTMLElement to be placed on the map for the control.
913
+ */
914
+ onAdd(map: Map): HTMLElement;
915
+
916
+ /**
917
+ * Method that is called when the control is removed from the map. Should perform any necessary cleanup for the control.
918
+ */
919
+ onRemove(): void;
920
+
921
+ /**
922
+ * Gets the current fullscreen state of the map.
923
+ * @returns A boolean indicating if the container is in fullscreen mode.
924
+ */
925
+ isFullscreen(): boolean;
926
+
927
+ /**
928
+ * Checks to see if the browser supports going into fullscreen mode.
929
+ * @returns A boolean indicating if the browser supports fullscreen mode.
930
+ */
931
+ static isSupported(): boolean;
932
+ }
892
933
  }
893
934
 
894
935
  //internal classes
@@ -2910,6 +2951,18 @@ declare namespace atlas {
2910
2951
  * in your application.
2911
2952
  */
2912
2953
  export function clearPrewarmedResources (): void;
2954
+ /**
2955
+ * Adds a custom load resource function that will be called when using a URL that starts with a custom url schema.
2956
+ * @param customProtocol - the protocol to hook, for example 'custom'
2957
+ * @param loadFn - the function to use when trying to fetch a tile specified by the customProtocol
2958
+ */
2959
+ export function addProtocol (customProtocol: string, loadFn: (...args: any[]) => Promise<any>): void;
2960
+
2961
+ /**
2962
+ * Removes a previously added protocol in the main thread.
2963
+ * @param customProtocol - the custom protocol to remove registration for
2964
+ */
2965
+ export function removeProtocol (customProtocol: string): void;
2913
2966
  /**
2914
2967
  * Options used when rendering Point objects in a BubbleLayer.
2915
2968
  */
@@ -3385,7 +3438,7 @@ declare namespace atlas {
3385
3438
  * Name of image in sprite to use for drawing image fills.
3386
3439
  * For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
3387
3440
  */
3388
- fillPattern?: string;
3441
+ fillPattern?: string | DataDrivenPropertyValueSpecification<string>;
3389
3442
  /**
3390
3443
  * The polygons' pixel offset.
3391
3444
  * Values are [x, y] where negatives indicate left and up, respectively.
@@ -3926,6 +3979,31 @@ declare namespace atlas {
3926
3979
  style?: ControlStyle;
3927
3980
  }
3928
3981
 
3982
+ /**
3983
+ * The options for a FullscreenControl object.
3984
+ */
3985
+ export interface FullscreenControlOptions extends Options {
3986
+ /**
3987
+ * The style of the control.
3988
+ * Default `ControlStyle.light`
3989
+ * @default ControlStyle.light
3990
+ */
3991
+ style?: ControlStyle;
3992
+
3993
+ /**
3994
+ * Indicates if the control should be hidden if the browser does not support fullscreen mode.
3995
+ * Default `false`
3996
+ * @default false
3997
+ */
3998
+ hideIfUnsupported?: boolean;
3999
+
4000
+ /**
4001
+ * The HTML element which should be made full screen.
4002
+ * If not specified, the map container element will be used.
4003
+ */
4004
+ container?: HTMLElement;
4005
+ }
4006
+
3929
4007
  /**
3930
4008
  * The options for animating changes to the map control's camera.
3931
4009
  */