azure-maps-control 2.1.3 → 2.1.8
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.js +498 -171
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.css +184 -21
- package/dist/atlas.js +498 -171
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +97 -78
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +55 -4
package/package.json
CHANGED
|
@@ -1,78 +1,97 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "azure-maps-control",
|
|
3
|
-
"author": "Microsoft Corporation",
|
|
4
|
-
"version": "2.1.
|
|
5
|
-
"description": "Map SDK for Azure Maps",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"azure",
|
|
8
|
-
"maps",
|
|
9
|
-
"ui",
|
|
10
|
-
"map",
|
|
11
|
-
"control",
|
|
12
|
-
"lbs",
|
|
13
|
-
"microsoft"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "node ./bin/build.js",
|
|
17
|
-
"docs": "(if exist \"./docs/\" rmdir \"./docs/\" /S /Q) && tsc --declaration --declarationDir ./docs --emitDeclarationOnly --stripInternal",
|
|
18
|
-
"lessc": "node_modules/.bin/lessc",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"@types/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "azure-maps-control",
|
|
3
|
+
"author": "Microsoft Corporation",
|
|
4
|
+
"version": "2.1.8",
|
|
5
|
+
"description": "Map SDK for Azure Maps",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"azure",
|
|
8
|
+
"maps",
|
|
9
|
+
"ui",
|
|
10
|
+
"map",
|
|
11
|
+
"control",
|
|
12
|
+
"lbs",
|
|
13
|
+
"microsoft"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "node ./bin/build.js",
|
|
17
|
+
"docs": "(if exist \"./docs/\" rmdir \"./docs/\" /S /Q) && tsc --declaration --declarationDir ./docs --emitDeclarationOnly --stripInternal",
|
|
18
|
+
"lessc": "node_modules/.bin/lessc",
|
|
19
|
+
"pretest": "npm run updatePackageVersionForTests -- --isPreTest true",
|
|
20
|
+
"posttest": "npm run updatePackageVersionForTests -- --isPreTest false",
|
|
21
|
+
"test": "set \"TS_NODE_PROJECT=./test/tsconfig.json\" && mocha --reporter cypress-multi-reporters --reporter-options configFile=mochaReporters.json --parallel --exit --timeout 30000 --require ts-node/register test/**/*.ts",
|
|
22
|
+
"coverage": "nyc --reporter cobertura --reporter text -t coverage npm run test",
|
|
23
|
+
"pretest-filter": "npm run updatePackageVersionForTests -- --isPreTest true",
|
|
24
|
+
"posttest-filter": "npm run updatePackageVersionForTests -- --isPreTest false",
|
|
25
|
+
"test-filter": "set \"TS_NODE_PROJECT=./test/tsconfig.json\" && mocha --parallel --exit --timeout 30000 --require ts-node/register",
|
|
26
|
+
"thirdPartyNotices": "node ./bin/thirdPartyNotices.js",
|
|
27
|
+
"tslint": "node_modules/.bin/tslint --project ./tsconfig.json",
|
|
28
|
+
"updateEnvVariables": "node ./bin/updateEnvVariables.js",
|
|
29
|
+
"updateExampleKeys": "node ./bin/updateExampleKeys.js",
|
|
30
|
+
"updateTestSecrets": "node ./bin/updateTestSecrets.js",
|
|
31
|
+
"updatePackageVersionForTests": "node ./bin/updatePackageVersionForTests.js"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@types/adal-angular": "^1.0.1"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@mapbox/mapbox-gl-rtl-text": "^0.2.3",
|
|
38
|
+
"@microsoft/applicationinsights-web": "^2.5.9",
|
|
39
|
+
"@turf/intersect": "^6.3.0",
|
|
40
|
+
"@types/jwt-decode": "^2.2.0",
|
|
41
|
+
"@types/lodash": "4.14.136",
|
|
42
|
+
"@types/mapbox-gl": "^1.13.0",
|
|
43
|
+
"@types/mocha": "^5.2.7",
|
|
44
|
+
"@types/puppeteer": "^1.20.7",
|
|
45
|
+
"adal-angular": "^1.0.18",
|
|
46
|
+
"atob": "^2.1.2",
|
|
47
|
+
"azuremaps-maplibre-gl": "^1.14.0-rc4",
|
|
48
|
+
"cypress-multi-reporters": "^1.5.0",
|
|
49
|
+
"es-abstract": "^1.17.1",
|
|
50
|
+
"estree-walker": "^1.0.1",
|
|
51
|
+
"fs-extra": "^8.1.0",
|
|
52
|
+
"glob": "^7.1.6",
|
|
53
|
+
"grunt": "^1.3.0",
|
|
54
|
+
"jwt-decode": "^2.2.0",
|
|
55
|
+
"less": "^3.12.2",
|
|
56
|
+
"less-plugin-clean-css": "^1.5.1",
|
|
57
|
+
"lodash": "4.17.15",
|
|
58
|
+
"mocha": "^9.0.3",
|
|
59
|
+
"mocha-trx-reporter": "^3.3.1",
|
|
60
|
+
"node-fetch": "^2.6.1",
|
|
61
|
+
"nyc": "^15.1.0",
|
|
62
|
+
"puppeteer": "^10.2.0",
|
|
63
|
+
"rollup": "^1.32.1",
|
|
64
|
+
"rollup-plugin-commonjs": "^10.1.0",
|
|
65
|
+
"rollup-plugin-json": "^4.0.0",
|
|
66
|
+
"rollup-plugin-node-resolve": "^5.2.0",
|
|
67
|
+
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
68
|
+
"rollup-plugin-uglify": "^6.0.4",
|
|
69
|
+
"simplify-ts": "^1.0.2",
|
|
70
|
+
"ts-node": "^8.10.2",
|
|
71
|
+
"tslint": "^5.20.1",
|
|
72
|
+
"tslint-microsoft-contrib": "^6.2.0",
|
|
73
|
+
"typescript": "^3.7.2",
|
|
74
|
+
"utf-8-validate": "^5.0.2",
|
|
75
|
+
"uuid-random": "^1.3.2",
|
|
76
|
+
"yargs": "^13.3.2"
|
|
77
|
+
},
|
|
78
|
+
"license": "SEE LICENSE IN LICENSE.TXT",
|
|
79
|
+
"files": [
|
|
80
|
+
"typings/**/*",
|
|
81
|
+
"dist/**/*",
|
|
82
|
+
"thirdpartynotices.txt"
|
|
83
|
+
],
|
|
84
|
+
"types": "./typings/index.d.ts",
|
|
85
|
+
"main": "./dist/atlas.min.js",
|
|
86
|
+
"nyc": {
|
|
87
|
+
"all": true,
|
|
88
|
+
"exclude": [
|
|
89
|
+
"bin",
|
|
90
|
+
"dist",
|
|
91
|
+
"test",
|
|
92
|
+
"examples"
|
|
93
|
+
],
|
|
94
|
+
"check-coverage": false,
|
|
95
|
+
"exclude-after-remap": false
|
|
96
|
+
}
|
|
97
|
+
}
|
package/thirdpartynotices.txt
CHANGED
|
Binary file
|
package/typings/index.d.ts
CHANGED
|
@@ -638,12 +638,12 @@ declare namespace atlas {
|
|
|
638
638
|
* Set style in a disabled state
|
|
639
639
|
* @param styleName Style to be disabled
|
|
640
640
|
*/
|
|
641
|
-
disableStyle(styleName: string);
|
|
641
|
+
disableStyle(styleName: string): void;
|
|
642
642
|
/**
|
|
643
643
|
* Enabled style that was previously disabled
|
|
644
644
|
* @param styleName Style to be disabled
|
|
645
645
|
*/
|
|
646
|
-
enableStyle(styleName: string);
|
|
646
|
+
enableStyle(styleName: string): void;
|
|
647
647
|
private buildSelectStyleBtn;
|
|
648
648
|
private buildCurrStyleBtn;
|
|
649
649
|
private buildStyleOpsGrid;
|
|
@@ -681,12 +681,28 @@ declare namespace atlas {
|
|
|
681
681
|
private hasMouse;
|
|
682
682
|
private hasFocus;
|
|
683
683
|
private options;
|
|
684
|
+
private initIsActive;
|
|
685
|
+
private style;
|
|
686
|
+
private container;
|
|
687
|
+
private trafficButton;
|
|
688
|
+
private map;
|
|
689
|
+
|
|
684
690
|
/**
|
|
685
691
|
* Constructs a TrafficControl
|
|
686
692
|
* @param options The options for the control.
|
|
687
693
|
*/
|
|
688
694
|
constructor(options?: TrafficControlOptions);
|
|
689
695
|
|
|
696
|
+
/**
|
|
697
|
+
* Current control state (is traffic information displayed?)
|
|
698
|
+
*/
|
|
699
|
+
get isActive(): boolean;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Sets the control state
|
|
703
|
+
*/
|
|
704
|
+
set isActive(newValue: boolean);
|
|
705
|
+
|
|
690
706
|
/**
|
|
691
707
|
* Initialization method for the control which is called when added to the map.
|
|
692
708
|
* @param map The map that the control will be added to.
|
|
@@ -695,6 +711,17 @@ declare namespace atlas {
|
|
|
695
711
|
*/
|
|
696
712
|
onAdd(map: Map): HTMLElement;
|
|
697
713
|
|
|
714
|
+
/**
|
|
715
|
+
* Method that is called when the control is removed from the map. Should perform any necessary cleanup for the
|
|
716
|
+
* control.
|
|
717
|
+
*/
|
|
718
|
+
onRemove(): void;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* Updates the button state according to current traffic state
|
|
722
|
+
*/
|
|
723
|
+
updateButtonState(): void;
|
|
724
|
+
|
|
698
725
|
/**
|
|
699
726
|
* Get the TrafficControlOptions
|
|
700
727
|
*/
|
|
@@ -1466,9 +1493,16 @@ declare namespace atlas {
|
|
|
1466
1493
|
* Takes an array of positions objects and fills in the space between them with accurately positioned positions to form an approximated Geodesic path.
|
|
1467
1494
|
* @param path Array of position objects that form a path to fill in.
|
|
1468
1495
|
* @param nodeSize Number of nodes to insert between each position. Default: 15
|
|
1469
|
-
* @returns An array of position objects that form a geodesic paths.
|
|
1496
|
+
* @returns An array of position objects that form a geodesic paths, geodesic path crossing antimeridian will contain longitude outside of -180 to 180 range. See getGeodesicPaths() when this is undesired.
|
|
1470
1497
|
*/
|
|
1471
1498
|
export function getGeodesicPath(path: atlas.data.LineString | atlas.data.Position[], nodeSize?: number): atlas.data.Position[];
|
|
1499
|
+
/**
|
|
1500
|
+
* Takes an array of positions objects and fills in the space between them with accurately positioned positions to form an approximated Geodesic path broken by antimeridian into multiple sub-paths.
|
|
1501
|
+
* @param path Array of position objects that form a path to fill in.
|
|
1502
|
+
* @param nodeSize Number of nodes to insert between each position. Default: 15
|
|
1503
|
+
* @returns An array of paths that form geodesic paths, Comparing to getGeodesicPath, sub-paths will always contain longitude in -180 to 180 range
|
|
1504
|
+
*/
|
|
1505
|
+
export function getGeodesicPaths(path: atlas.data.LineString | atlas.data.Position[], nodeSize?: number): atlas.data.Position[][]
|
|
1472
1506
|
/**
|
|
1473
1507
|
* Calculates the heading from one position object to another.
|
|
1474
1508
|
* @param origin Point of origin.
|
|
@@ -4327,6 +4361,23 @@ declare namespace atlas {
|
|
|
4327
4361
|
* @default true
|
|
4328
4362
|
*/
|
|
4329
4363
|
enableAccessibility?: boolean;
|
|
4364
|
+
/**
|
|
4365
|
+
* Controls the duration of the fade-in/fade-out animation for label collisions, in milliseconds.
|
|
4366
|
+
* This setting affects all symbol layers.
|
|
4367
|
+
* This setting does not affect the duration of runtime styling transitions or raster tile cross-fading.
|
|
4368
|
+
* @default 300
|
|
4369
|
+
*/
|
|
4370
|
+
fadeDuration?: number;
|
|
4371
|
+
/**
|
|
4372
|
+
* Defines a CSS font-family for locally overriding generation of glyphs in the
|
|
4373
|
+
* 'CJK Unified Ideographs', 'Hiragana', 'Katakana' and 'Hangul Syllables' ranges.
|
|
4374
|
+
* In these ranges, font settings from the map's style will be ignored,
|
|
4375
|
+
* except for font-weight keywords (light/regular/medium/bold). Set to false,
|
|
4376
|
+
* to enable font settings from the map's style for these glyph ranges.
|
|
4377
|
+
* The purpose of this option is to avoid bandwidth-intensive glyph server requests.
|
|
4378
|
+
* @default 'sans-serif'
|
|
4379
|
+
*/
|
|
4380
|
+
localIdeographFontFamily?: string;
|
|
4330
4381
|
/**
|
|
4331
4382
|
* Maximum number of images (raster tiles, sprites, icons) to load in parallel,
|
|
4332
4383
|
* which affects performance in raster-heavy maps. 16 by default.
|
|
@@ -4406,7 +4457,7 @@ declare namespace atlas {
|
|
|
4406
4457
|
/**
|
|
4407
4458
|
* Returns the access token with an audience URI of https://atlas.microsoft.com.
|
|
4408
4459
|
*/
|
|
4409
|
-
getToken(): string;
|
|
4460
|
+
getToken(): string | null;
|
|
4410
4461
|
/**
|
|
4411
4462
|
* Adds the necessary authentication query parameters or headers to a RequestParameters.
|
|
4412
4463
|
* Returns the updated RequestParameters.
|