azure-maps-control 3.4.0 → 3.6.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/dist/atlas-core-bare-snr-min.js +1 -1
- package/dist/atlas-core-bare-snr.js +260 -65
- package/dist/atlas-core-bare.js +260 -65
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +260 -65
- package/dist/atlas-core.js +260 -65
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas-esm.js +260 -65
- package/dist/atlas-esm.min.js +1 -1
- package/dist/atlas.css +23 -3
- package/dist/atlas.js +260 -65
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +8 -8
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +123 -4
package/dist/atlas-esm.js
CHANGED
|
@@ -51649,7 +51649,7 @@ var Options = /** @class */ (function () {
|
|
|
51649
51649
|
return Options;
|
|
51650
51650
|
}());
|
|
51651
51651
|
|
|
51652
|
-
var __extends$
|
|
51652
|
+
var __extends$1n = (window && window.__extends) || (function () {
|
|
51653
51653
|
var extendStatics = function (d, b) {
|
|
51654
51654
|
extendStatics = Object.setPrototypeOf ||
|
|
51655
51655
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -51684,7 +51684,7 @@ var __read$h = (window && window.__read) || function (o, n) {
|
|
|
51684
51684
|
* @private
|
|
51685
51685
|
*/
|
|
51686
51686
|
var UrlOptions = /** @class */ (function (_super) {
|
|
51687
|
-
__extends$
|
|
51687
|
+
__extends$1n(UrlOptions, _super);
|
|
51688
51688
|
function UrlOptions() {
|
|
51689
51689
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
51690
51690
|
_this.domain = undefined;
|
|
@@ -52088,6 +52088,10 @@ var Localizer = /** @class */ (function () {
|
|
|
52088
52088
|
* @param locale The requested culture code.
|
|
52089
52089
|
*/
|
|
52090
52090
|
Localizer.getCode = function (locale) {
|
|
52091
|
+
// If locale is set to 'auto', use the browser's configured language.
|
|
52092
|
+
if (locale.localeCompare("auto", undefined, { sensitivity: "base" }) === 0) {
|
|
52093
|
+
locale = navigator.language;
|
|
52094
|
+
}
|
|
52091
52095
|
var code = CultureCode.parse(locale);
|
|
52092
52096
|
// If the requested culture code includes a sensitive region simply return the original code.
|
|
52093
52097
|
// This is to hopefully reduce the risk or providing bad content to users in a sensitive region.
|
|
@@ -52211,7 +52215,7 @@ var UserAgent = /** @class */ (function () {
|
|
|
52211
52215
|
return UserAgent;
|
|
52212
52216
|
}());
|
|
52213
52217
|
|
|
52214
|
-
var version$3 = "3.
|
|
52218
|
+
var version$3 = "3.6.0";
|
|
52215
52219
|
|
|
52216
52220
|
/**
|
|
52217
52221
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -52243,7 +52247,7 @@ var Version$1 = /** @class */ (function () {
|
|
|
52243
52247
|
return Version;
|
|
52244
52248
|
}());
|
|
52245
52249
|
|
|
52246
|
-
var __extends$
|
|
52250
|
+
var __extends$1m = (window && window.__extends) || (function () {
|
|
52247
52251
|
var extendStatics = function (d, b) {
|
|
52248
52252
|
extendStatics = Object.setPrototypeOf ||
|
|
52249
52253
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -52317,7 +52321,7 @@ var AuthenticationType;
|
|
|
52317
52321
|
* Options for specifying how the map control should authenticate with the Azure Maps services.
|
|
52318
52322
|
*/
|
|
52319
52323
|
var AuthenticationOptions = /** @class */ (function (_super) {
|
|
52320
|
-
__extends$
|
|
52324
|
+
__extends$1m(AuthenticationOptions, _super);
|
|
52321
52325
|
function AuthenticationOptions() {
|
|
52322
52326
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
52323
52327
|
/**
|
|
@@ -52825,10 +52829,9 @@ function setMaxParallelImageRequests(maxParallelImageRequests) {
|
|
|
52825
52829
|
* language is explicitly specified when using those parts of the API.
|
|
52826
52830
|
* If a Map is initialized with the language explicitly defined and
|
|
52827
52831
|
* setLanguage hasn't previously been called it will automatically be called by the Map constructor.
|
|
52828
|
-
* @param language The new default language.
|
|
52832
|
+
* @param language The new default language. If set to "auto", the browser's configured language will be used.
|
|
52829
52833
|
*/
|
|
52830
52834
|
function setLanguage(language) {
|
|
52831
|
-
// Find the best fit supported language.
|
|
52832
52835
|
defaultLanguage = Localizer.getCode(language);
|
|
52833
52836
|
hasSetLanguage = true;
|
|
52834
52837
|
}
|
|
@@ -53182,7 +53185,7 @@ var positionTooltip = function (tooltip, eventTarget, forceAbsolute) {
|
|
|
53182
53185
|
eventTarget.addEventListener("keydown", dismissTooltip);
|
|
53183
53186
|
};
|
|
53184
53187
|
|
|
53185
|
-
var __extends$
|
|
53188
|
+
var __extends$1l = (window && window.__extends) || (function () {
|
|
53186
53189
|
var extendStatics = function (d, b) {
|
|
53187
53190
|
extendStatics = Object.setPrototypeOf ||
|
|
53188
53191
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -53232,7 +53235,7 @@ var ControlPosition;
|
|
|
53232
53235
|
* The options for adding a control to the map.
|
|
53233
53236
|
*/
|
|
53234
53237
|
var ControlOptions = /** @class */ (function (_super) {
|
|
53235
|
-
__extends$
|
|
53238
|
+
__extends$1l(ControlOptions, _super);
|
|
53236
53239
|
function ControlOptions() {
|
|
53237
53240
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53238
53241
|
/**
|
|
@@ -53376,7 +53379,7 @@ var index$5 = /*#__PURE__*/Object.freeze({
|
|
|
53376
53379
|
EventEmitter: EventEmitter
|
|
53377
53380
|
});
|
|
53378
53381
|
|
|
53379
|
-
var __extends$
|
|
53382
|
+
var __extends$1k = (window && window.__extends) || (function () {
|
|
53380
53383
|
var extendStatics = function (d, b) {
|
|
53381
53384
|
extendStatics = Object.setPrototypeOf ||
|
|
53382
53385
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -53396,7 +53399,7 @@ var __extends$1i = (window && window.__extends) || (function () {
|
|
|
53396
53399
|
* Implements control interface and provides support for automatic styling based on the map style.
|
|
53397
53400
|
*/
|
|
53398
53401
|
var ControlBase = /** @class */ (function (_super) {
|
|
53399
|
-
__extends$
|
|
53402
|
+
__extends$1k(ControlBase, _super);
|
|
53400
53403
|
function ControlBase() {
|
|
53401
53404
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53402
53405
|
/**
|
|
@@ -53498,7 +53501,7 @@ var ControlBase = /** @class */ (function (_super) {
|
|
|
53498
53501
|
return ControlBase;
|
|
53499
53502
|
}(EventEmitter));
|
|
53500
53503
|
|
|
53501
|
-
var __extends$
|
|
53504
|
+
var __extends$1j = (window && window.__extends) || (function () {
|
|
53502
53505
|
var extendStatics = function (d, b) {
|
|
53503
53506
|
extendStatics = Object.setPrototypeOf ||
|
|
53504
53507
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -53517,7 +53520,7 @@ var __extends$1h = (window && window.__extends) || (function () {
|
|
|
53517
53520
|
* The options for a CompassControl object.
|
|
53518
53521
|
*/
|
|
53519
53522
|
var CompassControlOptions = /** @class */ (function (_super) {
|
|
53520
|
-
__extends$
|
|
53523
|
+
__extends$1j(CompassControlOptions, _super);
|
|
53521
53524
|
function CompassControlOptions() {
|
|
53522
53525
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53523
53526
|
/**
|
|
@@ -53542,7 +53545,7 @@ var CompassControlOptions = /** @class */ (function (_super) {
|
|
|
53542
53545
|
return CompassControlOptions;
|
|
53543
53546
|
}(Options));
|
|
53544
53547
|
|
|
53545
|
-
var __extends$
|
|
53548
|
+
var __extends$1i = (window && window.__extends) || (function () {
|
|
53546
53549
|
var extendStatics = function (d, b) {
|
|
53547
53550
|
extendStatics = Object.setPrototypeOf ||
|
|
53548
53551
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -53561,7 +53564,7 @@ var __extends$1g = (window && window.__extends) || (function () {
|
|
|
53561
53564
|
* A control for changing the rotation of the map.
|
|
53562
53565
|
*/
|
|
53563
53566
|
var CompassControl = /** @class */ (function (_super) {
|
|
53564
|
-
__extends$
|
|
53567
|
+
__extends$1i(CompassControl, _super);
|
|
53565
53568
|
/**
|
|
53566
53569
|
* Constructs a CompassControl.
|
|
53567
53570
|
* @param options The options for the control.
|
|
@@ -53588,12 +53591,10 @@ var CompassControl = /** @class */ (function (_super) {
|
|
|
53588
53591
|
var expandGrid = function (expanded) {
|
|
53589
53592
|
if (expanded) {
|
|
53590
53593
|
container.classList.add("in-use");
|
|
53591
|
-
grid.setAttribute("aria-hidden", "false");
|
|
53592
53594
|
grid.classList.remove("hidden-accessible-element");
|
|
53593
53595
|
}
|
|
53594
53596
|
else {
|
|
53595
53597
|
container.classList.remove("in-use");
|
|
53596
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53597
53598
|
grid.classList.add("hidden-accessible-element");
|
|
53598
53599
|
}
|
|
53599
53600
|
};
|
|
@@ -53660,7 +53661,6 @@ var CompassControl = /** @class */ (function (_super) {
|
|
|
53660
53661
|
var grid = document.createElement("div");
|
|
53661
53662
|
grid.classList.add("sub-container");
|
|
53662
53663
|
grid.classList.add("hidden-accessible-element");
|
|
53663
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53664
53664
|
var rotationRightButton = this.constructRightRotationButton(map);
|
|
53665
53665
|
var rotationLeftButton = this.constructLeftRotationButton(map);
|
|
53666
53666
|
var tooltipLeft = buildAccessibleTooltip("Rotate Left");
|
|
@@ -53746,7 +53746,7 @@ var CompassControl = /** @class */ (function (_super) {
|
|
|
53746
53746
|
return CompassControl;
|
|
53747
53747
|
}(ControlBase));
|
|
53748
53748
|
|
|
53749
|
-
var __extends$
|
|
53749
|
+
var __extends$1h = (window && window.__extends) || (function () {
|
|
53750
53750
|
var extendStatics = function (d, b) {
|
|
53751
53751
|
extendStatics = Object.setPrototypeOf ||
|
|
53752
53752
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -53765,7 +53765,7 @@ var __extends$1f = (window && window.__extends) || (function () {
|
|
|
53765
53765
|
* The options for a PitchControl object.
|
|
53766
53766
|
*/
|
|
53767
53767
|
var PitchControlOptions = /** @class */ (function (_super) {
|
|
53768
|
-
__extends$
|
|
53768
|
+
__extends$1h(PitchControlOptions, _super);
|
|
53769
53769
|
function PitchControlOptions() {
|
|
53770
53770
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
53771
53771
|
/**
|
|
@@ -53790,7 +53790,7 @@ var PitchControlOptions = /** @class */ (function (_super) {
|
|
|
53790
53790
|
return PitchControlOptions;
|
|
53791
53791
|
}(Options));
|
|
53792
53792
|
|
|
53793
|
-
var __extends$
|
|
53793
|
+
var __extends$1g = (window && window.__extends) || (function () {
|
|
53794
53794
|
var extendStatics = function (d, b) {
|
|
53795
53795
|
extendStatics = Object.setPrototypeOf ||
|
|
53796
53796
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -53809,7 +53809,7 @@ var __extends$1e = (window && window.__extends) || (function () {
|
|
|
53809
53809
|
* A control for changing the pitch of the map.
|
|
53810
53810
|
*/
|
|
53811
53811
|
var PitchControl = /** @class */ (function (_super) {
|
|
53812
|
-
__extends$
|
|
53812
|
+
__extends$1g(PitchControl, _super);
|
|
53813
53813
|
/**
|
|
53814
53814
|
* Constructs a PitchControl.
|
|
53815
53815
|
* @param options The options for the control.
|
|
@@ -53866,12 +53866,10 @@ var PitchControl = /** @class */ (function (_super) {
|
|
|
53866
53866
|
var expandGrid = function (expanded) {
|
|
53867
53867
|
if (expanded) {
|
|
53868
53868
|
container.classList.add("in-use");
|
|
53869
|
-
grid.setAttribute("aria-hidden", "false");
|
|
53870
53869
|
grid.classList.remove("hidden-accessible-element");
|
|
53871
53870
|
}
|
|
53872
53871
|
else {
|
|
53873
53872
|
container.classList.remove("in-use");
|
|
53874
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53875
53873
|
grid.classList.add("hidden-accessible-element");
|
|
53876
53874
|
}
|
|
53877
53875
|
};
|
|
@@ -53956,7 +53954,6 @@ var PitchControl = /** @class */ (function (_super) {
|
|
|
53956
53954
|
var grid = document.createElement("div");
|
|
53957
53955
|
grid.classList.add("sub-container");
|
|
53958
53956
|
grid.classList.add("hidden-accessible-element");
|
|
53959
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53960
53957
|
this.pitchIncrementButton = this.constructPitchIncrementButton(map);
|
|
53961
53958
|
this.pitchDecrementButton = this.constructPitchDecrementButton(map);
|
|
53962
53959
|
var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
|
|
@@ -54037,7 +54034,7 @@ var PitchControl = /** @class */ (function (_super) {
|
|
|
54037
54034
|
return PitchControl;
|
|
54038
54035
|
}(ControlBase));
|
|
54039
54036
|
|
|
54040
|
-
var __extends$
|
|
54037
|
+
var __extends$1f = (window && window.__extends) || (function () {
|
|
54041
54038
|
var extendStatics = function (d, b) {
|
|
54042
54039
|
extendStatics = Object.setPrototypeOf ||
|
|
54043
54040
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -54056,7 +54053,7 @@ var __extends$1d = (window && window.__extends) || (function () {
|
|
|
54056
54053
|
* A control to display a scale bar on the map.
|
|
54057
54054
|
*/
|
|
54058
54055
|
var ScaleControl = /** @class */ (function (_super) {
|
|
54059
|
-
__extends$
|
|
54056
|
+
__extends$1f(ScaleControl, _super);
|
|
54060
54057
|
/**
|
|
54061
54058
|
* A control to displays a scale bar relative to the pixel resolution at the center of the map.
|
|
54062
54059
|
* @param options Options for defining how the control is rendered and functions.
|
|
@@ -57574,7 +57571,7 @@ var merge_1 = merge;
|
|
|
57574
57571
|
|
|
57575
57572
|
var merge$1 = /*@__PURE__*/getDefaultExportFromCjs(merge_1);
|
|
57576
57573
|
|
|
57577
|
-
var __extends$
|
|
57574
|
+
var __extends$1e = (window && window.__extends) || (function () {
|
|
57578
57575
|
var extendStatics = function (d, b) {
|
|
57579
57576
|
extendStatics = Object.setPrototypeOf ||
|
|
57580
57577
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -57593,7 +57590,7 @@ var __extends$1c = (window && window.__extends) || (function () {
|
|
|
57593
57590
|
* The options for a StyleControl object.
|
|
57594
57591
|
*/
|
|
57595
57592
|
var StyleControlOptions = /** @class */ (function (_super) {
|
|
57596
|
-
__extends$
|
|
57593
|
+
__extends$1e(StyleControlOptions, _super);
|
|
57597
57594
|
function StyleControlOptions() {
|
|
57598
57595
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
57599
57596
|
/**
|
|
@@ -57638,7 +57635,7 @@ var StyleControlOptions = /** @class */ (function (_super) {
|
|
|
57638
57635
|
return StyleControlOptions;
|
|
57639
57636
|
}(Options));
|
|
57640
57637
|
|
|
57641
|
-
var __extends$
|
|
57638
|
+
var __extends$1d = (window && window.__extends) || (function () {
|
|
57642
57639
|
var extendStatics = function (d, b) {
|
|
57643
57640
|
extendStatics = Object.setPrototypeOf ||
|
|
57644
57641
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -57709,7 +57706,7 @@ var __read$f = (window && window.__read) || function (o, n) {
|
|
|
57709
57706
|
* A control for changing the style of the map.
|
|
57710
57707
|
*/
|
|
57711
57708
|
var StyleControl = /** @class */ (function (_super) {
|
|
57712
|
-
__extends$
|
|
57709
|
+
__extends$1d(StyleControl, _super);
|
|
57713
57710
|
/**
|
|
57714
57711
|
* Constructs a StyleControl.
|
|
57715
57712
|
* @param options The options for the control.
|
|
@@ -57773,12 +57770,10 @@ var StyleControl = /** @class */ (function (_super) {
|
|
|
57773
57770
|
var expandGrid = function (expanded) {
|
|
57774
57771
|
if (expanded) {
|
|
57775
57772
|
container.classList.add(StyleControl.Css.inUse);
|
|
57776
|
-
styleOpsGrid.setAttribute("aria-hidden", "false");
|
|
57777
57773
|
styleOpsGrid.classList.remove("hidden-accessible-element");
|
|
57778
57774
|
}
|
|
57779
57775
|
else {
|
|
57780
57776
|
container.classList.remove(StyleControl.Css.inUse);
|
|
57781
|
-
styleOpsGrid.setAttribute("aria-hidden", "true");
|
|
57782
57777
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
57783
57778
|
}
|
|
57784
57779
|
};
|
|
@@ -58004,7 +57999,6 @@ var StyleControl = /** @class */ (function (_super) {
|
|
|
58004
57999
|
}
|
|
58005
58000
|
styleOpsGrid.setAttribute("aria-label", "Style Options");
|
|
58006
58001
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
58007
|
-
styleOpsGrid.setAttribute("aria-hidden", "true");
|
|
58008
58002
|
// Once the map's style definition is initialized create a map between style names and icons.
|
|
58009
58003
|
// If a style is one of those to be shown by the style picker also create it's element.
|
|
58010
58004
|
this.map.styles.definitions().then(function (definitions) { return __awaiter$7(_this, void 0, void 0, function () {
|
|
@@ -58074,7 +58068,7 @@ var StyleControl = /** @class */ (function (_super) {
|
|
|
58074
58068
|
return StyleControl;
|
|
58075
58069
|
}(ControlBase));
|
|
58076
58070
|
|
|
58077
|
-
var __extends$
|
|
58071
|
+
var __extends$1c = (window && window.__extends) || (function () {
|
|
58078
58072
|
var extendStatics = function (d, b) {
|
|
58079
58073
|
extendStatics = Object.setPrototypeOf ||
|
|
58080
58074
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -58093,7 +58087,7 @@ var __extends$1a = (window && window.__extends) || (function () {
|
|
|
58093
58087
|
* The options for setting traffic on the map.
|
|
58094
58088
|
*/
|
|
58095
58089
|
var TrafficOptions = /** @class */ (function (_super) {
|
|
58096
|
-
__extends$
|
|
58090
|
+
__extends$1c(TrafficOptions, _super);
|
|
58097
58091
|
function TrafficOptions() {
|
|
58098
58092
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
58099
58093
|
/**
|
|
@@ -58118,7 +58112,7 @@ var TrafficOptions = /** @class */ (function (_super) {
|
|
|
58118
58112
|
return TrafficOptions;
|
|
58119
58113
|
}(Options));
|
|
58120
58114
|
|
|
58121
|
-
var __extends$
|
|
58115
|
+
var __extends$1b = (window && window.__extends) || (function () {
|
|
58122
58116
|
var extendStatics = function (d, b) {
|
|
58123
58117
|
extendStatics = Object.setPrototypeOf ||
|
|
58124
58118
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -58137,7 +58131,7 @@ var __extends$19 = (window && window.__extends) || (function () {
|
|
|
58137
58131
|
* The options for a TrafficControl object.
|
|
58138
58132
|
*/
|
|
58139
58133
|
var TrafficControlOptions = /** @class */ (function (_super) {
|
|
58140
|
-
__extends$
|
|
58134
|
+
__extends$1b(TrafficControlOptions, _super);
|
|
58141
58135
|
function TrafficControlOptions() {
|
|
58142
58136
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
58143
58137
|
/**
|
|
@@ -58157,7 +58151,7 @@ var TrafficControlOptions = /** @class */ (function (_super) {
|
|
|
58157
58151
|
return TrafficControlOptions;
|
|
58158
58152
|
}(TrafficOptions));
|
|
58159
58153
|
|
|
58160
|
-
var __extends$
|
|
58154
|
+
var __extends$1a = (window && window.__extends) || (function () {
|
|
58161
58155
|
var extendStatics = function (d, b) {
|
|
58162
58156
|
extendStatics = Object.setPrototypeOf ||
|
|
58163
58157
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -58176,7 +58170,7 @@ var __extends$18 = (window && window.__extends) || (function () {
|
|
|
58176
58170
|
* A control that toggles traffic data on the map.
|
|
58177
58171
|
*/
|
|
58178
58172
|
var TrafficControl = /** @class */ (function (_super) {
|
|
58179
|
-
__extends$
|
|
58173
|
+
__extends$1a(TrafficControl, _super);
|
|
58180
58174
|
/**
|
|
58181
58175
|
* Constructs a TrafficControl
|
|
58182
58176
|
* @param options The options for the control.
|
|
@@ -58303,7 +58297,7 @@ var TrafficControl = /** @class */ (function (_super) {
|
|
|
58303
58297
|
return TrafficControl;
|
|
58304
58298
|
}(ControlBase));
|
|
58305
58299
|
|
|
58306
|
-
var __extends$
|
|
58300
|
+
var __extends$19 = (window && window.__extends) || (function () {
|
|
58307
58301
|
var extendStatics = function (d, b) {
|
|
58308
58302
|
extendStatics = Object.setPrototypeOf ||
|
|
58309
58303
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -58333,7 +58327,7 @@ var __values$j = (window && window.__values) || function(o) {
|
|
|
58333
58327
|
* A control that display traffic legend on the map.
|
|
58334
58328
|
*/
|
|
58335
58329
|
var TrafficLegendControl = /** @class */ (function (_super) {
|
|
58336
|
-
__extends$
|
|
58330
|
+
__extends$19(TrafficLegendControl, _super);
|
|
58337
58331
|
/**
|
|
58338
58332
|
* Construct a traffic legend control
|
|
58339
58333
|
*/
|
|
@@ -59067,7 +59061,7 @@ var Feature = /** @class */ (function () {
|
|
|
59067
59061
|
return Feature;
|
|
59068
59062
|
}());
|
|
59069
59063
|
|
|
59070
|
-
var __extends$
|
|
59064
|
+
var __extends$18 = (window && window.__extends) || (function () {
|
|
59071
59065
|
var extendStatics = function (d, b) {
|
|
59072
59066
|
extendStatics = Object.setPrototypeOf ||
|
|
59073
59067
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -59086,7 +59080,7 @@ var __extends$16 = (window && window.__extends) || (function () {
|
|
|
59086
59080
|
* Represent a pixel coordinate or offset. Extends an array of [x, y].
|
|
59087
59081
|
*/
|
|
59088
59082
|
var Pixel = /** @class */ (function (_super) {
|
|
59089
|
-
__extends$
|
|
59083
|
+
__extends$18(Pixel, _super);
|
|
59090
59084
|
/**
|
|
59091
59085
|
* Constructs a Pixel object and initializes it with the specified x and y coordinates.
|
|
59092
59086
|
* @param x The horizontal pixel offset.
|
|
@@ -61306,7 +61300,7 @@ function getClosestPointOnGeometry(pt, geom, units, decimals) {
|
|
|
61306
61300
|
return result;
|
|
61307
61301
|
}
|
|
61308
61302
|
|
|
61309
|
-
var __extends$
|
|
61303
|
+
var __extends$17 = (window && window.__extends) || (function () {
|
|
61310
61304
|
var extendStatics = function (d, b) {
|
|
61311
61305
|
extendStatics = Object.setPrototypeOf ||
|
|
61312
61306
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -61326,7 +61320,7 @@ var __extends$15 = (window && window.__extends) || (function () {
|
|
|
61326
61320
|
* full description is detailed in [RFC 7946]{@link https://tools.ietf.org/html/rfc7946#section-3.1.1}.
|
|
61327
61321
|
*/
|
|
61328
61322
|
var Position = /** @class */ (function (_super) {
|
|
61329
|
-
__extends$
|
|
61323
|
+
__extends$17(Position, _super);
|
|
61330
61324
|
/**
|
|
61331
61325
|
* Constructs a Position.
|
|
61332
61326
|
* @param longitude The position's longitude.
|
|
@@ -61518,7 +61512,7 @@ var Polygon = /** @class */ (function () {
|
|
|
61518
61512
|
return Polygon;
|
|
61519
61513
|
}());
|
|
61520
61514
|
|
|
61521
|
-
var __extends$
|
|
61515
|
+
var __extends$16 = (window && window.__extends) || (function () {
|
|
61522
61516
|
var extendStatics = function (d, b) {
|
|
61523
61517
|
extendStatics = Object.setPrototypeOf ||
|
|
61524
61518
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -61548,7 +61542,7 @@ var __values$h = (window && window.__values) || function(o) {
|
|
|
61548
61542
|
* A helper class that wraps a Geometry or Feature and makes it easy to update and maintain.
|
|
61549
61543
|
*/
|
|
61550
61544
|
var Shape = /** @class */ (function (_super) {
|
|
61551
|
-
__extends$
|
|
61545
|
+
__extends$16(Shape, _super);
|
|
61552
61546
|
function Shape(data, id, properties) {
|
|
61553
61547
|
var _this = _super.call(this) || this;
|
|
61554
61548
|
var geometry;
|
|
@@ -61844,7 +61838,7 @@ var Shape = /** @class */ (function (_super) {
|
|
|
61844
61838
|
return Shape;
|
|
61845
61839
|
}(EventEmitter));
|
|
61846
61840
|
|
|
61847
|
-
var __extends$
|
|
61841
|
+
var __extends$15 = (window && window.__extends) || (function () {
|
|
61848
61842
|
var extendStatics = function (d, b) {
|
|
61849
61843
|
extendStatics = Object.setPrototypeOf ||
|
|
61850
61844
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -61877,7 +61871,7 @@ var __values$g = (window && window.__values) || function(o) {
|
|
|
61877
61871
|
* [RFC 7946]{@link https://tools.ietf.org/html/rfc7946#section-5}.
|
|
61878
61872
|
*/
|
|
61879
61873
|
var BoundingBox = /** @class */ (function (_super) {
|
|
61880
|
-
__extends$
|
|
61874
|
+
__extends$15(BoundingBox, _super);
|
|
61881
61875
|
function BoundingBox(southwestPositionOrPositions, northeastPosition) {
|
|
61882
61876
|
var _this = this;
|
|
61883
61877
|
if (southwestPositionOrPositions && northeastPosition) {
|
|
@@ -62594,7 +62588,7 @@ var MultiPolygon = /** @class */ (function () {
|
|
|
62594
62588
|
return MultiPolygon;
|
|
62595
62589
|
}());
|
|
62596
62590
|
|
|
62597
|
-
var __extends$
|
|
62591
|
+
var __extends$14 = (window && window.__extends) || (function () {
|
|
62598
62592
|
var extendStatics = function (d, b) {
|
|
62599
62593
|
extendStatics = Object.setPrototypeOf ||
|
|
62600
62594
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -62625,7 +62619,7 @@ var __extends$12 = (window && window.__extends) || (function () {
|
|
|
62625
62619
|
* The `z` dimension of `MercatorPoint` is conformal. A cube in the mercator coordinate space would be rendered as a cube.
|
|
62626
62620
|
*/
|
|
62627
62621
|
var MercatorPoint = /** @class */ (function (_super) {
|
|
62628
|
-
__extends$
|
|
62622
|
+
__extends$14(MercatorPoint, _super);
|
|
62629
62623
|
/**
|
|
62630
62624
|
* Constructs a MercatorPoint.
|
|
62631
62625
|
* @param x A points x position in mercator units.
|
|
@@ -63114,7 +63108,7 @@ var index$3 = /*#__PURE__*/Object.freeze({
|
|
|
63114
63108
|
simplify: simplify
|
|
63115
63109
|
});
|
|
63116
63110
|
|
|
63117
|
-
var __extends$
|
|
63111
|
+
var __extends$13 = (window && window.__extends) || (function () {
|
|
63118
63112
|
var extendStatics = function (d, b) {
|
|
63119
63113
|
extendStatics = Object.setPrototypeOf ||
|
|
63120
63114
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -63133,7 +63127,7 @@ var __extends$11 = (window && window.__extends) || (function () {
|
|
|
63133
63127
|
* The options for a ZoomControl object.
|
|
63134
63128
|
*/
|
|
63135
63129
|
var ZoomControlOptions = /** @class */ (function (_super) {
|
|
63136
|
-
__extends$
|
|
63130
|
+
__extends$13(ZoomControlOptions, _super);
|
|
63137
63131
|
function ZoomControlOptions() {
|
|
63138
63132
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63139
63133
|
/**
|
|
@@ -63153,7 +63147,7 @@ var ZoomControlOptions = /** @class */ (function (_super) {
|
|
|
63153
63147
|
return ZoomControlOptions;
|
|
63154
63148
|
}(Options));
|
|
63155
63149
|
|
|
63156
|
-
var __extends$
|
|
63150
|
+
var __extends$12 = (window && window.__extends) || (function () {
|
|
63157
63151
|
var extendStatics = function (d, b) {
|
|
63158
63152
|
extendStatics = Object.setPrototypeOf ||
|
|
63159
63153
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -63172,7 +63166,7 @@ var __extends$10 = (window && window.__extends) || (function () {
|
|
|
63172
63166
|
* A control for changing the zoom of the map.
|
|
63173
63167
|
*/
|
|
63174
63168
|
var ZoomControl = /** @class */ (function (_super) {
|
|
63175
|
-
__extends$
|
|
63169
|
+
__extends$12(ZoomControl, _super);
|
|
63176
63170
|
/**
|
|
63177
63171
|
* Constructs a ZoomControl.
|
|
63178
63172
|
* @param options The options for the control.
|
|
@@ -63286,10 +63280,169 @@ var ZoomControl = /** @class */ (function (_super) {
|
|
|
63286
63280
|
return ZoomControl;
|
|
63287
63281
|
}(ControlBase));
|
|
63288
63282
|
|
|
63283
|
+
var __extends$11 = (window && window.__extends) || (function () {
|
|
63284
|
+
var extendStatics = function (d, b) {
|
|
63285
|
+
extendStatics = Object.setPrototypeOf ||
|
|
63286
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
63287
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
63288
|
+
return extendStatics(d, b);
|
|
63289
|
+
};
|
|
63290
|
+
return function (d, b) {
|
|
63291
|
+
if (typeof b !== "function" && b !== null)
|
|
63292
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
63293
|
+
extendStatics(d, b);
|
|
63294
|
+
function __() { this.constructor = d; }
|
|
63295
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
63296
|
+
};
|
|
63297
|
+
})();
|
|
63298
|
+
/**
|
|
63299
|
+
* The options for a FullscreenControl object.
|
|
63300
|
+
*/
|
|
63301
|
+
var FullscreenControlOptions = /** @class */ (function (_super) {
|
|
63302
|
+
__extends$11(FullscreenControlOptions, _super);
|
|
63303
|
+
function FullscreenControlOptions() {
|
|
63304
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
63305
|
+
/**
|
|
63306
|
+
* The style of the control.
|
|
63307
|
+
* Default `ControlStyle.light`
|
|
63308
|
+
* @default ControlStyle.light
|
|
63309
|
+
*/
|
|
63310
|
+
_this.style = ControlStyle.light;
|
|
63311
|
+
/**
|
|
63312
|
+
* Indicates if the control should be hidden if the browser does not support fullscreen mode.
|
|
63313
|
+
* Default `false`
|
|
63314
|
+
* @default false
|
|
63315
|
+
*/
|
|
63316
|
+
_this.hideIfUnsupported = false;
|
|
63317
|
+
/**
|
|
63318
|
+
* The HTML element which should be made full screen.
|
|
63319
|
+
* If not specified, the map container element will be used.
|
|
63320
|
+
*/
|
|
63321
|
+
_this.container = undefined;
|
|
63322
|
+
return _this;
|
|
63323
|
+
}
|
|
63324
|
+
return FullscreenControlOptions;
|
|
63325
|
+
}(Options));
|
|
63326
|
+
|
|
63327
|
+
var __extends$10 = (window && window.__extends) || (function () {
|
|
63328
|
+
var extendStatics = function (d, b) {
|
|
63329
|
+
extendStatics = Object.setPrototypeOf ||
|
|
63330
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
63331
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
63332
|
+
return extendStatics(d, b);
|
|
63333
|
+
};
|
|
63334
|
+
return function (d, b) {
|
|
63335
|
+
if (typeof b !== "function" && b !== null)
|
|
63336
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
63337
|
+
extendStatics(d, b);
|
|
63338
|
+
function __() { this.constructor = d; }
|
|
63339
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
63340
|
+
};
|
|
63341
|
+
})();
|
|
63342
|
+
/**
|
|
63343
|
+
* A control to make the map or a specified element fullscreen.
|
|
63344
|
+
*/
|
|
63345
|
+
var FullscreenControl = /** @class */ (function (_super) {
|
|
63346
|
+
__extends$10(FullscreenControl, _super);
|
|
63347
|
+
/**
|
|
63348
|
+
* A control to make the map or a specified element fullscreen.
|
|
63349
|
+
* @param options Options for defining how the control is rendered and the container to be made fullscreen.
|
|
63350
|
+
*/
|
|
63351
|
+
function FullscreenControl(options) {
|
|
63352
|
+
var _this = _super.call(this) || this;
|
|
63353
|
+
_this.map = null;
|
|
63354
|
+
_this.isFullscreenState = false;
|
|
63355
|
+
_this.options = new FullscreenControlOptions().merge(options);
|
|
63356
|
+
_this.control = new maplibregl.FullscreenControl({
|
|
63357
|
+
container: _this.options.container,
|
|
63358
|
+
});
|
|
63359
|
+
return _this;
|
|
63360
|
+
}
|
|
63361
|
+
/**
|
|
63362
|
+
* Initialization method for the control which is called when added to the map.
|
|
63363
|
+
* @param map The map that the control will be added to.
|
|
63364
|
+
* @param options The ControlOptions for this control.
|
|
63365
|
+
* @return An HTMLElement to be placed on the map for the control.
|
|
63366
|
+
*/
|
|
63367
|
+
FullscreenControl.prototype.onAdd = function (map) {
|
|
63368
|
+
var _this = this;
|
|
63369
|
+
var _a, _b;
|
|
63370
|
+
this.map = map;
|
|
63371
|
+
(_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a._getMap()) === null || _b === void 0 ? void 0 : _b.addControl(this.control);
|
|
63372
|
+
var container = this.buildContainer(map, this.options.style, "Fullscreen Control");
|
|
63373
|
+
var fullscreenButton = this.control._fullscreenButton;
|
|
63374
|
+
if (fullscreenButton) {
|
|
63375
|
+
var icon_1 = fullscreenButton.querySelector("span");
|
|
63376
|
+
if (icon_1) {
|
|
63377
|
+
var tooltip_1 = buildAccessibleTooltip("Enter Fullscreen");
|
|
63378
|
+
container.appendChild(fullscreenButton);
|
|
63379
|
+
// Add classes for styling.
|
|
63380
|
+
fullscreenButton.classList.add("azure-maps-control-button", "fullscreen");
|
|
63381
|
+
icon_1.classList.add("fullscreen-icon", "fullscreen-end");
|
|
63382
|
+
// Add the tooltip and prevent the default one set by Maplibre.
|
|
63383
|
+
fullscreenButton.removeAttribute("title"); // A title attribute will be converted to a tooltip by the browser.
|
|
63384
|
+
container.appendChild(tooltip_1);
|
|
63385
|
+
positionTooltip(tooltip_1, fullscreenButton);
|
|
63386
|
+
// Update the icon and the tooltip based on the fullscreen state.
|
|
63387
|
+
this.control.on("fullscreenstart", function () {
|
|
63388
|
+
// Remove the title attribute added automatically whenever fullscreen event is fired
|
|
63389
|
+
fullscreenButton.removeAttribute("title");
|
|
63390
|
+
icon_1.classList.remove("fullscreen-end");
|
|
63391
|
+
icon_1.classList.add("fullscreen-start");
|
|
63392
|
+
tooltip_1.innerText = "Exit Fullscreen";
|
|
63393
|
+
_this.isFullscreenState = true;
|
|
63394
|
+
});
|
|
63395
|
+
this.control.on("fullscreenend", function () {
|
|
63396
|
+
fullscreenButton.removeAttribute("title");
|
|
63397
|
+
icon_1.classList.remove("fullscreen-start");
|
|
63398
|
+
icon_1.classList.add("fullscreen-end");
|
|
63399
|
+
tooltip_1.innerText = "Enter Fullscreen";
|
|
63400
|
+
_this.isFullscreenState = false;
|
|
63401
|
+
});
|
|
63402
|
+
}
|
|
63403
|
+
}
|
|
63404
|
+
// Invisiblize the control if the browser does not support fullscreen mode.
|
|
63405
|
+
if (this.options.hideIfUnsupported && !FullscreenControl.isSupported()) {
|
|
63406
|
+
container.style.display = "none";
|
|
63407
|
+
}
|
|
63408
|
+
return container;
|
|
63409
|
+
};
|
|
63410
|
+
/**
|
|
63411
|
+
* Method that is called when the control is removed from the map. Should perform any necessary cleanup for the
|
|
63412
|
+
* control.
|
|
63413
|
+
*/
|
|
63414
|
+
FullscreenControl.prototype.onRemove = function () {
|
|
63415
|
+
var _a, _b;
|
|
63416
|
+
_super.prototype.onRemove.call(this);
|
|
63417
|
+
(_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a._getMap()) === null || _b === void 0 ? void 0 : _b.removeControl(this.control);
|
|
63418
|
+
this.map = null;
|
|
63419
|
+
};
|
|
63420
|
+
/**
|
|
63421
|
+
* Gets the current fullscreen state of the map.
|
|
63422
|
+
* @returns A boolean indicating if the map is in fullscreen mode.
|
|
63423
|
+
*/
|
|
63424
|
+
FullscreenControl.prototype.isFullscreen = function () {
|
|
63425
|
+
return this.isFullscreenState;
|
|
63426
|
+
};
|
|
63427
|
+
/**
|
|
63428
|
+
* Checks to see if the browser supports going into fullscreen mode.
|
|
63429
|
+
* @returns A boolean indicating if the browser supports fullscreen mode.
|
|
63430
|
+
*/
|
|
63431
|
+
FullscreenControl.isSupported = function () {
|
|
63432
|
+
var d = document;
|
|
63433
|
+
return d['fullscreenEnabled'] ||
|
|
63434
|
+
d['msFullscreenEnabled'] ||
|
|
63435
|
+
d['mozFullScreenEnabled'] ||
|
|
63436
|
+
d['webkitFullscreenEnabled'];
|
|
63437
|
+
};
|
|
63438
|
+
return FullscreenControl;
|
|
63439
|
+
}(ControlBase));
|
|
63440
|
+
|
|
63289
63441
|
var index$2 = /*#__PURE__*/Object.freeze({
|
|
63290
63442
|
__proto__: null,
|
|
63291
63443
|
CompassControl: CompassControl,
|
|
63292
63444
|
ControlBase: ControlBase,
|
|
63445
|
+
FullscreenControl: FullscreenControl,
|
|
63293
63446
|
PitchControl: PitchControl,
|
|
63294
63447
|
ScaleControl: ScaleControl,
|
|
63295
63448
|
StyleControl: StyleControl,
|
|
@@ -65652,7 +65805,7 @@ var ImageLayer = /** @class */ (function (_super) {
|
|
|
65652
65805
|
*/
|
|
65653
65806
|
ImageLayer.prototype.setOptions = function (options) {
|
|
65654
65807
|
var newOptions = new ImageLayerOptions().merge(this.options, cloneDeepWith$1(options, ImageLayerOptions._cloneCustomizer));
|
|
65655
|
-
var
|
|
65808
|
+
var reloadImage = (typeof options.url === "string" && options.url !== this.getOptions().url);
|
|
65656
65809
|
var coordChanged = (typeof options.coordinates !== "undefined" && options.coordinates !== this.getOptions().coordinates);
|
|
65657
65810
|
if (this.map) {
|
|
65658
65811
|
this._updateBaseProperties(newOptions, this.options);
|
|
@@ -65662,16 +65815,17 @@ var ImageLayer = /** @class */ (function (_super) {
|
|
|
65662
65815
|
this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
|
|
65663
65816
|
this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
|
|
65664
65817
|
this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
|
|
65665
|
-
//
|
|
65666
|
-
// update "as any" to "as maplibregl.ImageSource" after the typing file is updated
|
|
65818
|
+
// Get the image source
|
|
65667
65819
|
var source = this.map._getMap().getSource(this._getSourceId());
|
|
65668
|
-
if
|
|
65820
|
+
// Check if the source exists and if we need to reload the image or if coordinates have changed
|
|
65821
|
+
if (source && (reloadImage || coordChanged)) {
|
|
65822
|
+
// Update the image with the new options
|
|
65669
65823
|
source.updateImage(newOptions);
|
|
65670
65824
|
}
|
|
65671
65825
|
}
|
|
65672
65826
|
this.options = newOptions;
|
|
65673
65827
|
// Modified to update transform if image url or coordinates change
|
|
65674
|
-
if (
|
|
65828
|
+
if (reloadImage) {
|
|
65675
65829
|
this.reloadImage();
|
|
65676
65830
|
}
|
|
65677
65831
|
else if (coordChanged) {
|
|
@@ -68203,6 +68357,7 @@ var Popup = /** @class */ (function (_super) {
|
|
|
68203
68357
|
ele.addEventListener("click", this.close);
|
|
68204
68358
|
ele.classList.add(Popup.Css.close);
|
|
68205
68359
|
ele.setAttribute("aria-label", "close");
|
|
68360
|
+
ele.setAttribute("type", "button");
|
|
68206
68361
|
ele.setAttribute("tabindex", "0");
|
|
68207
68362
|
ele.innerHTML = "×";
|
|
68208
68363
|
return ele;
|
|
@@ -113856,6 +114011,12 @@ var StyleOptions = /** @class */ (function (_super) {
|
|
|
113856
114011
|
* @deprecated use `view` instead.
|
|
113857
114012
|
*/
|
|
113858
114013
|
_this.userRegion = _this.view;
|
|
114014
|
+
/**
|
|
114015
|
+
* Override the default styles for the map elements.
|
|
114016
|
+
* Default `undefined`
|
|
114017
|
+
* @default undefined
|
|
114018
|
+
*/
|
|
114019
|
+
_this.styleOverrides = undefined;
|
|
113859
114020
|
/**
|
|
113860
114021
|
* allows substituting a default MapControl's style transformer with custom one
|
|
113861
114022
|
* Default style transformer is meant to update the incoming fetched style to desired state, as well as to synchronize the SDK state with style state
|
|
@@ -113993,10 +114154,10 @@ var ServiceOptions = /** @class */ (function (_super) {
|
|
|
113993
114154
|
/**
|
|
113994
114155
|
* Disable telemetry collection
|
|
113995
114156
|
* This option may only be set when initializing the map.
|
|
113996
|
-
* default:
|
|
113997
|
-
* @default
|
|
114157
|
+
* default: true
|
|
114158
|
+
* @default true
|
|
113998
114159
|
*/
|
|
113999
|
-
_this.disableTelemetry =
|
|
114160
|
+
_this.disableTelemetry = true;
|
|
114000
114161
|
/**
|
|
114001
114162
|
* Disable telemetry collection
|
|
114002
114163
|
* This option may only be set when initializing the map.
|
|
@@ -114489,6 +114650,16 @@ var __values$2 = (window && window.__values) || function(o) {
|
|
|
114489
114650
|
};
|
|
114490
114651
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
114491
114652
|
};
|
|
114653
|
+
/**
|
|
114654
|
+
* Mapping of styleOverrides options to style parameter values.
|
|
114655
|
+
*/
|
|
114656
|
+
var styleOverridesMapping = {
|
|
114657
|
+
countryRegion: "cr|bv:0",
|
|
114658
|
+
adminDistrict: "ad|bv:0",
|
|
114659
|
+
adminDistrict2: "ds|bv:0",
|
|
114660
|
+
buildingFootprint: "bld|v:0_adr|lv:0",
|
|
114661
|
+
roadDetails: "g|rasterDetailsVisible:0"
|
|
114662
|
+
};
|
|
114492
114663
|
/**
|
|
114493
114664
|
* @private
|
|
114494
114665
|
*/
|
|
@@ -114999,7 +115170,31 @@ var StyleManager = /** @class */ (function () {
|
|
|
114999
115170
|
return targetStyleWithUserLayers;
|
|
115000
115171
|
};
|
|
115001
115172
|
}
|
|
115002
|
-
|
|
115173
|
+
var styleUrl = targetDefinition.url;
|
|
115174
|
+
if (styleUrl && (styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)) {
|
|
115175
|
+
// Append the st parameter in the url with the mapped value.
|
|
115176
|
+
// We loop through the styleOverrides and join the corresponding st parameter with "_".
|
|
115177
|
+
var url = new URL(styleUrl);
|
|
115178
|
+
var params = new URLSearchParams(url.search);
|
|
115179
|
+
var stParams = Object.entries(styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)
|
|
115180
|
+
.filter(function (_a) {
|
|
115181
|
+
var _b = __read$2(_a, 2), key = _b[0], value = _b[1];
|
|
115182
|
+
return key in styleOverridesMapping &&
|
|
115183
|
+
( // bv stands for borderVisible
|
|
115184
|
+
(styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.borderVisible) === false) ||
|
|
115185
|
+
(!styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.visible) === false));
|
|
115186
|
+
})
|
|
115187
|
+
.map(function (_a) {
|
|
115188
|
+
var _b = __read$2(_a, 2), key = _b[0]; _b[1];
|
|
115189
|
+
return styleOverridesMapping[key];
|
|
115190
|
+
});
|
|
115191
|
+
if (stParams.length > 0) {
|
|
115192
|
+
params.set("st", stParams.join("_"));
|
|
115193
|
+
url.search = params.toString();
|
|
115194
|
+
styleUrl = url.toString();
|
|
115195
|
+
}
|
|
115196
|
+
}
|
|
115197
|
+
this.map._getMap().setStyle(styleUrl || targetDefinition.style, {
|
|
115003
115198
|
diff: diff,
|
|
115004
115199
|
validate: this.serviceOptions.validateStyle,
|
|
115005
115200
|
transformStyle: transformStyleFunc
|