azure-maps-control 3.0.2 → 3.1.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/ReadMe.md +2 -2
- package/dist/atlas-core-bare-snr-min.js +1 -1
- package/dist/atlas-core-bare-snr.js +199 -189
- package/dist/atlas-core-bare.js +386 -319
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +808 -407
- package/dist/atlas-core.js +995 -537
- package/dist/atlas-core.min.js +4 -4
- package/dist/atlas-esm.js +118707 -0
- package/dist/atlas-esm.min.js +108 -0
- package/dist/atlas.js +2869 -910
- package/dist/atlas.min.js +4 -4
- package/package.json +15 -13
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +77 -2
|
@@ -89,7 +89,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
89
89
|
sessionIdHeaderName: "Session-Id"
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
var __values$
|
|
92
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
93
93
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
94
94
|
if (m) return m.call(o);
|
|
95
95
|
if (o && typeof o.length === "number") return {
|
|
@@ -117,7 +117,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
117
117
|
}
|
|
118
118
|
var defaults;
|
|
119
119
|
try {
|
|
120
|
-
for (var valuesList_1 = __values$
|
|
120
|
+
for (var valuesList_1 = __values$k(valuesList), valuesList_1_1 = valuesList_1.next(); !valuesList_1_1.done; valuesList_1_1 = valuesList_1.next()) {
|
|
121
121
|
var values = valuesList_1_1.value;
|
|
122
122
|
if (!values) {
|
|
123
123
|
continue;
|
|
@@ -157,7 +157,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
157
157
|
return Options;
|
|
158
158
|
}());
|
|
159
159
|
|
|
160
|
-
var __extends$
|
|
160
|
+
var __extends$1g = (window && window.__extends) || (function () {
|
|
161
161
|
var extendStatics = function (d, b) {
|
|
162
162
|
extendStatics = Object.setPrototypeOf ||
|
|
163
163
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -172,7 +172,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
172
172
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
173
173
|
};
|
|
174
174
|
})();
|
|
175
|
-
var __read$
|
|
175
|
+
var __read$d = (window && window.__read) || function (o, n) {
|
|
176
176
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
177
177
|
if (!m) return o;
|
|
178
178
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -192,7 +192,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
192
192
|
* @private
|
|
193
193
|
*/
|
|
194
194
|
var UrlOptions = /** @class */ (function (_super) {
|
|
195
|
-
__extends$
|
|
195
|
+
__extends$1g(UrlOptions, _super);
|
|
196
196
|
function UrlOptions() {
|
|
197
197
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
198
198
|
_this.domain = undefined;
|
|
@@ -232,7 +232,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
232
232
|
var self = this;
|
|
233
233
|
var queryParamsString = Object.entries(self.options.queryParams)
|
|
234
234
|
.map(function (_a) {
|
|
235
|
-
var _b = __read$
|
|
235
|
+
var _b = __read$d(_a, 2), key = _b[0], value = _b[1];
|
|
236
236
|
return "".concat(key, "=").concat(value);
|
|
237
237
|
})
|
|
238
238
|
.join("&");
|
|
@@ -263,7 +263,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
263
263
|
return Url;
|
|
264
264
|
}());
|
|
265
265
|
|
|
266
|
-
var version = "3.0
|
|
266
|
+
var version = "3.1.0";
|
|
267
267
|
|
|
268
268
|
/**
|
|
269
269
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -373,7 +373,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
373
373
|
eventTarget.addEventListener("keydown", dismissTooltip);
|
|
374
374
|
};
|
|
375
375
|
|
|
376
|
-
var __extends$
|
|
376
|
+
var __extends$1f = (window && window.__extends) || (function () {
|
|
377
377
|
var extendStatics = function (d, b) {
|
|
378
378
|
extendStatics = Object.setPrototypeOf ||
|
|
379
379
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -423,7 +423,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
423
423
|
* The options for adding a control to the map.
|
|
424
424
|
*/
|
|
425
425
|
var ControlOptions = /** @class */ (function (_super) {
|
|
426
|
-
__extends$
|
|
426
|
+
__extends$1f(ControlOptions, _super);
|
|
427
427
|
function ControlOptions() {
|
|
428
428
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
429
429
|
/**
|
|
@@ -567,7 +567,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
567
567
|
EventEmitter: EventEmitter
|
|
568
568
|
});
|
|
569
569
|
|
|
570
|
-
var __extends$
|
|
570
|
+
var __extends$1e = (window && window.__extends) || (function () {
|
|
571
571
|
var extendStatics = function (d, b) {
|
|
572
572
|
extendStatics = Object.setPrototypeOf ||
|
|
573
573
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -587,7 +587,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
587
587
|
* Implements control interface and provides support for automatic styling based on the map style.
|
|
588
588
|
*/
|
|
589
589
|
var ControlBase = /** @class */ (function (_super) {
|
|
590
|
-
__extends$
|
|
590
|
+
__extends$1e(ControlBase, _super);
|
|
591
591
|
function ControlBase() {
|
|
592
592
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
593
593
|
/**
|
|
@@ -689,7 +689,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
689
689
|
return ControlBase;
|
|
690
690
|
}(EventEmitter));
|
|
691
691
|
|
|
692
|
-
var __extends$
|
|
692
|
+
var __extends$1d = (window && window.__extends) || (function () {
|
|
693
693
|
var extendStatics = function (d, b) {
|
|
694
694
|
extendStatics = Object.setPrototypeOf ||
|
|
695
695
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -708,7 +708,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
708
708
|
* The options for a CompassControl object.
|
|
709
709
|
*/
|
|
710
710
|
var CompassControlOptions = /** @class */ (function (_super) {
|
|
711
|
-
__extends$
|
|
711
|
+
__extends$1d(CompassControlOptions, _super);
|
|
712
712
|
function CompassControlOptions() {
|
|
713
713
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
714
714
|
/**
|
|
@@ -733,7 +733,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
733
733
|
return CompassControlOptions;
|
|
734
734
|
}(Options));
|
|
735
735
|
|
|
736
|
-
var __extends$
|
|
736
|
+
var __extends$1c = (window && window.__extends) || (function () {
|
|
737
737
|
var extendStatics = function (d, b) {
|
|
738
738
|
extendStatics = Object.setPrototypeOf ||
|
|
739
739
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -752,7 +752,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
752
752
|
* A control for changing the rotation of the map.
|
|
753
753
|
*/
|
|
754
754
|
var CompassControl = /** @class */ (function (_super) {
|
|
755
|
-
__extends$
|
|
755
|
+
__extends$1c(CompassControl, _super);
|
|
756
756
|
/**
|
|
757
757
|
* Constructs a CompassControl.
|
|
758
758
|
* @param options The options for the control.
|
|
@@ -815,6 +815,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
815
815
|
grid.classList.add("hidden-accessible-element");
|
|
816
816
|
}
|
|
817
817
|
});
|
|
818
|
+
// Dismiss the grid when esc key is pressed on the reset button and the tooltip is not visible
|
|
819
|
+
rotationButton.addEventListener("keydown", function (event) {
|
|
820
|
+
if ((event.key === "Escape" || event.key === "Esc") &&
|
|
821
|
+
(container === null || container === void 0 ? void 0 : container.classList.contains("in-use")) &&
|
|
822
|
+
(tooltip === null || tooltip === void 0 ? void 0 : tooltip.style.display) === "none") {
|
|
823
|
+
event.stopPropagation();
|
|
824
|
+
container.classList.remove("in-use");
|
|
825
|
+
grid.classList.add("hidden-accessible-element");
|
|
826
|
+
}
|
|
827
|
+
});
|
|
818
828
|
// If the control's position will require inverting the element order
|
|
819
829
|
// add them in the opposite order to preserve tabindex.
|
|
820
830
|
if (options && CompassControl.InvertOrderPositions.includes(options.position)) {
|
|
@@ -920,7 +930,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
920
930
|
return CompassControl;
|
|
921
931
|
}(ControlBase));
|
|
922
932
|
|
|
923
|
-
var __extends$
|
|
933
|
+
var __extends$1b = (window && window.__extends) || (function () {
|
|
924
934
|
var extendStatics = function (d, b) {
|
|
925
935
|
extendStatics = Object.setPrototypeOf ||
|
|
926
936
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -939,7 +949,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
939
949
|
* The options for a PitchControl object.
|
|
940
950
|
*/
|
|
941
951
|
var PitchControlOptions = /** @class */ (function (_super) {
|
|
942
|
-
__extends$
|
|
952
|
+
__extends$1b(PitchControlOptions, _super);
|
|
943
953
|
function PitchControlOptions() {
|
|
944
954
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
945
955
|
/**
|
|
@@ -964,7 +974,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
964
974
|
return PitchControlOptions;
|
|
965
975
|
}(Options));
|
|
966
976
|
|
|
967
|
-
var __extends$
|
|
977
|
+
var __extends$1a = (window && window.__extends) || (function () {
|
|
968
978
|
var extendStatics = function (d, b) {
|
|
969
979
|
extendStatics = Object.setPrototypeOf ||
|
|
970
980
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
@@ -983,7 +993,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
983
993
|
* A control for changing the pitch of the map.
|
|
984
994
|
*/
|
|
985
995
|
var PitchControl = /** @class */ (function (_super) {
|
|
986
|
-
__extends$
|
|
996
|
+
__extends$1a(PitchControl, _super);
|
|
987
997
|
/**
|
|
988
998
|
* Constructs a PitchControl.
|
|
989
999
|
* @param options The options for the control.
|
|
@@ -1076,6 +1086,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
1076
1086
|
grid.classList.add("hidden-accessible-element");
|
|
1077
1087
|
}
|
|
1078
1088
|
});
|
|
1089
|
+
// Dismiss the grid when esc key is pressed on the reset button and the tooltip is not visible
|
|
1090
|
+
pitchButton.addEventListener("keydown", function (event) {
|
|
1091
|
+
if ((event.key === "Escape" || event.key === "Esc") &&
|
|
1092
|
+
(container === null || container === void 0 ? void 0 : container.classList.contains("in-use")) &&
|
|
1093
|
+
(tooltip === null || tooltip === void 0 ? void 0 : tooltip.style.display) === "none") {
|
|
1094
|
+
event.stopPropagation();
|
|
1095
|
+
container.classList.remove("in-use");
|
|
1096
|
+
grid.classList.add("hidden-accessible-element");
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1079
1099
|
// If the control's position will require inverting the element order
|
|
1080
1100
|
// add them in the opposite order to preserve tabindex.
|
|
1081
1101
|
if (options && PitchControl.INVERT_ORDER_POSITIONS.includes(options.position)) {
|
|
@@ -1194,6 +1214,74 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
1194
1214
|
return PitchControl;
|
|
1195
1215
|
}(ControlBase));
|
|
1196
1216
|
|
|
1217
|
+
var __extends$19 = (window && window.__extends) || (function () {
|
|
1218
|
+
var extendStatics = function (d, b) {
|
|
1219
|
+
extendStatics = Object.setPrototypeOf ||
|
|
1220
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
1221
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
1222
|
+
return extendStatics(d, b);
|
|
1223
|
+
};
|
|
1224
|
+
return function (d, b) {
|
|
1225
|
+
if (typeof b !== "function" && b !== null)
|
|
1226
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
1227
|
+
extendStatics(d, b);
|
|
1228
|
+
function __() { this.constructor = d; }
|
|
1229
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
1230
|
+
};
|
|
1231
|
+
})();
|
|
1232
|
+
/**
|
|
1233
|
+
* A control to display a scale bar on the map.
|
|
1234
|
+
*/
|
|
1235
|
+
var ScaleControl = /** @class */ (function (_super) {
|
|
1236
|
+
__extends$19(ScaleControl, _super);
|
|
1237
|
+
/**
|
|
1238
|
+
* A control to displays a scale bar relative to the pixel resolution at the center of the map.
|
|
1239
|
+
* @param options Options for defining how the control is rendered and functions.
|
|
1240
|
+
*/
|
|
1241
|
+
function ScaleControl(options) {
|
|
1242
|
+
var _this = _super.call(this) || this;
|
|
1243
|
+
_this.map = null;
|
|
1244
|
+
_this.control = new maplibregl.ScaleControl({
|
|
1245
|
+
maxWidth: options === null || options === void 0 ? void 0 : options.maxWidth,
|
|
1246
|
+
unit: options === null || options === void 0 ? void 0 : options.unit
|
|
1247
|
+
});
|
|
1248
|
+
return _this;
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1251
|
+
* Initialization method for the control which is called when added to the map.
|
|
1252
|
+
* @param map The map that the control will be added to.
|
|
1253
|
+
* @param options The ControlOptions for this control.
|
|
1254
|
+
* @return An HTMLElement to be placed on the map for the control.
|
|
1255
|
+
*/
|
|
1256
|
+
ScaleControl.prototype.onAdd = function (map, options) {
|
|
1257
|
+
var _a, _b, _c;
|
|
1258
|
+
this.map = map;
|
|
1259
|
+
(_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a._getMap()) === null || _b === void 0 ? void 0 : _b.addControl(this.control);
|
|
1260
|
+
var container = this.buildContainer(map, exports.ControlStyle.auto, "Scale Bar");
|
|
1261
|
+
container.appendChild((_c = this.control) === null || _c === void 0 ? void 0 : _c._container);
|
|
1262
|
+
return container;
|
|
1263
|
+
};
|
|
1264
|
+
/**
|
|
1265
|
+
* Method that is called when the control is removed from the map. Should perform any necessary cleanup for the
|
|
1266
|
+
* control.
|
|
1267
|
+
*/
|
|
1268
|
+
ScaleControl.prototype.onRemove = function () {
|
|
1269
|
+
var _a, _b;
|
|
1270
|
+
_super.prototype.onRemove.call(this);
|
|
1271
|
+
(_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a._getMap()) === null || _b === void 0 ? void 0 : _b.removeControl(this.control);
|
|
1272
|
+
this.map = null;
|
|
1273
|
+
};
|
|
1274
|
+
/**
|
|
1275
|
+
* Set the scale's unit of the distance
|
|
1276
|
+
* @param unit - Unit of the distance (`"imperial"`, `"metric"` or `"nautical"`).
|
|
1277
|
+
*/
|
|
1278
|
+
ScaleControl.prototype.setUnit = function (unit) {
|
|
1279
|
+
var _a;
|
|
1280
|
+
(_a = this.control) === null || _a === void 0 ? void 0 : _a.setUnit(unit);
|
|
1281
|
+
};
|
|
1282
|
+
return ScaleControl;
|
|
1283
|
+
}(ControlBase));
|
|
1284
|
+
|
|
1197
1285
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
1198
1286
|
|
|
1199
1287
|
function getDefaultExportFromCjs (x) {
|
|
@@ -4809,7 +4897,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
4809
4897
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
4810
4898
|
}
|
|
4811
4899
|
};
|
|
4812
|
-
var __read$
|
|
4900
|
+
var __read$c = (window && window.__read) || function (o, n) {
|
|
4813
4901
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4814
4902
|
if (!m) return o;
|
|
4815
4903
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -4990,7 +5078,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
4990
5078
|
image_1.src = newSrc;
|
|
4991
5079
|
}
|
|
4992
5080
|
Object.entries(this.styleButtons).forEach(function (_a) {
|
|
4993
|
-
var _b = __read$
|
|
5081
|
+
var _b = __read$c(_a, 2), buttonStyleName = _b[0], button = _b[1];
|
|
4994
5082
|
return button.setAttribute('aria-current', buttonStyleName === styleName ? 'true' : 'false');
|
|
4995
5083
|
});
|
|
4996
5084
|
this.map.styles.definitions().then(function (mapConfiguration) {
|
|
@@ -5079,7 +5167,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
5079
5167
|
_this.map.setStyle({ style: name });
|
|
5080
5168
|
}
|
|
5081
5169
|
Object.entries(_this.styleButtons).forEach(function (_a) {
|
|
5082
|
-
var _b = __read$
|
|
5170
|
+
var _b = __read$c(_a, 2), styleName = _b[0], button = _b[1];
|
|
5083
5171
|
return button.setAttribute('aria-current', styleName === name ? 'true' : 'false');
|
|
5084
5172
|
});
|
|
5085
5173
|
}
|
|
@@ -5171,7 +5259,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
5171
5259
|
});
|
|
5172
5260
|
var targetStyleName = this.map.getStyle().style;
|
|
5173
5261
|
Object.entries(this.styleButtons).forEach(function (_a) {
|
|
5174
|
-
var _b = __read$
|
|
5262
|
+
var _b = __read$c(_a, 2), styleName = _b[0], button = _b[1];
|
|
5175
5263
|
return button.setAttribute('aria-current', styleName === targetStyleName ? 'true' : 'false');
|
|
5176
5264
|
});
|
|
5177
5265
|
};
|
|
@@ -5432,7 +5520,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
5432
5520
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
5433
5521
|
};
|
|
5434
5522
|
})();
|
|
5435
|
-
var __values$
|
|
5523
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
5436
5524
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
5437
5525
|
if (m) return m.call(o);
|
|
5438
5526
|
if (o && typeof o.length === "number") return {
|
|
@@ -5503,7 +5591,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
5503
5591
|
// legend table contents
|
|
5504
5592
|
var tr2 = document.createElement("tr");
|
|
5505
5593
|
try {
|
|
5506
|
-
for (var _c = __values$
|
|
5594
|
+
for (var _c = __values$j(this.table), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
5507
5595
|
var col = _d.value;
|
|
5508
5596
|
var data = document.createElement("td");
|
|
5509
5597
|
if (col === "Fast" || col === "Slow") {
|
|
@@ -5516,7 +5604,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
5516
5604
|
data.setAttribute("aria-label", "Traffic Legend");
|
|
5517
5605
|
data.setAttribute("role", "img");
|
|
5518
5606
|
try {
|
|
5519
|
-
for (var col_1 = (e_2 = void 0, __values$
|
|
5607
|
+
for (var col_1 = (e_2 = void 0, __values$j(col)), col_1_1 = col_1.next(); !col_1_1.done; col_1_1 = col_1.next()) {
|
|
5520
5608
|
var color = col_1_1.value;
|
|
5521
5609
|
var div = document.createElement("div");
|
|
5522
5610
|
div.classList.add(color);
|
|
@@ -6452,7 +6540,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
6452
6540
|
return Point;
|
|
6453
6541
|
}());
|
|
6454
6542
|
|
|
6455
|
-
var __read$
|
|
6543
|
+
var __read$b = (window && window.__read) || function (o, n) {
|
|
6456
6544
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
6457
6545
|
if (!m) return o;
|
|
6458
6546
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -6468,7 +6556,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
6468
6556
|
}
|
|
6469
6557
|
return ar;
|
|
6470
6558
|
};
|
|
6471
|
-
var __values$
|
|
6559
|
+
var __values$i = (window && window.__values) || function(o) {
|
|
6472
6560
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
6473
6561
|
if (m) return m.call(o);
|
|
6474
6562
|
if (o && typeof o.length === "number") return {
|
|
@@ -7443,8 +7531,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
7443
7531
|
if (k + 1 >= coords.length) {
|
|
7444
7532
|
continue;
|
|
7445
7533
|
}
|
|
7446
|
-
var _a = __read$
|
|
7447
|
-
var _b = __read$
|
|
7534
|
+
var _a = __read$b(coords[k], 2), lon1 = _a[0], lat1 = _a[1];
|
|
7535
|
+
var _b = __read$b(coords[k + 1], 2), lon2 = _b[0], lat2 = _b[1];
|
|
7448
7536
|
// split the line by antimeridian
|
|
7449
7537
|
// and break geodesic into two line segments
|
|
7450
7538
|
if (Math.abs(lon2 - lon1) > 180.0) {
|
|
@@ -7515,8 +7603,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
7515
7603
|
if (k + 1 >= geodesic.length) {
|
|
7516
7604
|
continue;
|
|
7517
7605
|
}
|
|
7518
|
-
var _a = __read$
|
|
7519
|
-
var _b = __read$
|
|
7606
|
+
var _a = __read$b(geodesic[k], 2), lon1 = _a[0], lat1 = _a[1];
|
|
7607
|
+
var _b = __read$b(geodesic[k + 1], 2), lon2 = _b[0], lat2 = _b[1];
|
|
7520
7608
|
// split the line by antimeridian
|
|
7521
7609
|
// and break geodesic into two line segments
|
|
7522
7610
|
if (Math.abs(lon2 - lon1) > 180.0) {
|
|
@@ -7727,7 +7815,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
7727
7815
|
function getPixelHeading(origin, destination) {
|
|
7728
7816
|
origin = getPosition(origin);
|
|
7729
7817
|
destination = getPosition(destination);
|
|
7730
|
-
var _a = __read$
|
|
7818
|
+
var _a = __read$b(mercatorPositionsToPixels([origin, destination], 21), 2), p1 = _a[0], p2 = _a[1];
|
|
7731
7819
|
var dx = (p2[0] - p1[0]);
|
|
7732
7820
|
var dy = (p1[1] - p2[1]);
|
|
7733
7821
|
var alpha = ((5 / 2 * Math.PI) - Math.atan2(dy, dx)) * INV_PI_BY_180 % 360;
|
|
@@ -8274,7 +8362,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
8274
8362
|
});
|
|
8275
8363
|
var lower = [];
|
|
8276
8364
|
try {
|
|
8277
|
-
for (var positions_1 = __values$
|
|
8365
|
+
for (var positions_1 = __values$i(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
8278
8366
|
var position = positions_1_1.value;
|
|
8279
8367
|
while (lower.length >= 2 && _cross(lower[lower.length - 2], lower[lower.length - 1], position) <= 0) {
|
|
8280
8368
|
lower.pop();
|
|
@@ -8783,7 +8871,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
8783
8871
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
8784
8872
|
};
|
|
8785
8873
|
})();
|
|
8786
|
-
var __values$
|
|
8874
|
+
var __values$h = (window && window.__values) || function(o) {
|
|
8787
8875
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
8788
8876
|
if (m) return m.call(o);
|
|
8789
8877
|
if (o && typeof o.length === "number") return {
|
|
@@ -8870,7 +8958,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
8870
8958
|
else if (geoType === "MultiLineString") {
|
|
8871
8959
|
var pos = positions;
|
|
8872
8960
|
try {
|
|
8873
|
-
for (var pos_1 = __values$
|
|
8961
|
+
for (var pos_1 = __values$h(pos), pos_1_1 = pos_1.next(); !pos_1_1.done; pos_1_1 = pos_1.next()) {
|
|
8874
8962
|
var p = pos_1_1.value;
|
|
8875
8963
|
bbox = BoundingBox.merge(bbox, BoundingBox.fromPositions(p));
|
|
8876
8964
|
}
|
|
@@ -8886,7 +8974,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
8886
8974
|
else if (geoType === "MultiPolygon") {
|
|
8887
8975
|
var pos = positions;
|
|
8888
8976
|
try {
|
|
8889
|
-
for (var pos_2 = __values$
|
|
8977
|
+
for (var pos_2 = __values$h(pos), pos_2_1 = pos_2.next(); !pos_2_1.done; pos_2_1 = pos_2.next()) {
|
|
8890
8978
|
var p1 = pos_2_1.value;
|
|
8891
8979
|
// only need to check the exterior ring of Polygon
|
|
8892
8980
|
bbox = BoundingBox.merge(bbox, BoundingBox.fromPositions(p1[0]));
|
|
@@ -9109,7 +9197,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
9109
9197
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
9110
9198
|
};
|
|
9111
9199
|
})();
|
|
9112
|
-
var __values$
|
|
9200
|
+
var __values$g = (window && window.__values) || function(o) {
|
|
9113
9201
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
9114
9202
|
if (m) return m.call(o);
|
|
9115
9203
|
if (o && typeof o.length === "number") return {
|
|
@@ -9533,7 +9621,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
9533
9621
|
var bounds = null;
|
|
9534
9622
|
if (Array.isArray(data) && data.length > 0) {
|
|
9535
9623
|
try {
|
|
9536
|
-
for (var data_1 = __values$
|
|
9624
|
+
for (var data_1 = __values$g(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {
|
|
9537
9625
|
var datum = data_1_1.value;
|
|
9538
9626
|
tempBounds = BoundingBox.fromData(datum);
|
|
9539
9627
|
if (tempBounds != null) {
|
|
@@ -10106,7 +10194,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10106
10194
|
return SimplifyAP_1(points, tolerance, true);
|
|
10107
10195
|
}
|
|
10108
10196
|
|
|
10109
|
-
var __values$
|
|
10197
|
+
var __values$f = (window && window.__values) || function(o) {
|
|
10110
10198
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
10111
10199
|
if (m) return m.call(o);
|
|
10112
10200
|
if (o && typeof o.length === "number") return {
|
|
@@ -10166,7 +10254,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10166
10254
|
if (points && Array.isArray(points) && Array.isArray(points[0])) {
|
|
10167
10255
|
var pos = [];
|
|
10168
10256
|
try {
|
|
10169
|
-
for (var points_1 = __values$
|
|
10257
|
+
for (var points_1 = __values$f(points), points_1_1 = points_1.next(); !points_1_1.done; points_1_1 = points_1.next()) {
|
|
10170
10258
|
var subPoints = points_1_1.value;
|
|
10171
10259
|
pos.push(this.transform(subPoints, transformMatrix, decimals));
|
|
10172
10260
|
}
|
|
@@ -10541,6 +10629,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10541
10629
|
CompassControl: CompassControl,
|
|
10542
10630
|
ControlBase: ControlBase,
|
|
10543
10631
|
PitchControl: PitchControl,
|
|
10632
|
+
ScaleControl: ScaleControl,
|
|
10544
10633
|
StyleControl: StyleControl,
|
|
10545
10634
|
TrafficControl: TrafficControl,
|
|
10546
10635
|
TrafficLegendControl: TrafficLegendControl,
|
|
@@ -10824,7 +10913,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10824
10913
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
10825
10914
|
};
|
|
10826
10915
|
})();
|
|
10827
|
-
var __values$
|
|
10916
|
+
var __values$e = (window && window.__values) || function(o) {
|
|
10828
10917
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
10829
10918
|
if (m) return m.call(o);
|
|
10830
10919
|
if (o && typeof o.length === "number") return {
|
|
@@ -11023,7 +11112,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11023
11112
|
var e_1, _a;
|
|
11024
11113
|
var shapes = Array.isArray(shape) ? shape : [shape];
|
|
11025
11114
|
try {
|
|
11026
|
-
for (var shapes_1 = __values$
|
|
11115
|
+
for (var shapes_1 = __values$e(shapes), shapes_1_1 = shapes_1.next(); !shapes_1_1.done; shapes_1_1 = shapes_1.next()) {
|
|
11027
11116
|
var s = shapes_1_1.value;
|
|
11028
11117
|
if (typeof s === "number") {
|
|
11029
11118
|
this._removeByIndex(s);
|
|
@@ -11050,7 +11139,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11050
11139
|
var e_2, _a;
|
|
11051
11140
|
var ids = Array.isArray(id) ? id : [id];
|
|
11052
11141
|
try {
|
|
11053
|
-
for (var ids_1 = __values$
|
|
11142
|
+
for (var ids_1 = __values$e(ids), ids_1_1 = ids_1.next(); !ids_1_1.done; ids_1_1 = ids_1.next()) {
|
|
11054
11143
|
var i = ids_1_1.value;
|
|
11055
11144
|
this._removeById(i);
|
|
11056
11145
|
}
|
|
@@ -11214,7 +11303,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11214
11303
|
data = Array.isArray(data) ? data : [data];
|
|
11215
11304
|
if (typeof index !== "number") {
|
|
11216
11305
|
try {
|
|
11217
|
-
for (var data_1 = __values$
|
|
11306
|
+
for (var data_1 = __values$e(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) {
|
|
11218
11307
|
var d = data_1_1.value;
|
|
11219
11308
|
this.shapes.push(d);
|
|
11220
11309
|
this.shapesMap.set(d.getId(), this.shapes.length - 1);
|
|
@@ -11235,7 +11324,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11235
11324
|
}
|
|
11236
11325
|
}
|
|
11237
11326
|
try {
|
|
11238
|
-
for (var data_2 = __values$
|
|
11327
|
+
for (var data_2 = __values$e(data), data_2_1 = data_2.next(); !data_2_1.done; data_2_1 = data_2.next()) {
|
|
11239
11328
|
var d = data_2_1.value;
|
|
11240
11329
|
d._setDataSource(this);
|
|
11241
11330
|
}
|
|
@@ -12178,7 +12267,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
12178
12267
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
12179
12268
|
}
|
|
12180
12269
|
};
|
|
12181
|
-
var __read$
|
|
12270
|
+
var __read$a = (window && window.__read) || function (o, n) {
|
|
12182
12271
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
12183
12272
|
if (!m) return o;
|
|
12184
12273
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -12194,7 +12283,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
12194
12283
|
}
|
|
12195
12284
|
return ar;
|
|
12196
12285
|
};
|
|
12197
|
-
var __spreadArray$
|
|
12286
|
+
var __spreadArray$8 = (window && window.__spreadArray) || function (to, from, pack) {
|
|
12198
12287
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
12199
12288
|
if (ar || !(i in from)) {
|
|
12200
12289
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
@@ -12231,7 +12320,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
12231
12320
|
var bubbleFeature = curRenderedShape instanceof Shape ? curRenderedShape.toJson() : curRenderedShape;
|
|
12232
12321
|
var indicator = new AccessibleIndicator({ positionInSet: idx + 1, setSize: renderedShapes.length });
|
|
12233
12322
|
var element = indicator.getElement();
|
|
12234
|
-
var _a = __read$
|
|
12323
|
+
var _a = __read$a(_this.map.positionsToPixels([_this.getFirstCoordinate(bubbleFeature.geometry.coordinates)]), 1), pixel = _a[0];
|
|
12235
12324
|
element.addEventListener('focusin', function (event) {
|
|
12236
12325
|
_this.accessibleIndicator.filter(function (i) { return i !== indicator; }).forEach(function (indicator) { return indicator.remove(); });
|
|
12237
12326
|
// insert previous and next popups
|
|
@@ -12403,7 +12492,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
12403
12492
|
return undefined;
|
|
12404
12493
|
}
|
|
12405
12494
|
var mapConfiguration = this.map.getServiceOptions().mapConfiguration;
|
|
12406
|
-
return __spreadArray$
|
|
12495
|
+
return __spreadArray$8(__spreadArray$8([], __read$a(this.map.getCamera().bounds), false), [
|
|
12407
12496
|
this.map.getCamera().zoom,
|
|
12408
12497
|
this.map.getCamera().pitch,
|
|
12409
12498
|
this.map.getStyle().style,
|
|
@@ -13543,42 +13632,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13543
13632
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13544
13633
|
};
|
|
13545
13634
|
})();
|
|
13546
|
-
var __values$e = (window && window.__values) || function(o) {
|
|
13547
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
13548
|
-
if (m) return m.call(o);
|
|
13549
|
-
if (o && typeof o.length === "number") return {
|
|
13550
|
-
next: function () {
|
|
13551
|
-
if (o && i >= o.length) o = void 0;
|
|
13552
|
-
return { value: o && o[i++], done: !o };
|
|
13553
|
-
}
|
|
13554
|
-
};
|
|
13555
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
13556
|
-
};
|
|
13557
|
-
var __read$a = (window && window.__read) || function (o, n) {
|
|
13558
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
13559
|
-
if (!m) return o;
|
|
13560
|
-
var i = m.call(o), r, ar = [], e;
|
|
13561
|
-
try {
|
|
13562
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
13563
|
-
}
|
|
13564
|
-
catch (error) { e = { error: error }; }
|
|
13565
|
-
finally {
|
|
13566
|
-
try {
|
|
13567
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13568
|
-
}
|
|
13569
|
-
finally { if (e) throw e.error; }
|
|
13570
|
-
}
|
|
13571
|
-
return ar;
|
|
13572
|
-
};
|
|
13573
|
-
var __spreadArray$8 = (window && window.__spreadArray) || function (to, from, pack) {
|
|
13574
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
13575
|
-
if (ar || !(i in from)) {
|
|
13576
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
13577
|
-
ar[i] = from[i];
|
|
13578
|
-
}
|
|
13579
|
-
}
|
|
13580
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
13581
|
-
};
|
|
13582
13635
|
/**
|
|
13583
13636
|
* Options used when rendering Polygon and MultiPolygon objects in a PolygonLayer.
|
|
13584
13637
|
*/
|
|
@@ -13614,50 +13667,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13614
13667
|
_this.fillPattern = undefined;
|
|
13615
13668
|
return _this;
|
|
13616
13669
|
}
|
|
13617
|
-
/**
|
|
13618
|
-
* Override the standard merge behavior to set fillPattern and fillColor to be mutually exclusive
|
|
13619
|
-
* @internal
|
|
13620
|
-
*/
|
|
13621
|
-
PolygonLayerOptions.prototype.merge = function () {
|
|
13622
|
-
var e_1, _a;
|
|
13623
|
-
var valueList = [];
|
|
13624
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
13625
|
-
valueList[_i] = arguments[_i];
|
|
13626
|
-
}
|
|
13627
|
-
var isNewColorSet = false;
|
|
13628
|
-
var isNewPatternSet = false;
|
|
13629
|
-
try {
|
|
13630
|
-
for (var valueList_1 = __values$e(valueList), valueList_1_1 = valueList_1.next(); !valueList_1_1.done; valueList_1_1 = valueList_1.next()) {
|
|
13631
|
-
var value = valueList_1_1.value;
|
|
13632
|
-
if (value) {
|
|
13633
|
-
if (value.hasOwnProperty("fillColor")) {
|
|
13634
|
-
isNewColorSet = true;
|
|
13635
|
-
isNewPatternSet = false;
|
|
13636
|
-
}
|
|
13637
|
-
else if (value.hasOwnProperty("fillPattern")) {
|
|
13638
|
-
isNewPatternSet = true;
|
|
13639
|
-
isNewColorSet = false;
|
|
13640
|
-
}
|
|
13641
|
-
}
|
|
13642
|
-
}
|
|
13643
|
-
}
|
|
13644
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
13645
|
-
finally {
|
|
13646
|
-
try {
|
|
13647
|
-
if (valueList_1_1 && !valueList_1_1.done && (_a = valueList_1.return)) _a.call(valueList_1);
|
|
13648
|
-
}
|
|
13649
|
-
finally { if (e_1) throw e_1.error; }
|
|
13650
|
-
}
|
|
13651
|
-
// Then execute the standard merge behavior.
|
|
13652
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$a(valueList), false));
|
|
13653
|
-
if (isNewColorSet) {
|
|
13654
|
-
merged.fillPattern = undefined;
|
|
13655
|
-
}
|
|
13656
|
-
else if (isNewPatternSet) {
|
|
13657
|
-
merged.fillColor = undefined;
|
|
13658
|
-
}
|
|
13659
|
-
return merged;
|
|
13660
|
-
};
|
|
13661
13670
|
return PolygonLayerOptions;
|
|
13662
13671
|
}(LayerOptions$1));
|
|
13663
13672
|
|
|
@@ -13709,6 +13718,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13709
13718
|
};
|
|
13710
13719
|
/**
|
|
13711
13720
|
* Sets the options of the polygon layer.
|
|
13721
|
+
* When `fillPattern` is set, `fillColor` will be ignored.
|
|
13722
|
+
* To set `fillColor`, make sure `fillPattern` is set to `undefined`.
|
|
13712
13723
|
* @param newOptions The new options of the polygon layer.
|
|
13713
13724
|
*/
|
|
13714
13725
|
PolygonLayer.prototype.setOptions = function (options) {
|
|
@@ -19981,59 +19992,59 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
19981
19992
|
var features = this.map._getMap().querySourceFeatures(sourceID, { sourceLayer: sourceLayer, filter: filter });
|
|
19982
19993
|
return this.map.sources._mapFeaturesToShapes(features, true, this.sources.get(sourceID));
|
|
19983
19994
|
};
|
|
19984
|
-
|
|
19985
|
-
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
|
|
19990
|
-
|
|
19991
|
-
|
|
19992
|
-
|
|
19993
|
-
|
|
19994
|
-
|
|
19995
|
-
|
|
19996
|
-
|
|
19997
|
-
|
|
19998
|
-
|
|
19999
|
-
|
|
20000
|
-
|
|
20001
|
-
|
|
20002
|
-
|
|
20003
|
-
|
|
20004
|
-
|
|
20005
|
-
|
|
20006
|
-
|
|
20007
|
-
|
|
20008
|
-
|
|
20009
|
-
|
|
20010
|
-
|
|
20011
|
-
|
|
20012
|
-
|
|
20013
|
-
|
|
20014
|
-
|
|
20015
|
-
|
|
20016
|
-
|
|
20017
|
-
|
|
20018
|
-
|
|
20019
|
-
|
|
20020
|
-
|
|
20021
|
-
|
|
20022
|
-
|
|
20023
|
-
|
|
20024
|
-
|
|
20025
|
-
|
|
20026
|
-
|
|
20027
|
-
|
|
20028
|
-
|
|
20029
|
-
|
|
20030
|
-
|
|
20031
|
-
|
|
20032
|
-
|
|
20033
|
-
|
|
20034
|
-
|
|
20035
|
-
|
|
20036
|
-
|
|
19995
|
+
/**
|
|
19996
|
+
* Gets the state of a feature
|
|
19997
|
+
* @param feature the ID of the feature
|
|
19998
|
+
* @param source the ID of the source
|
|
19999
|
+
* @param sourceLayer the ID of the layer
|
|
20000
|
+
*/
|
|
20001
|
+
SourceManager.prototype.getFeatureState = function (feature, source, sourceLayer) {
|
|
20002
|
+
var featureId;
|
|
20003
|
+
if (typeof feature === "string") {
|
|
20004
|
+
featureId = feature;
|
|
20005
|
+
}
|
|
20006
|
+
else {
|
|
20007
|
+
featureId = feature instanceof Shape ? feature.getId() : feature.id;
|
|
20008
|
+
}
|
|
20009
|
+
var featureSource = typeof source === "string" ? source : source.getId();
|
|
20010
|
+
return this.map._getMap().getFeatureState({ id: featureId, source: featureSource, sourceLayer: sourceLayer });
|
|
20011
|
+
};
|
|
20012
|
+
/**
|
|
20013
|
+
* Removes the state or a single key value of the state of a feature.
|
|
20014
|
+
* @param feature the ID of the feature
|
|
20015
|
+
* @param source the ID of the source
|
|
20016
|
+
* @param sourceLayer the ID of the layer
|
|
20017
|
+
* @param key the key in the feature state to update
|
|
20018
|
+
*/
|
|
20019
|
+
SourceManager.prototype.removeFeatureState = function (feature, source, sourceLayer, key) {
|
|
20020
|
+
var featureId;
|
|
20021
|
+
if (typeof feature === "string") {
|
|
20022
|
+
featureId = feature;
|
|
20023
|
+
}
|
|
20024
|
+
else {
|
|
20025
|
+
featureId = feature instanceof Shape ? feature.getId() : feature.id;
|
|
20026
|
+
}
|
|
20027
|
+
var featureSource = typeof source === "string" ? source : source.getId();
|
|
20028
|
+
this.map._getMap().removeFeatureState({ id: featureId, source: featureSource, sourceLayer: sourceLayer }, key);
|
|
20029
|
+
};
|
|
20030
|
+
/**
|
|
20031
|
+
* Sets the state of the feature by passing in a key value pair object.
|
|
20032
|
+
* @param feature the ID of the feature
|
|
20033
|
+
* @param source the ID of the source
|
|
20034
|
+
* @param sourceLayer the ID of the layer
|
|
20035
|
+
* @param key the key in the feature state to update
|
|
20036
|
+
*/
|
|
20037
|
+
SourceManager.prototype.setFeatureState = function (feature, source, state, sourceLayer) {
|
|
20038
|
+
var featureId;
|
|
20039
|
+
if (typeof feature === "string") {
|
|
20040
|
+
featureId = feature;
|
|
20041
|
+
}
|
|
20042
|
+
else {
|
|
20043
|
+
featureId = feature instanceof Shape ? feature.getId() : feature.id;
|
|
20044
|
+
}
|
|
20045
|
+
var featureSource = typeof source === "string" ? source : source.getId();
|
|
20046
|
+
this.map._getMap().setFeatureState({ id: featureId, source: featureSource, sourceLayer: sourceLayer }, state);
|
|
20047
|
+
};
|
|
20037
20048
|
/**
|
|
20038
20049
|
* @internal
|
|
20039
20050
|
*/
|
|
@@ -21298,8 +21309,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21298
21309
|
*/
|
|
21299
21310
|
_this.styleSet = undefined;
|
|
21300
21311
|
/**
|
|
21301
|
-
* Enable accessibility
|
|
21302
|
-
*
|
|
21312
|
+
* Enable the accessibility feature to provide screen reader support for users who have difficulty visualizing the web application.
|
|
21313
|
+
* This property is set to true by default.
|
|
21303
21314
|
* @default true
|
|
21304
21315
|
*/
|
|
21305
21316
|
_this.enableAccessibility = true;
|
|
@@ -22137,14 +22148,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
22137
22148
|
return !previousStyle
|
|
22138
22149
|
? nextStyle
|
|
22139
22150
|
: this.map.layers._getUserLayers().reduce(function (style, userLayer) {
|
|
22151
|
+
var _a, _b;
|
|
22140
22152
|
if (userLayer.layer instanceof WebGLLayer) {
|
|
22141
22153
|
// mapbox custom layers cannot be serialized and preserved,
|
|
22142
22154
|
// return to continue to the next user layer.
|
|
22143
22155
|
return style;
|
|
22144
22156
|
}
|
|
22145
|
-
var
|
|
22146
|
-
? layerGroupLayers[userLayer.before][0]
|
|
22147
|
-
: undefined;
|
|
22157
|
+
var beforeLayerId = ((_b = (_a = layerGroupLayers === null || layerGroupLayers === void 0 ? void 0 : layerGroupLayers[userLayer.before]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id) || userLayer.before;
|
|
22148
22158
|
var layer = previousStyle.layers.find(function (layer) { return layer.id === userLayer.layer.getId(); });
|
|
22149
22159
|
// when setStyle diff attempt is unsuccesful, _load will be called on the style that may have already injected user layers -> clean it up
|
|
22150
22160
|
var existingLayerIdx = nextStyle.layers.findIndex(function (layer) { return layer.id === userLayer.layer.getId(); });
|
|
@@ -22155,7 +22165,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
22155
22165
|
var sourcesToCopy = new Set(Array.from(userLayer.layer._getSourceIds())
|
|
22156
22166
|
.map(function (sourceId) { return previousStyle.sources[sourceId] ? { source: previousStyle.sources[sourceId], id: sourceId } : undefined; })
|
|
22157
22167
|
.filter(function (source) { return source !== undefined; }));
|
|
22158
|
-
var insertIdx =
|
|
22168
|
+
var insertIdx = beforeLayerId ? style.layers.findIndex(function (layer) { return layer.id === beforeLayerId; }) : -1;
|
|
22159
22169
|
if (insertIdx > -1) {
|
|
22160
22170
|
style.layers.splice(insertIdx, 0, layer);
|
|
22161
22171
|
}
|