azure-maps-control 2.2.3 → 2.2.5
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.js +448 -93
- package/dist/atlas-core-bare.js +623 -139
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +448 -93
- package/dist/atlas-core.js +623 -139
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.css +4 -28
- package/dist/atlas.js +623 -139
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +4 -0
|
@@ -265,7 +265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
265
265
|
return Url;
|
|
266
266
|
}());
|
|
267
267
|
|
|
268
|
-
var version = "2.2.
|
|
268
|
+
var version = "2.2.5";
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -306,27 +306,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
306
306
|
var tooltipContent = document.createElement("span");
|
|
307
307
|
tooltipContent.innerText = name;
|
|
308
308
|
tooltipContent.classList.add('tooltiptext');
|
|
309
|
-
// mimics default edge tooltip theming
|
|
310
|
-
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
311
|
-
tooltipContent.classList.add('dark');
|
|
312
|
-
}
|
|
313
|
-
var themeQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
314
|
-
var onThemeChange = function (e) {
|
|
315
|
-
var isDark = e.matches;
|
|
316
|
-
if (isDark && !tooltipContent.classList.contains('dark')) {
|
|
317
|
-
tooltipContent.classList.add('dark');
|
|
318
|
-
}
|
|
319
|
-
else if (!isDark && tooltipContent.classList.contains('dark')) {
|
|
320
|
-
tooltipContent.classList.remove('dark');
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
// compensate for browsers where MediaQueryList is not derived from EventTarget (pre iOS13 Safari)
|
|
324
|
-
if (typeof themeQuery.addEventListener === 'function') {
|
|
325
|
-
themeQuery.addEventListener('change', function (e) { return onThemeChange(e); });
|
|
326
|
-
}
|
|
327
|
-
else if (typeof themeQuery.addListener === 'function') {
|
|
328
|
-
themeQuery.addListener(function (e) { return onThemeChange(e); });
|
|
329
|
-
}
|
|
330
309
|
if (navigator.userAgent.indexOf('Edg') != -1) {
|
|
331
310
|
tooltipContent.classList.add('edge');
|
|
332
311
|
}
|
|
@@ -4514,6 +4493,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
4514
4493
|
}
|
|
4515
4494
|
});
|
|
4516
4495
|
container.addEventListener("focusout", function (event) {
|
|
4496
|
+
if (event.target === currStyleButton) {
|
|
4497
|
+
// on focusout from reveal button -> reset the tabIndex on the styleOpsGrid elements that could have been set to -1 on esc key press
|
|
4498
|
+
Array.from(styleOpsGrid.children).forEach(function (e) { return e.removeAttribute('tabIndex'); });
|
|
4499
|
+
}
|
|
4517
4500
|
if (!(event.relatedTarget instanceof Node && container.contains(event.relatedTarget))) {
|
|
4518
4501
|
_this.hasFocus = false;
|
|
4519
4502
|
if (!_this.hasMouse) {
|
|
@@ -4528,6 +4511,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
4528
4511
|
if (event.keyCode === 27) {
|
|
4529
4512
|
event.stopPropagation();
|
|
4530
4513
|
currStyleButton.focus();
|
|
4514
|
+
Array.from(styleOpsGrid.children).forEach(function (e) { return e.setAttribute('tabIndex', "-1"); });
|
|
4531
4515
|
if (container.classList.contains(StyleControl.Css.inUse)) {
|
|
4532
4516
|
container.classList.remove(StyleControl.Css.inUse);
|
|
4533
4517
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
@@ -10120,6 +10104,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10120
10104
|
|
|
10121
10105
|
var cloneDeepWith_1 = cloneDeepWith;
|
|
10122
10106
|
|
|
10107
|
+
/**
|
|
10108
|
+
* A hidden HTML element that is used to provide accessibility to shapes such as bubble.
|
|
10109
|
+
*/
|
|
10110
|
+
var AccessibleIndicator = /** @class */ (function () {
|
|
10111
|
+
/**
|
|
10112
|
+
* Constructs an AccessibleIndicator object by initializing a hidden `div` element.
|
|
10113
|
+
* @internal
|
|
10114
|
+
*/
|
|
10115
|
+
function AccessibleIndicator(options) {
|
|
10116
|
+
var _this = this;
|
|
10117
|
+
/**
|
|
10118
|
+
* Attaches the indicator to the HTML document in a hidden style.
|
|
10119
|
+
* @param map The map.
|
|
10120
|
+
*/
|
|
10121
|
+
this.attach = function (map) {
|
|
10122
|
+
// If attaching to a different map, remove popup on current map
|
|
10123
|
+
if (_this.map !== map) {
|
|
10124
|
+
// If map was defined the indicator was attached to another map.
|
|
10125
|
+
if (_this.map) {
|
|
10126
|
+
_this.detachFromCurrentMap();
|
|
10127
|
+
}
|
|
10128
|
+
_this.map = map;
|
|
10129
|
+
_this.map.indicators._getCollectionDiv().appendChild(_this.element);
|
|
10130
|
+
_this.map.indicators.add(_this);
|
|
10131
|
+
}
|
|
10132
|
+
};
|
|
10133
|
+
/**
|
|
10134
|
+
* Removes the indicator from the map and the HTML document.
|
|
10135
|
+
*/
|
|
10136
|
+
this.remove = function () {
|
|
10137
|
+
_this.detachFromCurrentMap();
|
|
10138
|
+
_this.element.remove();
|
|
10139
|
+
};
|
|
10140
|
+
/**
|
|
10141
|
+
* Get the DOM element of the indicator.
|
|
10142
|
+
* @returns The DOM element of the indicator.
|
|
10143
|
+
*/
|
|
10144
|
+
this.getElement = function () {
|
|
10145
|
+
return _this.element;
|
|
10146
|
+
};
|
|
10147
|
+
this.detachFromCurrentMap = function () {
|
|
10148
|
+
if (_this.map) {
|
|
10149
|
+
_this.map.indicators.remove(_this);
|
|
10150
|
+
delete _this.map;
|
|
10151
|
+
}
|
|
10152
|
+
};
|
|
10153
|
+
this.element = document.createElement("div");
|
|
10154
|
+
// Set tabindex to 0 to make the element focusable.
|
|
10155
|
+
this.element.setAttribute("tabindex", "0");
|
|
10156
|
+
// Set the role to option, and it's container to listbox so the reader will read the listbox as a list.
|
|
10157
|
+
// For example, NVDA will read "data point, {posinset} of {setsize}" when the indicator is focused.
|
|
10158
|
+
this.element.setAttribute("role", "option");
|
|
10159
|
+
if (options === null || options === void 0 ? void 0 : options.setSize)
|
|
10160
|
+
this.element.setAttribute("aria-setsize", options.setSize.toString());
|
|
10161
|
+
if (options === null || options === void 0 ? void 0 : options.positionInSet)
|
|
10162
|
+
this.element.setAttribute("aria-posinset", options.positionInSet.toString());
|
|
10163
|
+
this.element.setAttribute("aria-label", "data point");
|
|
10164
|
+
this.element.classList.add(AccessibleIndicator.Css.hidden);
|
|
10165
|
+
}
|
|
10166
|
+
// CSS class names.
|
|
10167
|
+
AccessibleIndicator.Css = {
|
|
10168
|
+
hidden: "hidden-accessible-element"
|
|
10169
|
+
};
|
|
10170
|
+
return AccessibleIndicator;
|
|
10171
|
+
}());
|
|
10172
|
+
|
|
10123
10173
|
var __extends$k = (window && window.__extends) || (function () {
|
|
10124
10174
|
var extendStatics = function (d, b) {
|
|
10125
10175
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -10978,7 +11028,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10978
11028
|
// and can be used to determine which events are ours vs Mapbox's.
|
|
10979
11029
|
Layer.LayerEvents = {
|
|
10980
11030
|
layeradded: undefined,
|
|
10981
|
-
layerremoved: undefined
|
|
11031
|
+
layerremoved: undefined,
|
|
11032
|
+
focusin: undefined,
|
|
11033
|
+
focusout: undefined,
|
|
10982
11034
|
};
|
|
10983
11035
|
return Layer;
|
|
10984
11036
|
}(EventEmitter));
|
|
@@ -11133,6 +11185,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11133
11185
|
* @default 8
|
|
11134
11186
|
*/
|
|
11135
11187
|
_this.radius = 8;
|
|
11188
|
+
/**
|
|
11189
|
+
* @internal
|
|
11190
|
+
* Specifies whether to create focusable indicators for the bubbles.
|
|
11191
|
+
*
|
|
11192
|
+
* Note: We treat this as an internal option for now because we hadn't fully decided the default styling for the indicators.
|
|
11193
|
+
* Once we decide, we will make this a public option or remove it.
|
|
11194
|
+
*/
|
|
11195
|
+
_this.createIndicators = false;
|
|
11136
11196
|
return _this;
|
|
11137
11197
|
}
|
|
11138
11198
|
return BubbleLayerOptions;
|
|
@@ -11153,6 +11213,58 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11153
11213
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
11154
11214
|
};
|
|
11155
11215
|
})();
|
|
11216
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11217
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11218
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11219
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11220
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11221
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11222
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11223
|
+
});
|
|
11224
|
+
};
|
|
11225
|
+
var __generator$1 = (window && window.__generator) || function (thisArg, body) {
|
|
11226
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
11227
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
11228
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
11229
|
+
function step(op) {
|
|
11230
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
11231
|
+
while (_) try {
|
|
11232
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
11233
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
11234
|
+
switch (op[0]) {
|
|
11235
|
+
case 0: case 1: t = op; break;
|
|
11236
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
11237
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
11238
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
11239
|
+
default:
|
|
11240
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
11241
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
11242
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
11243
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
11244
|
+
if (t[2]) _.ops.pop();
|
|
11245
|
+
_.trys.pop(); continue;
|
|
11246
|
+
}
|
|
11247
|
+
op = body.call(thisArg, _);
|
|
11248
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
11249
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
11250
|
+
}
|
|
11251
|
+
};
|
|
11252
|
+
var __read$3 = (window && window.__read) || function (o, n) {
|
|
11253
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
11254
|
+
if (!m) return o;
|
|
11255
|
+
var i = m.call(o), r, ar = [], e;
|
|
11256
|
+
try {
|
|
11257
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
11258
|
+
}
|
|
11259
|
+
catch (error) { e = { error: error }; }
|
|
11260
|
+
finally {
|
|
11261
|
+
try {
|
|
11262
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
11263
|
+
}
|
|
11264
|
+
finally { if (e) throw e.error; }
|
|
11265
|
+
}
|
|
11266
|
+
return ar;
|
|
11267
|
+
};
|
|
11156
11268
|
/**
|
|
11157
11269
|
* Renders Point objects as scalable circles (bubbles).
|
|
11158
11270
|
*/
|
|
@@ -11166,6 +11278,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11166
11278
|
*/
|
|
11167
11279
|
function BubbleLayer(source, id, options) {
|
|
11168
11280
|
var _this = _super.call(this, id) || this;
|
|
11281
|
+
_this.accessibleIndicator = [];
|
|
11282
|
+
_this.setAccessibleIndicator = function () { return __awaiter$1(_this, void 0, void 0, function () {
|
|
11283
|
+
var features, createIndicator, insertHiddenBefore, attach;
|
|
11284
|
+
var _this = this;
|
|
11285
|
+
return __generator$1(this, function (_a) {
|
|
11286
|
+
this.accessibleIndicator.forEach(function (indicator) { return indicator.remove(); });
|
|
11287
|
+
this.accessibleIndicator = [];
|
|
11288
|
+
features = this.map.layers.getRenderedShapes(this.map.getCamera().bounds, this);
|
|
11289
|
+
createIndicator = function (features, idx) {
|
|
11290
|
+
var bubbleFeature = features[idx];
|
|
11291
|
+
var indicator = new AccessibleIndicator({ positionInSet: idx + 1, setSize: features.length });
|
|
11292
|
+
var element = indicator.getElement();
|
|
11293
|
+
var _a = __read$3(_this.map.positionsToPixels([bubbleFeature.data.geometry.coordinates]), 1), pixel = _a[0];
|
|
11294
|
+
element.addEventListener('focusin', function (event) {
|
|
11295
|
+
_this.accessibleIndicator.filter(function (p) { return p !== indicator; }).forEach(function (popup) { return popup.remove(); });
|
|
11296
|
+
// insert previous and next popups
|
|
11297
|
+
if (idx - 1 >= 0) {
|
|
11298
|
+
insertHiddenBefore(indicator, createIndicator(features, idx - 1));
|
|
11299
|
+
}
|
|
11300
|
+
if (idx + 1 < features.length) {
|
|
11301
|
+
attach(createIndicator(features, idx + 1));
|
|
11302
|
+
}
|
|
11303
|
+
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], '#000000', _this.options.strokeColor]);
|
|
11304
|
+
var focusEvent = {
|
|
11305
|
+
target: element,
|
|
11306
|
+
type: 'focusin',
|
|
11307
|
+
map: _this.map,
|
|
11308
|
+
shape: bubbleFeature,
|
|
11309
|
+
originalEvent: event,
|
|
11310
|
+
pixel: pixel
|
|
11311
|
+
};
|
|
11312
|
+
_this._invokeEvent('focusin', focusEvent);
|
|
11313
|
+
});
|
|
11314
|
+
element.addEventListener('focusout', function (event) {
|
|
11315
|
+
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], _this.options.strokeColor, _this.options.strokeColor]);
|
|
11316
|
+
var focusEvent = {
|
|
11317
|
+
target: element,
|
|
11318
|
+
type: 'focusout',
|
|
11319
|
+
map: _this.map,
|
|
11320
|
+
shape: bubbleFeature,
|
|
11321
|
+
originalEvent: event,
|
|
11322
|
+
pixel: pixel
|
|
11323
|
+
};
|
|
11324
|
+
_this._invokeEvent('focusout', focusEvent);
|
|
11325
|
+
});
|
|
11326
|
+
_this.accessibleIndicator.push(indicator);
|
|
11327
|
+
return indicator;
|
|
11328
|
+
};
|
|
11329
|
+
insertHiddenBefore = function (base, toInsert) {
|
|
11330
|
+
toInsert.attach(_this.map);
|
|
11331
|
+
var elementToSwapIn = toInsert.getElement();
|
|
11332
|
+
var baseElement = base.getElement();
|
|
11333
|
+
baseElement.parentElement.insertBefore(elementToSwapIn, baseElement);
|
|
11334
|
+
};
|
|
11335
|
+
attach = function (popup) {
|
|
11336
|
+
popup.attach(_this.map);
|
|
11337
|
+
};
|
|
11338
|
+
if (features.length > 0) {
|
|
11339
|
+
attach(createIndicator(features, 0));
|
|
11340
|
+
}
|
|
11341
|
+
if (features.length > 1) {
|
|
11342
|
+
attach(createIndicator(features, features.length - 1));
|
|
11343
|
+
}
|
|
11344
|
+
return [2 /*return*/];
|
|
11345
|
+
});
|
|
11346
|
+
}); };
|
|
11169
11347
|
_this.options = new BubbleLayerOptions().merge(cloneDeepWith_1(options, BubbleLayerOptions._cloneCustomizer));
|
|
11170
11348
|
_this.options.source = source || _this.options.source;
|
|
11171
11349
|
return _this;
|
|
@@ -11213,6 +11391,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11213
11391
|
}
|
|
11214
11392
|
this.options = newOptions;
|
|
11215
11393
|
};
|
|
11394
|
+
BubbleLayer.prototype.onAdd = function (map) {
|
|
11395
|
+
_super.prototype.onAdd.call(this, map);
|
|
11396
|
+
if (this.options.createIndicators) {
|
|
11397
|
+
map.events.addOnce('idle', this.setAccessibleIndicator);
|
|
11398
|
+
map.events.add('moveend', this.setAccessibleIndicator);
|
|
11399
|
+
}
|
|
11400
|
+
};
|
|
11401
|
+
BubbleLayer.prototype.onRemove = function () {
|
|
11402
|
+
_super.prototype.onRemove.call(this);
|
|
11403
|
+
if (this.options.createIndicators) {
|
|
11404
|
+
this.map.events.remove('idle', this.setAccessibleIndicator);
|
|
11405
|
+
this.map.events.remove('moveend', this.setAccessibleIndicator);
|
|
11406
|
+
}
|
|
11407
|
+
};
|
|
11216
11408
|
/**
|
|
11217
11409
|
* @internal
|
|
11218
11410
|
*/
|
|
@@ -12331,7 +12523,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
12331
12523
|
};
|
|
12332
12524
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12333
12525
|
};
|
|
12334
|
-
var __read$
|
|
12526
|
+
var __read$4 = (window && window.__read) || function (o, n) {
|
|
12335
12527
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
12336
12528
|
if (!m) return o;
|
|
12337
12529
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -12422,7 +12614,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
12422
12614
|
finally { if (e_1) throw e_1.error; }
|
|
12423
12615
|
}
|
|
12424
12616
|
// Then execute the standard merge behavior.
|
|
12425
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$
|
|
12617
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$4(valueList)));
|
|
12426
12618
|
if (isNewColorSet) {
|
|
12427
12619
|
merged.fillPattern = undefined;
|
|
12428
12620
|
}
|
|
@@ -13753,7 +13945,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13753
13945
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13754
13946
|
};
|
|
13755
13947
|
})();
|
|
13756
|
-
var __read$
|
|
13948
|
+
var __read$5 = (window && window.__read) || function (o, n) {
|
|
13757
13949
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
13758
13950
|
if (!m) return o;
|
|
13759
13951
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -13865,7 +14057,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13865
14057
|
*/
|
|
13866
14058
|
_this._onDown = function (event) {
|
|
13867
14059
|
_this.map.popups._addDraggedPopup(_this);
|
|
13868
|
-
var _a = __read$
|
|
14060
|
+
var _a = __read$5(_this.map.positionsToPixels([_this.options.position]), 1), anchorPixel = _a[0];
|
|
13869
14061
|
if (event.type === "mousedown") {
|
|
13870
14062
|
event = event;
|
|
13871
14063
|
_this.dragOffset = [
|
|
@@ -14029,7 +14221,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
14029
14221
|
pixel[0] + this.dragOffset[0],
|
|
14030
14222
|
pixel[1] + this.dragOffset[1]
|
|
14031
14223
|
];
|
|
14032
|
-
var _a = __read$
|
|
14224
|
+
var _a = __read$5(this.map.pixelsToPositions([anchorPixel]), 1), anchorPos = _a[0];
|
|
14033
14225
|
this.options.position = anchorPos;
|
|
14034
14226
|
this.marker.setLngLat(this.options.position);
|
|
14035
14227
|
this._invokeEvent("drag", { type: "drag", target: this });
|
|
@@ -14183,7 +14375,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
14183
14375
|
posY = pt.y;
|
|
14184
14376
|
}
|
|
14185
14377
|
else {
|
|
14186
|
-
var _a = __read$
|
|
14378
|
+
var _a = __read$5(map.positionsToPixels([options.position]), 1), _b = __read$5(_a[0], 2), x = _b[0], y = _b[1];
|
|
14187
14379
|
posX = x;
|
|
14188
14380
|
posY = y;
|
|
14189
14381
|
}
|
|
@@ -15100,7 +15292,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15100
15292
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15101
15293
|
};
|
|
15102
15294
|
})();
|
|
15103
|
-
var __read$
|
|
15295
|
+
var __read$6 = (window && window.__read) || function (o, n) {
|
|
15104
15296
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15105
15297
|
if (!m) return o;
|
|
15106
15298
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -15253,7 +15445,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15253
15445
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
15254
15446
|
valueList[_i] = arguments[_i];
|
|
15255
15447
|
}
|
|
15256
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$
|
|
15448
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$6(valueList)));
|
|
15257
15449
|
if (merged.authType === exports.AuthenticationType.subscriptionKey) {
|
|
15258
15450
|
merged.authContext = merged.aadAppId = merged.getToken = undefined;
|
|
15259
15451
|
}
|
|
@@ -15952,7 +16144,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15952
16144
|
return __assign$4.apply(this, arguments);
|
|
15953
16145
|
};
|
|
15954
16146
|
|
|
15955
|
-
var __awaiter$
|
|
16147
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15956
16148
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15957
16149
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15958
16150
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -15961,7 +16153,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15961
16153
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15962
16154
|
});
|
|
15963
16155
|
};
|
|
15964
|
-
var __generator$
|
|
16156
|
+
var __generator$2 = (window && window.__generator) || function (thisArg, body) {
|
|
15965
16157
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15966
16158
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
15967
16159
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -15988,7 +16180,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15988
16180
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
15989
16181
|
}
|
|
15990
16182
|
};
|
|
15991
|
-
var __read$
|
|
16183
|
+
var __read$7 = (window && window.__read) || function (o, n) {
|
|
15992
16184
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15993
16185
|
if (!m) return o;
|
|
15994
16186
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -16004,6 +16196,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16004
16196
|
}
|
|
16005
16197
|
return ar;
|
|
16006
16198
|
};
|
|
16199
|
+
var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
|
|
16200
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
16201
|
+
to[j] = from[i];
|
|
16202
|
+
return to;
|
|
16203
|
+
};
|
|
16007
16204
|
|
|
16008
16205
|
/**
|
|
16009
16206
|
* @private
|
|
@@ -16140,14 +16337,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16140
16337
|
var trafficOptions = _this.map.getTraffic();
|
|
16141
16338
|
if (trafficOptions.flow !== "none") {
|
|
16142
16339
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + trafficOptions.flow);
|
|
16340
|
+
if (!trafficFlowComponent && ['absolute', 'relative-delay'].includes(trafficOptions.flow)) {
|
|
16341
|
+
// Fallback to relative if deprecated flow type is used
|
|
16342
|
+
trafficFlowComponent = _this.map.layers.getLayerById("traffic_relative");
|
|
16343
|
+
}
|
|
16143
16344
|
if (trafficFlowComponent) {
|
|
16144
|
-
_this.lastFlowMode =
|
|
16345
|
+
_this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
|
|
16145
16346
|
trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
|
|
16146
16347
|
}
|
|
16147
16348
|
}
|
|
16148
16349
|
};
|
|
16149
16350
|
this.removeFromMap = function () {
|
|
16150
|
-
var trafficOptions = _this.map.getTraffic();
|
|
16151
16351
|
if (_this.lastFlowMode != "none") {
|
|
16152
16352
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
|
|
16153
16353
|
if (trafficFlowComponent) {
|
|
@@ -16881,7 +17081,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16881
17081
|
};
|
|
16882
17082
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
16883
17083
|
};
|
|
16884
|
-
var __read$
|
|
17084
|
+
var __read$8 = (window && window.__read) || function (o, n) {
|
|
16885
17085
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
16886
17086
|
if (!m) return o;
|
|
16887
17087
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -17079,7 +17279,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17079
17279
|
var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
|
|
17080
17280
|
if (callbacks) {
|
|
17081
17281
|
callbacks.forEach(function (_a, callback) {
|
|
17082
|
-
var _b = __read$
|
|
17282
|
+
var _b = __read$8(_a, 2), _ = _b[0], once = _b[1];
|
|
17083
17283
|
// Invoking a listener this way circumvents the fire once logic in the modified callback.
|
|
17084
17284
|
// So we check if the callback was added as a fire once and if so remove it here.
|
|
17085
17285
|
if (once) {
|
|
@@ -17187,7 +17387,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17187
17387
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
17188
17388
|
callbackDict.forEach(function (_a) {
|
|
17189
17389
|
var e_6, _b;
|
|
17190
|
-
var _c = __read$
|
|
17390
|
+
var _c = __read$8(_a, 1), modifiedCallback = _c[0];
|
|
17191
17391
|
try {
|
|
17192
17392
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
17193
17393
|
var mbLayerId = _e.value;
|
|
@@ -17220,7 +17420,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17220
17420
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
17221
17421
|
callbackDict.forEach(function (_a) {
|
|
17222
17422
|
var e_7, _b;
|
|
17223
|
-
var _c = __read$
|
|
17423
|
+
var _c = __read$8(_a, 1), modifiedCallback = _c[0];
|
|
17224
17424
|
try {
|
|
17225
17425
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
17226
17426
|
var mbLayerId = _e.value;
|
|
@@ -17619,7 +17819,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17619
17819
|
};
|
|
17620
17820
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
17621
17821
|
};
|
|
17622
|
-
var __read$
|
|
17822
|
+
var __read$9 = (window && window.__read) || function (o, n) {
|
|
17623
17823
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
17624
17824
|
if (!m) return o;
|
|
17625
17825
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -17635,7 +17835,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17635
17835
|
}
|
|
17636
17836
|
return ar;
|
|
17637
17837
|
};
|
|
17638
|
-
var __spreadArray$
|
|
17838
|
+
var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
|
|
17639
17839
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
17640
17840
|
to[j] = from[i];
|
|
17641
17841
|
return to;
|
|
@@ -18071,7 +18271,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
18071
18271
|
// If a specified layer hasn't been added to the map throw an error.
|
|
18072
18272
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
18073
18273
|
if (index > -1) {
|
|
18074
|
-
layerIds.push.apply(layerIds, __spreadArray$
|
|
18274
|
+
layerIds.push.apply(layerIds, __spreadArray$3([], __read$9(this_1.layerIndex[index]._getLayerIds()
|
|
18075
18275
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
18076
18276
|
}
|
|
18077
18277
|
else {
|
|
@@ -18814,7 +19014,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
18814
19014
|
};
|
|
18815
19015
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
18816
19016
|
};
|
|
18817
|
-
var __read$
|
|
19017
|
+
var __read$a = (window && window.__read) || function (o, n) {
|
|
18818
19018
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
18819
19019
|
if (!m) return o;
|
|
18820
19020
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -18830,7 +19030,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
18830
19030
|
}
|
|
18831
19031
|
return ar;
|
|
18832
19032
|
};
|
|
18833
|
-
var __spreadArray$
|
|
19033
|
+
var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
|
|
18834
19034
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
18835
19035
|
to[j] = from[i];
|
|
18836
19036
|
return to;
|
|
@@ -18905,7 +19105,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
18905
19105
|
}
|
|
18906
19106
|
finally { if (e_1) throw e_1.error; }
|
|
18907
19107
|
}
|
|
18908
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
19108
|
+
return _super.prototype.merge.apply(this, __spreadArray$4([], __read$a(valuesList)));
|
|
18909
19109
|
};
|
|
18910
19110
|
return CameraBoundsOptions;
|
|
18911
19111
|
}(Options));
|
|
@@ -19378,7 +19578,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
19378
19578
|
};
|
|
19379
19579
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
19380
19580
|
};
|
|
19381
|
-
var __read$
|
|
19581
|
+
var __read$b = (window && window.__read) || function (o, n) {
|
|
19382
19582
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19383
19583
|
if (!m) return o;
|
|
19384
19584
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -19394,7 +19594,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
19394
19594
|
}
|
|
19395
19595
|
return ar;
|
|
19396
19596
|
};
|
|
19397
|
-
var __spreadArray$
|
|
19597
|
+
var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
|
|
19398
19598
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
19399
19599
|
to[j] = from[i];
|
|
19400
19600
|
return to;
|
|
@@ -19553,7 +19753,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
19553
19753
|
finally { if (e_1) throw e_1.error; }
|
|
19554
19754
|
}
|
|
19555
19755
|
// Then execute the standard merge behavior.
|
|
19556
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
19756
|
+
return _super.prototype.merge.apply(this, __spreadArray$5([], __read$b(valueList)));
|
|
19557
19757
|
};
|
|
19558
19758
|
return StyleOptions;
|
|
19559
19759
|
}(Options));
|
|
@@ -19595,7 +19795,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
19595
19795
|
};
|
|
19596
19796
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
19597
19797
|
};
|
|
19598
|
-
var __read$
|
|
19798
|
+
var __read$c = (window && window.__read) || function (o, n) {
|
|
19599
19799
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19600
19800
|
if (!m) return o;
|
|
19601
19801
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -19611,7 +19811,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
19611
19811
|
}
|
|
19612
19812
|
return ar;
|
|
19613
19813
|
};
|
|
19614
|
-
var __spreadArray$
|
|
19814
|
+
var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
|
|
19615
19815
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
19616
19816
|
to[j] = from[i];
|
|
19617
19817
|
return to;
|
|
@@ -19846,10 +20046,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
19846
20046
|
// won't change default behavior in Options as usually that's what desired
|
|
19847
20047
|
// instead capture it here and reassign.
|
|
19848
20048
|
var currentTransforms = this._transformers;
|
|
19849
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$
|
|
20049
|
+
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$6(__spreadArray$6([], __read$c(flattened)), __read$c(value._transformers || [])); }, []) : [];
|
|
19850
20050
|
// Then execute the standard merge behavior.
|
|
19851
20051
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
19852
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$
|
|
20052
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valueList)));
|
|
19853
20053
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
19854
20054
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
19855
20055
|
}
|
|
@@ -19861,7 +20061,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
19861
20061
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
19862
20062
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
19863
20063
|
}
|
|
19864
|
-
this._transformers = __spreadArray$
|
|
20064
|
+
this._transformers = __spreadArray$6(__spreadArray$6([], __read$c(currentTransforms || [])), __read$c(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
19865
20065
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
19866
20066
|
this._transformers.push(this.transformRequest);
|
|
19867
20067
|
}
|
|
@@ -20057,7 +20257,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20057
20257
|
};
|
|
20058
20258
|
return __assign$8.apply(this, arguments);
|
|
20059
20259
|
};
|
|
20060
|
-
var __awaiter$
|
|
20260
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20061
20261
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20062
20262
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20063
20263
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -20066,7 +20266,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20066
20266
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20067
20267
|
});
|
|
20068
20268
|
};
|
|
20069
|
-
var __generator$
|
|
20269
|
+
var __generator$3 = (window && window.__generator) || function (thisArg, body) {
|
|
20070
20270
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
20071
20271
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
20072
20272
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -20093,7 +20293,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20093
20293
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
20094
20294
|
}
|
|
20095
20295
|
};
|
|
20096
|
-
var __read$
|
|
20296
|
+
var __read$d = (window && window.__read) || function (o, n) {
|
|
20097
20297
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
20098
20298
|
if (!m) return o;
|
|
20099
20299
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -20109,7 +20309,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20109
20309
|
}
|
|
20110
20310
|
return ar;
|
|
20111
20311
|
};
|
|
20112
|
-
var __spreadArray$
|
|
20312
|
+
var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
|
|
20113
20313
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
20114
20314
|
to[j] = from[i];
|
|
20115
20315
|
return to;
|
|
@@ -20160,9 +20360,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20160
20360
|
_this._progressiveLoadingState.mapStyle = currentMapStyle;
|
|
20161
20361
|
// Select deferrable layers
|
|
20162
20362
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
20163
|
-
var _b = __read$
|
|
20363
|
+
var _b = __read$d(_a, 2), groupName = _b[0], layers = _b[1];
|
|
20164
20364
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
20165
|
-
return __spreadArray$
|
|
20365
|
+
return __spreadArray$7(__spreadArray$7([], __read$d(deferred)), __read$d(layers.filter(function (layer) {
|
|
20166
20366
|
var _a;
|
|
20167
20367
|
// Exclude custom layers
|
|
20168
20368
|
if (layer.type === 'custom')
|
|
@@ -20243,9 +20443,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20243
20443
|
|| definitions.configurations[0];
|
|
20244
20444
|
}
|
|
20245
20445
|
};
|
|
20246
|
-
this._lookUpAsync = function (options) { return __awaiter$
|
|
20446
|
+
this._lookUpAsync = function (options) { return __awaiter$3(_this, void 0, void 0, function () {
|
|
20247
20447
|
var definitions, result;
|
|
20248
|
-
return __generator$
|
|
20448
|
+
return __generator$3(this, function (_a) {
|
|
20249
20449
|
switch (_a.label) {
|
|
20250
20450
|
case 0: return [4 /*yield*/, this.definitions()];
|
|
20251
20451
|
case 1:
|
|
@@ -20354,7 +20554,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20354
20554
|
domain: _this.serviceOptions.staticAssetsDomain,
|
|
20355
20555
|
path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
|
|
20356
20556
|
queryParams: {
|
|
20357
|
-
|
|
20557
|
+
// Use the style version from the API response if it's available,
|
|
20558
|
+
// otherwise fallback to the version specified in the serviceOptions.
|
|
20559
|
+
// This is needed for flight testing the 2023-01-01 style version.
|
|
20560
|
+
styleVersion: definitions.version !== undefined && definitions.version !== null
|
|
20561
|
+
? definitions.version
|
|
20562
|
+
: _this.serviceOptions.styleDefinitionsVersion
|
|
20358
20563
|
// thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
|
|
20359
20564
|
//language: styleOptions.language
|
|
20360
20565
|
},
|
|
@@ -20426,8 +20631,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20426
20631
|
return style.theme.toLowerCase();
|
|
20427
20632
|
};
|
|
20428
20633
|
StyleManager.prototype.getThemeAsync = function (styleOptions) {
|
|
20429
|
-
return __awaiter$
|
|
20430
|
-
return __generator$
|
|
20634
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
20635
|
+
return __generator$3(this, function (_a) {
|
|
20431
20636
|
switch (_a.label) {
|
|
20432
20637
|
case 0: return [4 /*yield*/, this._lookUpAsync(styleOptions)];
|
|
20433
20638
|
case 1: return [2 /*return*/, (_a.sent()).theme];
|
|
@@ -20517,9 +20722,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20517
20722
|
setLayerVisibility(nextLayer, styleOptions.showBuildingModels ? 'visible' : 'none');
|
|
20518
20723
|
}
|
|
20519
20724
|
// Set visibility of traffic layers depending on traffic settings.
|
|
20520
|
-
if (trafficOptions.flow !== 'none' &&
|
|
20521
|
-
layerGroup === "traffic_" + trafficOptions.flow
|
|
20522
|
-
|
|
20725
|
+
if (trafficOptions.flow !== 'none' && nextLayer.type == 'line' &&
|
|
20726
|
+
(layerGroup === "traffic_" + trafficOptions.flow ||
|
|
20727
|
+
// Check if deprecated flow types are used and the layer is a bing-traffic layer.
|
|
20728
|
+
// Needed for backwards compatibility in Bing styles to support deprecated flow types.
|
|
20729
|
+
(['absolute', 'relative-delay'].includes(trafficOptions.flow) && nextLayer['source'] === "bing-traffic"))) {
|
|
20523
20730
|
setLayerVisibility(nextLayer, 'visible');
|
|
20524
20731
|
}
|
|
20525
20732
|
// Set visibility of labels
|
|
@@ -20548,7 +20755,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20548
20755
|
// A FundamentalMapLayer (grouped layer) representation of the next style must be built.
|
|
20549
20756
|
var previousLayers = this.map.layers.getLayers();
|
|
20550
20757
|
var nextLayers = Object.entries(layerGroupLayers).map(function (_a) {
|
|
20551
|
-
var _b = __read$
|
|
20758
|
+
var _b = __read$d(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
|
|
20552
20759
|
return _this._buildFundamentalLayerFrom(layerGroupMapboxLayers, layerGroupName);
|
|
20553
20760
|
});
|
|
20554
20761
|
// Update FundamentalMapLayers in LayerManager
|
|
@@ -20645,27 +20852,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20645
20852
|
* Fetches a json resource at the specified domain and path.
|
|
20646
20853
|
*/
|
|
20647
20854
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
20648
|
-
var _a;
|
|
20855
|
+
var _a, _b;
|
|
20649
20856
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
20650
|
-
return __awaiter$
|
|
20857
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
20651
20858
|
var requestParams, fetchOptions;
|
|
20652
|
-
var
|
|
20653
|
-
return __generator$
|
|
20654
|
-
switch (
|
|
20859
|
+
var _c;
|
|
20860
|
+
return __generator$3(this, function (_d) {
|
|
20861
|
+
switch (_d.label) {
|
|
20655
20862
|
case 0:
|
|
20656
20863
|
requestParams = {
|
|
20657
20864
|
url: new Url({
|
|
20658
20865
|
protocol: "https",
|
|
20659
20866
|
domain: domain,
|
|
20660
20867
|
path: path,
|
|
20661
|
-
queryParams: __assign$8((
|
|
20868
|
+
queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
|
|
20869
|
+
// Generate a hash code to avoid cache conflict
|
|
20870
|
+
// TODO: Remove this once style version 2023-01-01 is publicly available
|
|
20871
|
+
_c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
|
|
20662
20872
|
}).toString()
|
|
20663
20873
|
};
|
|
20664
20874
|
if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
|
|
20665
20875
|
// If a transformRequest(...) was specified use it.
|
|
20666
20876
|
requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
|
|
20667
20877
|
}
|
|
20668
|
-
(
|
|
20878
|
+
(_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
|
|
20669
20879
|
fetchOptions = {
|
|
20670
20880
|
method: "GET",
|
|
20671
20881
|
mode: "cors",
|
|
@@ -20682,11 +20892,26 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20682
20892
|
throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
|
|
20683
20893
|
}
|
|
20684
20894
|
})];
|
|
20685
|
-
case 1: return [2 /*return*/,
|
|
20895
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
20686
20896
|
}
|
|
20687
20897
|
});
|
|
20688
20898
|
});
|
|
20689
20899
|
};
|
|
20900
|
+
/**
|
|
20901
|
+
* A basic helper function to generate a hash from an input string.
|
|
20902
|
+
*/
|
|
20903
|
+
StyleManager._hashCode = function (str) {
|
|
20904
|
+
if (str === void 0) { str = ""; }
|
|
20905
|
+
var chr, hash = 0;
|
|
20906
|
+
if (!str)
|
|
20907
|
+
return hash;
|
|
20908
|
+
for (var i = 0; i < str.length; i++) {
|
|
20909
|
+
chr = str.charCodeAt(i);
|
|
20910
|
+
hash = (hash << 5) - hash + chr;
|
|
20911
|
+
hash |= 0; // Convert to 32bit integer
|
|
20912
|
+
}
|
|
20913
|
+
return hash;
|
|
20914
|
+
};
|
|
20690
20915
|
return StyleManager;
|
|
20691
20916
|
}());
|
|
20692
20917
|
|
|
@@ -20695,6 +20920,123 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20695
20920
|
*/
|
|
20696
20921
|
var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
|
|
20697
20922
|
|
|
20923
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
20924
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
20925
|
+
if (m) return m.call(o);
|
|
20926
|
+
if (o && typeof o.length === "number") return {
|
|
20927
|
+
next: function () {
|
|
20928
|
+
if (o && i >= o.length) o = void 0;
|
|
20929
|
+
return { value: o && o[i++], done: !o };
|
|
20930
|
+
}
|
|
20931
|
+
};
|
|
20932
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
20933
|
+
};
|
|
20934
|
+
/**
|
|
20935
|
+
* @internal
|
|
20936
|
+
* A manager for the map control's hidden indicators.
|
|
20937
|
+
* Exposed through the `indicators` property of the `atlas.Map` class.
|
|
20938
|
+
* Cannot be instantiated by the user.
|
|
20939
|
+
*/
|
|
20940
|
+
var AccessibleIndicatorManager = /** @class */ (function () {
|
|
20941
|
+
/**
|
|
20942
|
+
* Constructs the indicator manager to be exposed only through the `indicators` property of the `Map` class.
|
|
20943
|
+
* @param map The map whose indicators are being managed by this.
|
|
20944
|
+
* @internal
|
|
20945
|
+
*/
|
|
20946
|
+
function AccessibleIndicatorManager(map) {
|
|
20947
|
+
this.map = map;
|
|
20948
|
+
this.indicators = new Set();
|
|
20949
|
+
}
|
|
20950
|
+
/**
|
|
20951
|
+
* Adds an indicator to the map
|
|
20952
|
+
* @param indicator The indicator(s) to add.
|
|
20953
|
+
*/
|
|
20954
|
+
AccessibleIndicatorManager.prototype.add = function (indicator) {
|
|
20955
|
+
var e_1, _a;
|
|
20956
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
20957
|
+
try {
|
|
20958
|
+
for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
|
|
20959
|
+
var i = indicator_1_1.value;
|
|
20960
|
+
if (!this.indicators.has(i)) {
|
|
20961
|
+
this.indicators.add(i);
|
|
20962
|
+
i.attach(this.map);
|
|
20963
|
+
}
|
|
20964
|
+
}
|
|
20965
|
+
}
|
|
20966
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
20967
|
+
finally {
|
|
20968
|
+
try {
|
|
20969
|
+
if (indicator_1_1 && !indicator_1_1.done && (_a = indicator_1.return)) _a.call(indicator_1);
|
|
20970
|
+
}
|
|
20971
|
+
finally { if (e_1) throw e_1.error; }
|
|
20972
|
+
}
|
|
20973
|
+
};
|
|
20974
|
+
/**
|
|
20975
|
+
* Removes all indicators from the map.
|
|
20976
|
+
*/
|
|
20977
|
+
AccessibleIndicatorManager.prototype.clear = function () {
|
|
20978
|
+
var _this = this;
|
|
20979
|
+
this.indicators.forEach(function (indicator) {
|
|
20980
|
+
_this.indicators.delete(indicator);
|
|
20981
|
+
indicator.remove();
|
|
20982
|
+
});
|
|
20983
|
+
};
|
|
20984
|
+
/**
|
|
20985
|
+
* Removes an indicator from the map
|
|
20986
|
+
* @param indicator The indicator(s) to remove.
|
|
20987
|
+
*/
|
|
20988
|
+
AccessibleIndicatorManager.prototype.remove = function (indicator) {
|
|
20989
|
+
var e_2, _a;
|
|
20990
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
20991
|
+
try {
|
|
20992
|
+
for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
|
|
20993
|
+
var i = indicator_2_1.value;
|
|
20994
|
+
if (this.indicators.has(i)) {
|
|
20995
|
+
this.indicators.delete(i);
|
|
20996
|
+
i.remove();
|
|
20997
|
+
}
|
|
20998
|
+
}
|
|
20999
|
+
}
|
|
21000
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
21001
|
+
finally {
|
|
21002
|
+
try {
|
|
21003
|
+
if (indicator_2_1 && !indicator_2_1.done && (_a = indicator_2.return)) _a.call(indicator_2);
|
|
21004
|
+
}
|
|
21005
|
+
finally { if (e_2) throw e_2.error; }
|
|
21006
|
+
}
|
|
21007
|
+
};
|
|
21008
|
+
/**
|
|
21009
|
+
* Returns the indicators currently attached to the map.
|
|
21010
|
+
*/
|
|
21011
|
+
AccessibleIndicatorManager.prototype.getIndicators = function () {
|
|
21012
|
+
return Array.from(this.indicators);
|
|
21013
|
+
};
|
|
21014
|
+
/**
|
|
21015
|
+
* Returns the div element that should contain all the indicator containers.
|
|
21016
|
+
* Creates it if it doesn't already exist.
|
|
21017
|
+
* @internal
|
|
21018
|
+
*/
|
|
21019
|
+
AccessibleIndicatorManager.prototype._getCollectionDiv = function () {
|
|
21020
|
+
var collection = this.map.getMapContainer()
|
|
21021
|
+
.querySelector("." + AccessibleIndicatorManager.Css.collection);
|
|
21022
|
+
if (!collection) {
|
|
21023
|
+
// If the collection div doesn't exist create it.
|
|
21024
|
+
collection = document.createElement("div");
|
|
21025
|
+
collection.setAttribute("aria-label", "map data");
|
|
21026
|
+
// Set the container role to listbox, and the descents' role to option, so the reader will read the listbox as a list.
|
|
21027
|
+
// For example, NVDA will read "data point, 1 of 1" when the indicator is focused.
|
|
21028
|
+
collection.setAttribute("role", "listbox");
|
|
21029
|
+
collection.classList.add(AccessibleIndicatorManager.Css.collection);
|
|
21030
|
+
this.map.getMapContainer().appendChild(collection);
|
|
21031
|
+
}
|
|
21032
|
+
return collection;
|
|
21033
|
+
};
|
|
21034
|
+
AccessibleIndicatorManager.Css = {
|
|
21035
|
+
collection: "accessible-indicator-collection-container"
|
|
21036
|
+
};
|
|
21037
|
+
return AccessibleIndicatorManager;
|
|
21038
|
+
}());
|
|
21039
|
+
|
|
20698
21040
|
var __extends$18 = (window && window.__extends) || (function () {
|
|
20699
21041
|
var extendStatics = function (d, b) {
|
|
20700
21042
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -20721,7 +21063,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20721
21063
|
};
|
|
20722
21064
|
return __assign$9.apply(this, arguments);
|
|
20723
21065
|
};
|
|
20724
|
-
var __awaiter$
|
|
21066
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
20725
21067
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
20726
21068
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20727
21069
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -20730,7 +21072,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20730
21072
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20731
21073
|
});
|
|
20732
21074
|
};
|
|
20733
|
-
var __generator$
|
|
21075
|
+
var __generator$4 = (window && window.__generator) || function (thisArg, body) {
|
|
20734
21076
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
20735
21077
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
20736
21078
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -20757,7 +21099,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20757
21099
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
20758
21100
|
}
|
|
20759
21101
|
};
|
|
20760
|
-
var __read$
|
|
21102
|
+
var __read$e = (window && window.__read) || function (o, n) {
|
|
20761
21103
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
20762
21104
|
if (!m) return o;
|
|
20763
21105
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -20773,12 +21115,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20773
21115
|
}
|
|
20774
21116
|
return ar;
|
|
20775
21117
|
};
|
|
20776
|
-
var __spreadArray$
|
|
21118
|
+
var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
|
|
20777
21119
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
20778
21120
|
to[j] = from[i];
|
|
20779
21121
|
return to;
|
|
20780
21122
|
};
|
|
20781
|
-
var __values$
|
|
21123
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
20782
21124
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
20783
21125
|
if (m) return m.call(o);
|
|
20784
21126
|
if (o && typeof o.length === "number") return {
|
|
@@ -20884,6 +21226,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20884
21226
|
_this.markers = new HtmlMarkerManager(_this);
|
|
20885
21227
|
_this.sources = new SourceManager(_this);
|
|
20886
21228
|
_this.popups = new PopupManager(_this);
|
|
21229
|
+
_this.indicators = new AccessibleIndicatorManager(_this);
|
|
20887
21230
|
// Add CSS classes and set attributes for DOM elements.
|
|
20888
21231
|
_this.map.getContainer().classList.add(Map.Css.container);
|
|
20889
21232
|
_this.map.getCanvasContainer().classList.add(Map.Css.canvasContainer);
|
|
@@ -20926,7 +21269,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20926
21269
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
20927
21270
|
var stylesInit = _this.styles.initStyleset();
|
|
20928
21271
|
Promise.all([authManInit, stylesInit]).then(function (_a) {
|
|
20929
|
-
var _b = __read$
|
|
21272
|
+
var _b = __read$e(_a, 2), _ = _b[0], definitions = _b[1];
|
|
20930
21273
|
// Check that the map hasn't been removed for any reason.
|
|
20931
21274
|
// If so no need to finish styling the map.
|
|
20932
21275
|
if (_this.removed) {
|
|
@@ -20956,7 +21299,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20956
21299
|
_this.events.invoke("error", errorData);
|
|
20957
21300
|
});
|
|
20958
21301
|
// --> Set initial camera state of map
|
|
20959
|
-
_this.setCamera(__assign$9(__assign$9({
|
|
21302
|
+
_this.setCamera(__assign$9(__assign$9({
|
|
21303
|
+
// Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
|
|
21304
|
+
minZoom: 1 }, options), { type: "jump", duration: 0 }));
|
|
20960
21305
|
_this.flowDelegate = new FlowServiceDelegate(_this);
|
|
20961
21306
|
_this.accessibleMapDelegate = new AccessibleMapDelegate(_this);
|
|
20962
21307
|
_this.userInteractionDelegate = new UserInteractionDelegate(_this, options);
|
|
@@ -21023,6 +21368,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21023
21368
|
else {
|
|
21024
21369
|
this.accessibleMapDelegate.removeFromMap();
|
|
21025
21370
|
}
|
|
21371
|
+
if (this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration) {
|
|
21372
|
+
this.styles.initPromise = null;
|
|
21373
|
+
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
21374
|
+
this.setStyle({});
|
|
21375
|
+
}
|
|
21026
21376
|
};
|
|
21027
21377
|
/**
|
|
21028
21378
|
* Adds request transformer
|
|
@@ -21572,7 +21922,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21572
21922
|
urls = layer.getOptions().subdomains || [];
|
|
21573
21923
|
}
|
|
21574
21924
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
21575
|
-
urls.push.apply(urls, __spreadArray$
|
|
21925
|
+
urls.push.apply(urls, __spreadArray$8([], __read$e(tileSources)));
|
|
21576
21926
|
layer._setOptionsNoUpdate({
|
|
21577
21927
|
subdomains: urls
|
|
21578
21928
|
});
|
|
@@ -21594,7 +21944,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21594
21944
|
Map.prototype.removeLayers = function (layerNames) {
|
|
21595
21945
|
var e_1, _a;
|
|
21596
21946
|
try {
|
|
21597
|
-
for (var layerNames_1 = __values$
|
|
21947
|
+
for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
|
|
21598
21948
|
var layerName = layerNames_1_1.value;
|
|
21599
21949
|
// Previously calling removeLayers for layers that didn't exist in the map just did nothing.
|
|
21600
21950
|
// Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
|
|
@@ -21736,14 +22086,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21736
22086
|
this.layers.clear();
|
|
21737
22087
|
this.sources.clear();
|
|
21738
22088
|
this.markers.clear();
|
|
22089
|
+
this.indicators.clear();
|
|
21739
22090
|
};
|
|
21740
22091
|
/**
|
|
21741
22092
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
21742
22093
|
*/
|
|
21743
22094
|
Map.prototype.dispose = function () {
|
|
22095
|
+
var _a;
|
|
21744
22096
|
this.clear();
|
|
21745
22097
|
this.map.remove();
|
|
22098
|
+
(_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
21746
22099
|
this.removed = true;
|
|
22100
|
+
// Remove event listeners
|
|
22101
|
+
window.removeEventListener("resize", this._windowResizeCallback);
|
|
21747
22102
|
while (this.getMapContainer().firstChild) {
|
|
21748
22103
|
var currChild = this.getMapContainer().firstChild;
|
|
21749
22104
|
this.getMapContainer().removeChild(currChild);
|
|
@@ -21784,7 +22139,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21784
22139
|
var e_2, _a;
|
|
21785
22140
|
var positions = [];
|
|
21786
22141
|
try {
|
|
21787
|
-
for (var pixels_1 = __values$
|
|
22142
|
+
for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
|
|
21788
22143
|
var pixel = pixels_1_1.value;
|
|
21789
22144
|
var lngLat = this.map.unproject(pixel);
|
|
21790
22145
|
positions.push(new Position(lngLat.lng, lngLat.lat));
|
|
@@ -21807,7 +22162,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21807
22162
|
var e_3, _a;
|
|
21808
22163
|
var pixels = [];
|
|
21809
22164
|
try {
|
|
21810
|
-
for (var positions_1 = __values$
|
|
22165
|
+
for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
21811
22166
|
var position = positions_1_1.value;
|
|
21812
22167
|
var point = this.map.project(position);
|
|
21813
22168
|
pixels.push(new Pixel(point.x, point.y));
|
|
@@ -21855,8 +22210,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21855
22210
|
*/
|
|
21856
22211
|
Map.prototype._rebuildStyle = function (diff) {
|
|
21857
22212
|
if (diff === void 0) { diff = true; }
|
|
21858
|
-
return __awaiter$
|
|
21859
|
-
return __generator$
|
|
22213
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
22214
|
+
return __generator$4(this, function (_a) {
|
|
21860
22215
|
this.styles.setStyle(this.styleOptions, diff);
|
|
21861
22216
|
this.imageSprite._restoreImages();
|
|
21862
22217
|
return [2 /*return*/];
|
|
@@ -22072,7 +22427,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
22072
22427
|
return Map;
|
|
22073
22428
|
}(EventEmitter));
|
|
22074
22429
|
|
|
22075
|
-
var __read$
|
|
22430
|
+
var __read$f = (window && window.__read) || function (o, n) {
|
|
22076
22431
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
22077
22432
|
if (!m) return o;
|
|
22078
22433
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -22088,7 +22443,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
22088
22443
|
}
|
|
22089
22444
|
return ar;
|
|
22090
22445
|
};
|
|
22091
|
-
var __spreadArray$
|
|
22446
|
+
var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
|
|
22092
22447
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
22093
22448
|
to[j] = from[i];
|
|
22094
22449
|
return to;
|
|
@@ -22234,7 +22589,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
22234
22589
|
lineLength = 50;
|
|
22235
22590
|
}
|
|
22236
22591
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
22237
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$
|
|
22592
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$9([], __read$f((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
22238
22593
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
22239
22594
|
if (w < width) {
|
|
22240
22595
|
width = w;
|