azure-maps-control 2.2.4 → 2.2.6
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 +400 -62
- package/dist/atlas-core-bare.js +427 -91
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +400 -62
- package/dist/atlas-core.js +427 -91
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.js +427 -91
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
package/dist/atlas.js
CHANGED
|
@@ -43619,7 +43619,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43619
43619
|
return Url;
|
|
43620
43620
|
}());
|
|
43621
43621
|
|
|
43622
|
-
var version = "2.2.
|
|
43622
|
+
var version = "2.2.6";
|
|
43623
43623
|
|
|
43624
43624
|
/**
|
|
43625
43625
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -53440,6 +53440,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
53440
53440
|
|
|
53441
53441
|
var cloneDeepWith_1 = cloneDeepWith;
|
|
53442
53442
|
|
|
53443
|
+
/**
|
|
53444
|
+
* A hidden HTML element that is used to provide accessibility to shapes such as bubble.
|
|
53445
|
+
*/
|
|
53446
|
+
var AccessibleIndicator = /** @class */ (function () {
|
|
53447
|
+
/**
|
|
53448
|
+
* Constructs an AccessibleIndicator object by initializing a hidden `div` element.
|
|
53449
|
+
* @internal
|
|
53450
|
+
*/
|
|
53451
|
+
function AccessibleIndicator(options) {
|
|
53452
|
+
var _this = this;
|
|
53453
|
+
/**
|
|
53454
|
+
* Attaches the indicator to the HTML document in a hidden style.
|
|
53455
|
+
* @param map The map.
|
|
53456
|
+
*/
|
|
53457
|
+
this.attach = function (map) {
|
|
53458
|
+
// If attaching to a different map, remove popup on current map
|
|
53459
|
+
if (_this.map !== map) {
|
|
53460
|
+
// If map was defined the indicator was attached to another map.
|
|
53461
|
+
if (_this.map) {
|
|
53462
|
+
_this.detachFromCurrentMap();
|
|
53463
|
+
}
|
|
53464
|
+
_this.map = map;
|
|
53465
|
+
_this.map.indicators._getCollectionDiv().appendChild(_this.element);
|
|
53466
|
+
_this.map.indicators.add(_this);
|
|
53467
|
+
}
|
|
53468
|
+
};
|
|
53469
|
+
/**
|
|
53470
|
+
* Removes the indicator from the map and the HTML document.
|
|
53471
|
+
*/
|
|
53472
|
+
this.remove = function () {
|
|
53473
|
+
_this.detachFromCurrentMap();
|
|
53474
|
+
_this.element.remove();
|
|
53475
|
+
};
|
|
53476
|
+
/**
|
|
53477
|
+
* Get the DOM element of the indicator.
|
|
53478
|
+
* @returns The DOM element of the indicator.
|
|
53479
|
+
*/
|
|
53480
|
+
this.getElement = function () {
|
|
53481
|
+
return _this.element;
|
|
53482
|
+
};
|
|
53483
|
+
this.detachFromCurrentMap = function () {
|
|
53484
|
+
if (_this.map) {
|
|
53485
|
+
_this.map.indicators.remove(_this);
|
|
53486
|
+
delete _this.map;
|
|
53487
|
+
}
|
|
53488
|
+
};
|
|
53489
|
+
this.element = document.createElement("div");
|
|
53490
|
+
// Set tabindex to 0 to make the element focusable.
|
|
53491
|
+
this.element.setAttribute("tabindex", "0");
|
|
53492
|
+
// Set the role to option, and it's container to listbox so the reader will read the listbox as a list.
|
|
53493
|
+
// For example, NVDA will read "data point, {posinset} of {setsize}" when the indicator is focused.
|
|
53494
|
+
this.element.setAttribute("role", "option");
|
|
53495
|
+
if (options === null || options === void 0 ? void 0 : options.setSize)
|
|
53496
|
+
this.element.setAttribute("aria-setsize", options.setSize.toString());
|
|
53497
|
+
if (options === null || options === void 0 ? void 0 : options.positionInSet)
|
|
53498
|
+
this.element.setAttribute("aria-posinset", options.positionInSet.toString());
|
|
53499
|
+
this.element.setAttribute("aria-label", "data point");
|
|
53500
|
+
this.element.classList.add(AccessibleIndicator.Css.hidden);
|
|
53501
|
+
}
|
|
53502
|
+
// CSS class names.
|
|
53503
|
+
AccessibleIndicator.Css = {
|
|
53504
|
+
hidden: "hidden-accessible-element"
|
|
53505
|
+
};
|
|
53506
|
+
return AccessibleIndicator;
|
|
53507
|
+
}());
|
|
53508
|
+
|
|
53443
53509
|
var __extends$k = (window && window.__extends) || (function () {
|
|
53444
53510
|
var extendStatics = function (d, b) {
|
|
53445
53511
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -54298,7 +54364,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54298
54364
|
// and can be used to determine which events are ours vs Mapbox's.
|
|
54299
54365
|
Layer.LayerEvents = {
|
|
54300
54366
|
layeradded: undefined,
|
|
54301
|
-
layerremoved: undefined
|
|
54367
|
+
layerremoved: undefined,
|
|
54368
|
+
focusin: undefined,
|
|
54369
|
+
focusout: undefined,
|
|
54302
54370
|
};
|
|
54303
54371
|
return Layer;
|
|
54304
54372
|
}(EventEmitter));
|
|
@@ -54453,6 +54521,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54453
54521
|
* @default 8
|
|
54454
54522
|
*/
|
|
54455
54523
|
_this.radius = 8;
|
|
54524
|
+
/**
|
|
54525
|
+
* @internal
|
|
54526
|
+
* Specifies whether to create focusable indicators for the bubbles.
|
|
54527
|
+
*
|
|
54528
|
+
* Note: We treat this as an internal option for now because we hadn't fully decided the default styling for the indicators.
|
|
54529
|
+
* Once we decide, we will make this a public option or remove it.
|
|
54530
|
+
*/
|
|
54531
|
+
_this.createIndicators = false;
|
|
54456
54532
|
return _this;
|
|
54457
54533
|
}
|
|
54458
54534
|
return BubbleLayerOptions;
|
|
@@ -54473,6 +54549,58 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54473
54549
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
54474
54550
|
};
|
|
54475
54551
|
})();
|
|
54552
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
54553
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
54554
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
54555
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
54556
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
54557
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
54558
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
54559
|
+
});
|
|
54560
|
+
};
|
|
54561
|
+
var __generator$1 = (window && window.__generator) || function (thisArg, body) {
|
|
54562
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
54563
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
54564
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54565
|
+
function step(op) {
|
|
54566
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
54567
|
+
while (_) try {
|
|
54568
|
+
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;
|
|
54569
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54570
|
+
switch (op[0]) {
|
|
54571
|
+
case 0: case 1: t = op; break;
|
|
54572
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
54573
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
54574
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
54575
|
+
default:
|
|
54576
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
54577
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54578
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
54579
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
54580
|
+
if (t[2]) _.ops.pop();
|
|
54581
|
+
_.trys.pop(); continue;
|
|
54582
|
+
}
|
|
54583
|
+
op = body.call(thisArg, _);
|
|
54584
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
54585
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
54586
|
+
}
|
|
54587
|
+
};
|
|
54588
|
+
var __read$3 = (window && window.__read) || function (o, n) {
|
|
54589
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
54590
|
+
if (!m) return o;
|
|
54591
|
+
var i = m.call(o), r, ar = [], e;
|
|
54592
|
+
try {
|
|
54593
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
54594
|
+
}
|
|
54595
|
+
catch (error) { e = { error: error }; }
|
|
54596
|
+
finally {
|
|
54597
|
+
try {
|
|
54598
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
54599
|
+
}
|
|
54600
|
+
finally { if (e) throw e.error; }
|
|
54601
|
+
}
|
|
54602
|
+
return ar;
|
|
54603
|
+
};
|
|
54476
54604
|
/**
|
|
54477
54605
|
* Renders Point objects as scalable circles (bubbles).
|
|
54478
54606
|
*/
|
|
@@ -54486,6 +54614,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54486
54614
|
*/
|
|
54487
54615
|
function BubbleLayer(source, id, options) {
|
|
54488
54616
|
var _this = _super.call(this, id) || this;
|
|
54617
|
+
_this.accessibleIndicator = [];
|
|
54618
|
+
_this.setAccessibleIndicator = function () { return __awaiter$1(_this, void 0, void 0, function () {
|
|
54619
|
+
var features, createIndicator, insertHiddenBefore, attach;
|
|
54620
|
+
var _this = this;
|
|
54621
|
+
return __generator$1(this, function (_a) {
|
|
54622
|
+
this.accessibleIndicator.forEach(function (indicator) { return indicator.remove(); });
|
|
54623
|
+
this.accessibleIndicator = [];
|
|
54624
|
+
features = this.map.layers.getRenderedShapes(this.map.getCamera().bounds, this);
|
|
54625
|
+
createIndicator = function (features, idx) {
|
|
54626
|
+
var bubbleFeature = features[idx];
|
|
54627
|
+
var indicator = new AccessibleIndicator({ positionInSet: idx + 1, setSize: features.length });
|
|
54628
|
+
var element = indicator.getElement();
|
|
54629
|
+
var _a = __read$3(_this.map.positionsToPixels([bubbleFeature.data.geometry.coordinates]), 1), pixel = _a[0];
|
|
54630
|
+
element.addEventListener('focusin', function (event) {
|
|
54631
|
+
_this.accessibleIndicator.filter(function (p) { return p !== indicator; }).forEach(function (popup) { return popup.remove(); });
|
|
54632
|
+
// insert previous and next popups
|
|
54633
|
+
if (idx - 1 >= 0) {
|
|
54634
|
+
insertHiddenBefore(indicator, createIndicator(features, idx - 1));
|
|
54635
|
+
}
|
|
54636
|
+
if (idx + 1 < features.length) {
|
|
54637
|
+
attach(createIndicator(features, idx + 1));
|
|
54638
|
+
}
|
|
54639
|
+
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], '#000000', _this.options.strokeColor]);
|
|
54640
|
+
var focusEvent = {
|
|
54641
|
+
target: element,
|
|
54642
|
+
type: 'focusin',
|
|
54643
|
+
map: _this.map,
|
|
54644
|
+
shape: bubbleFeature,
|
|
54645
|
+
originalEvent: event,
|
|
54646
|
+
pixel: pixel
|
|
54647
|
+
};
|
|
54648
|
+
_this._invokeEvent('focusin', focusEvent);
|
|
54649
|
+
});
|
|
54650
|
+
element.addEventListener('focusout', function (event) {
|
|
54651
|
+
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], _this.options.strokeColor, _this.options.strokeColor]);
|
|
54652
|
+
var focusEvent = {
|
|
54653
|
+
target: element,
|
|
54654
|
+
type: 'focusout',
|
|
54655
|
+
map: _this.map,
|
|
54656
|
+
shape: bubbleFeature,
|
|
54657
|
+
originalEvent: event,
|
|
54658
|
+
pixel: pixel
|
|
54659
|
+
};
|
|
54660
|
+
_this._invokeEvent('focusout', focusEvent);
|
|
54661
|
+
});
|
|
54662
|
+
_this.accessibleIndicator.push(indicator);
|
|
54663
|
+
return indicator;
|
|
54664
|
+
};
|
|
54665
|
+
insertHiddenBefore = function (base, toInsert) {
|
|
54666
|
+
toInsert.attach(_this.map);
|
|
54667
|
+
var elementToSwapIn = toInsert.getElement();
|
|
54668
|
+
var baseElement = base.getElement();
|
|
54669
|
+
baseElement.parentElement.insertBefore(elementToSwapIn, baseElement);
|
|
54670
|
+
};
|
|
54671
|
+
attach = function (popup) {
|
|
54672
|
+
popup.attach(_this.map);
|
|
54673
|
+
};
|
|
54674
|
+
if (features.length > 0) {
|
|
54675
|
+
attach(createIndicator(features, 0));
|
|
54676
|
+
}
|
|
54677
|
+
if (features.length > 1) {
|
|
54678
|
+
attach(createIndicator(features, features.length - 1));
|
|
54679
|
+
}
|
|
54680
|
+
return [2 /*return*/];
|
|
54681
|
+
});
|
|
54682
|
+
}); };
|
|
54489
54683
|
_this.options = new BubbleLayerOptions().merge(cloneDeepWith_1(options, BubbleLayerOptions._cloneCustomizer));
|
|
54490
54684
|
_this.options.source = source || _this.options.source;
|
|
54491
54685
|
return _this;
|
|
@@ -54533,6 +54727,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54533
54727
|
}
|
|
54534
54728
|
this.options = newOptions;
|
|
54535
54729
|
};
|
|
54730
|
+
BubbleLayer.prototype.onAdd = function (map) {
|
|
54731
|
+
_super.prototype.onAdd.call(this, map);
|
|
54732
|
+
if (this.options.createIndicators) {
|
|
54733
|
+
map.events.addOnce('idle', this.setAccessibleIndicator);
|
|
54734
|
+
map.events.add('moveend', this.setAccessibleIndicator);
|
|
54735
|
+
}
|
|
54736
|
+
};
|
|
54737
|
+
BubbleLayer.prototype.onRemove = function () {
|
|
54738
|
+
_super.prototype.onRemove.call(this);
|
|
54739
|
+
if (this.options.createIndicators) {
|
|
54740
|
+
this.map.events.remove('idle', this.setAccessibleIndicator);
|
|
54741
|
+
this.map.events.remove('moveend', this.setAccessibleIndicator);
|
|
54742
|
+
}
|
|
54743
|
+
};
|
|
54536
54744
|
/**
|
|
54537
54745
|
* @internal
|
|
54538
54746
|
*/
|
|
@@ -55651,7 +55859,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
55651
55859
|
};
|
|
55652
55860
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
55653
55861
|
};
|
|
55654
|
-
var __read$
|
|
55862
|
+
var __read$4 = (window && window.__read) || function (o, n) {
|
|
55655
55863
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
55656
55864
|
if (!m) return o;
|
|
55657
55865
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -55742,7 +55950,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
55742
55950
|
finally { if (e_1) throw e_1.error; }
|
|
55743
55951
|
}
|
|
55744
55952
|
// Then execute the standard merge behavior.
|
|
55745
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$
|
|
55953
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$4(valueList)));
|
|
55746
55954
|
if (isNewColorSet) {
|
|
55747
55955
|
merged.fillPattern = undefined;
|
|
55748
55956
|
}
|
|
@@ -57073,7 +57281,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57073
57281
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
57074
57282
|
};
|
|
57075
57283
|
})();
|
|
57076
|
-
var __read$
|
|
57284
|
+
var __read$5 = (window && window.__read) || function (o, n) {
|
|
57077
57285
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
57078
57286
|
if (!m) return o;
|
|
57079
57287
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -57185,7 +57393,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57185
57393
|
*/
|
|
57186
57394
|
_this._onDown = function (event) {
|
|
57187
57395
|
_this.map.popups._addDraggedPopup(_this);
|
|
57188
|
-
var _a = __read$
|
|
57396
|
+
var _a = __read$5(_this.map.positionsToPixels([_this.options.position]), 1), anchorPixel = _a[0];
|
|
57189
57397
|
if (event.type === "mousedown") {
|
|
57190
57398
|
event = event;
|
|
57191
57399
|
_this.dragOffset = [
|
|
@@ -57349,7 +57557,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57349
57557
|
pixel[0] + this.dragOffset[0],
|
|
57350
57558
|
pixel[1] + this.dragOffset[1]
|
|
57351
57559
|
];
|
|
57352
|
-
var _a = __read$
|
|
57560
|
+
var _a = __read$5(this.map.pixelsToPositions([anchorPixel]), 1), anchorPos = _a[0];
|
|
57353
57561
|
this.options.position = anchorPos;
|
|
57354
57562
|
this.marker.setLngLat(this.options.position);
|
|
57355
57563
|
this._invokeEvent("drag", { type: "drag", target: this });
|
|
@@ -57503,7 +57711,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57503
57711
|
posY = pt.y;
|
|
57504
57712
|
}
|
|
57505
57713
|
else {
|
|
57506
|
-
var _a = __read$
|
|
57714
|
+
var _a = __read$5(map.positionsToPixels([options.position]), 1), _b = __read$5(_a[0], 2), x = _b[0], y = _b[1];
|
|
57507
57715
|
posX = x;
|
|
57508
57716
|
posY = y;
|
|
57509
57717
|
}
|
|
@@ -58420,7 +58628,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58420
58628
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
58421
58629
|
};
|
|
58422
58630
|
})();
|
|
58423
|
-
var __read$
|
|
58631
|
+
var __read$6 = (window && window.__read) || function (o, n) {
|
|
58424
58632
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
58425
58633
|
if (!m) return o;
|
|
58426
58634
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -58573,7 +58781,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58573
58781
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
58574
58782
|
valueList[_i] = arguments[_i];
|
|
58575
58783
|
}
|
|
58576
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$
|
|
58784
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$6(valueList)));
|
|
58577
58785
|
if (merged.authType === exports.AuthenticationType.subscriptionKey) {
|
|
58578
58786
|
merged.authContext = merged.aadAppId = merged.getToken = undefined;
|
|
58579
58787
|
}
|
|
@@ -69658,7 +69866,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69658
69866
|
return MapLabelCache;
|
|
69659
69867
|
}());
|
|
69660
69868
|
|
|
69661
|
-
var __awaiter$
|
|
69869
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
69662
69870
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
69663
69871
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
69664
69872
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -69667,7 +69875,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69667
69875
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
69668
69876
|
});
|
|
69669
69877
|
};
|
|
69670
|
-
var __generator$
|
|
69878
|
+
var __generator$2 = (window && window.__generator) || function (thisArg, body) {
|
|
69671
69879
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
69672
69880
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
69673
69881
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -69694,7 +69902,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69694
69902
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
69695
69903
|
}
|
|
69696
69904
|
};
|
|
69697
|
-
var __read$
|
|
69905
|
+
var __read$7 = (window && window.__read) || function (o, n) {
|
|
69698
69906
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
69699
69907
|
if (!m) return o;
|
|
69700
69908
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -69947,9 +70155,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69947
70155
|
// Flag indicating if detailed descriptions which include zoom, lat/lon information should be returned.
|
|
69948
70156
|
this._returnDetailedDescriptions = false;
|
|
69949
70157
|
/** Event handler for shortcuts. */
|
|
69950
|
-
this._shortcutListener = function (e) { return __awaiter$
|
|
70158
|
+
this._shortcutListener = function (e) { return __awaiter$2(_this, void 0, void 0, function () {
|
|
69951
70159
|
var cam, styleOps, lang, style, camDesc;
|
|
69952
|
-
return __generator$
|
|
70160
|
+
return __generator$2(this, function (_a) {
|
|
69953
70161
|
switch (_a.label) {
|
|
69954
70162
|
case 0:
|
|
69955
70163
|
if (!(e.altKey && e.ctrlKey && e.keyCode === 68)) return [3 /*break*/, 2];
|
|
@@ -70017,9 +70225,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70017
70225
|
/** Event handler for when the mouse or touch goes down */
|
|
70018
70226
|
this._onPointerDown = function (event) {
|
|
70019
70227
|
_this._lastPointerPos = _this._getEventPos(event);
|
|
70020
|
-
_this._pointerTimeout = setTimeout(function () { return __awaiter$
|
|
70228
|
+
_this._pointerTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
70021
70229
|
var styleOps, lang, style, cam, loc;
|
|
70022
|
-
return __generator$
|
|
70230
|
+
return __generator$2(this, function (_a) {
|
|
70023
70231
|
switch (_a.label) {
|
|
70024
70232
|
case 0:
|
|
70025
70233
|
styleOps = this._map.getStyle();
|
|
@@ -70077,9 +70285,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70077
70285
|
delete _this._rotateTimeout;
|
|
70078
70286
|
};
|
|
70079
70287
|
/** Called when the map has finished changing styles and is ready to create a new description */
|
|
70080
|
-
this._updateStyle = function () { return __awaiter$
|
|
70288
|
+
this._updateStyle = function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
70081
70289
|
var cam, styleOps, lang, style, camDesc;
|
|
70082
|
-
return __generator$
|
|
70290
|
+
return __generator$2(this, function (_a) {
|
|
70083
70291
|
switch (_a.label) {
|
|
70084
70292
|
case 0:
|
|
70085
70293
|
cam = this._map.getCamera();
|
|
@@ -70131,9 +70339,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70131
70339
|
delete _this._moveTimeout;
|
|
70132
70340
|
}
|
|
70133
70341
|
// Send the new description to the map.
|
|
70134
|
-
_this._moveTimeout = setTimeout(function () { return __awaiter$
|
|
70342
|
+
_this._moveTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
70135
70343
|
var loc;
|
|
70136
|
-
return __generator$
|
|
70344
|
+
return __generator$2(this, function (_a) {
|
|
70137
70345
|
switch (_a.label) {
|
|
70138
70346
|
case 0:
|
|
70139
70347
|
// Clear the rotate timeout as the move description will cover rotation.
|
|
@@ -70178,7 +70386,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70178
70386
|
// Derive polygon layers from the label config.
|
|
70179
70387
|
_this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
|
|
70180
70388
|
if (cur.polygonSources) {
|
|
70181
|
-
acc.push.apply(acc, __spreadArray$2([], __read$
|
|
70389
|
+
acc.push.apply(acc, __spreadArray$2([], __read$7(cur.polygonSources)));
|
|
70182
70390
|
}
|
|
70183
70391
|
return acc;
|
|
70184
70392
|
}, []);
|
|
@@ -70238,7 +70446,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70238
70446
|
};
|
|
70239
70447
|
/** Checks if the location has changed enough to justify a new description */
|
|
70240
70448
|
MapViewDescriptor.prototype._checkLocThreshold = function (newCenter, lastCenter) {
|
|
70241
|
-
var _a = __read$
|
|
70449
|
+
var _a = __read$7(this._map.positionsToPixels([lastCenter, newCenter]), 2), lastPixel = _a[0], newPixel = _a[1];
|
|
70242
70450
|
return Pixel.getDistance(lastPixel, newPixel) >= this._moveThreshold;
|
|
70243
70451
|
};
|
|
70244
70452
|
/** Checks if the heading has changed enough to justify a new description */
|
|
@@ -70263,10 +70471,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70263
70471
|
* @param cam The map camera informaiton.
|
|
70264
70472
|
*/
|
|
70265
70473
|
MapViewDescriptor.prototype._getLocDesc = function (cam, lang, style) {
|
|
70266
|
-
return __awaiter$
|
|
70474
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
70267
70475
|
var info_1, cPx_1, intersects_1, intersectingPolygon, intersectingType_1, i, cnt, layerInfo, cl_1;
|
|
70268
70476
|
var _this = this;
|
|
70269
|
-
return __generator$
|
|
70477
|
+
return __generator$2(this, function (_a) {
|
|
70270
70478
|
switch (_a.label) {
|
|
70271
70479
|
case 0:
|
|
70272
70480
|
if (!(style !== "blank")) return [3 /*break*/, 3];
|
|
@@ -71050,14 +71258,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71050
71258
|
var trafficOptions = _this.map.getTraffic();
|
|
71051
71259
|
if (trafficOptions.flow !== "none") {
|
|
71052
71260
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + trafficOptions.flow);
|
|
71261
|
+
if (!trafficFlowComponent && ['absolute', 'relative-delay'].includes(trafficOptions.flow)) {
|
|
71262
|
+
// Fallback to relative if deprecated flow type is used
|
|
71263
|
+
trafficFlowComponent = _this.map.layers.getLayerById("traffic_relative");
|
|
71264
|
+
}
|
|
71053
71265
|
if (trafficFlowComponent) {
|
|
71054
|
-
_this.lastFlowMode =
|
|
71266
|
+
_this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
|
|
71055
71267
|
trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
|
|
71056
71268
|
}
|
|
71057
71269
|
}
|
|
71058
71270
|
};
|
|
71059
71271
|
this.removeFromMap = function () {
|
|
71060
|
-
var trafficOptions = _this.map.getTraffic();
|
|
71061
71272
|
if (_this.lastFlowMode != "none") {
|
|
71062
71273
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
|
|
71063
71274
|
if (trafficFlowComponent) {
|
|
@@ -71310,7 +71521,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71310
71521
|
return IncidentPopupFactory;
|
|
71311
71522
|
}());
|
|
71312
71523
|
|
|
71313
|
-
var __awaiter$
|
|
71524
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
71314
71525
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
71315
71526
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
71316
71527
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -71319,7 +71530,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71319
71530
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71320
71531
|
});
|
|
71321
71532
|
};
|
|
71322
|
-
var __generator$
|
|
71533
|
+
var __generator$3 = (window && window.__generator) || function (thisArg, body) {
|
|
71323
71534
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
71324
71535
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
71325
71536
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -71373,10 +71584,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71373
71584
|
_this.map.events.add('moveend', _this.setAccessiblePopups);
|
|
71374
71585
|
};
|
|
71375
71586
|
this.accessiblePopups = [];
|
|
71376
|
-
this.setAccessiblePopups = function () { return __awaiter$
|
|
71587
|
+
this.setAccessiblePopups = function () { return __awaiter$3(_this, void 0, void 0, function () {
|
|
71377
71588
|
var features, localizedStrings, createPopup, insertHiddenBefore, insertHiddenInFront, addHidden;
|
|
71378
71589
|
var _this = this;
|
|
71379
|
-
return __generator$
|
|
71590
|
+
return __generator$3(this, function (_a) {
|
|
71380
71591
|
switch (_a.label) {
|
|
71381
71592
|
case 0:
|
|
71382
71593
|
this.accessiblePopups.forEach(function (popup) { return popup.remove(); });
|
|
@@ -74644,7 +74855,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74644
74855
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
74645
74856
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
74646
74857
|
};
|
|
74647
|
-
var __read$
|
|
74858
|
+
var __read$8 = (window && window.__read) || function (o, n) {
|
|
74648
74859
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
74649
74860
|
if (!m) return o;
|
|
74650
74861
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -74680,7 +74891,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74680
74891
|
];
|
|
74681
74892
|
var allowedAttributionAttributes = __spreadArray$3([
|
|
74682
74893
|
'href'
|
|
74683
|
-
], __read$
|
|
74894
|
+
], __read$8(attributionRuleAttributes));
|
|
74684
74895
|
var AttributionRuleProxy = /** @class */ (function () {
|
|
74685
74896
|
function AttributionRuleProxy(element, attributionChangeCallback) {
|
|
74686
74897
|
var _this = this;
|
|
@@ -74903,7 +75114,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74903
75114
|
};
|
|
74904
75115
|
AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
|
|
74905
75116
|
var _this = this;
|
|
74906
|
-
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$
|
|
75117
|
+
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$8(flat)), __read$8(copyrights)); }, []);
|
|
74907
75118
|
if (copyrights.length == 0) {
|
|
74908
75119
|
// no attribution for a provided tileset/bbox/z
|
|
74909
75120
|
return;
|
|
@@ -74952,7 +75163,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74952
75163
|
return AttributionRuleProxy;
|
|
74953
75164
|
}());
|
|
74954
75165
|
|
|
74955
|
-
var __read$
|
|
75166
|
+
var __read$9 = (window && window.__read) || function (o, n) {
|
|
74956
75167
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
74957
75168
|
if (!m) return o;
|
|
74958
75169
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -75006,7 +75217,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75006
75217
|
var style = map.getStyle();
|
|
75007
75218
|
return Object.entries(style.sources)
|
|
75008
75219
|
.filter(function (_a) {
|
|
75009
|
-
var _b = __read$
|
|
75220
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
75010
75221
|
return style.layers
|
|
75011
75222
|
.filter(function (layer) { return layer && layer['source'] == key; })
|
|
75012
75223
|
.reduce(function (isVisible, layer) {
|
|
@@ -75014,7 +75225,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75014
75225
|
return !isLayerHidden || isVisible;
|
|
75015
75226
|
}, false);
|
|
75016
75227
|
}).map(function (_a) {
|
|
75017
|
-
var _b = __read$
|
|
75228
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
75018
75229
|
return map.getSource(key);
|
|
75019
75230
|
});
|
|
75020
75231
|
};
|
|
@@ -75025,8 +75236,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75025
75236
|
resolve(source);
|
|
75026
75237
|
}
|
|
75027
75238
|
else {
|
|
75028
|
-
// force source loading as same resolved source in different style will get cached and won't emit events
|
|
75029
|
-
source.load();
|
|
75030
75239
|
source.on('data', function sourceDataListener(event) {
|
|
75031
75240
|
if (event.sourceDataType == 'metadata') {
|
|
75032
75241
|
source.off('data', sourceDataListener);
|
|
@@ -75089,10 +75298,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75089
75298
|
}, function () { return document.createElement('span'); });
|
|
75090
75299
|
});
|
|
75091
75300
|
var registeredRuleSet = new Set(Object.values(registeredRules));
|
|
75092
|
-
var redundantRules = new Set(__spreadArray$4([], __read$
|
|
75093
|
-
var redundantElements = new Set(__spreadArray$4([], __read$
|
|
75301
|
+
var redundantRules = new Set(__spreadArray$4([], __read$9(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
|
|
75302
|
+
var redundantElements = new Set(__spreadArray$4([], __read$9(redundantRules)).map(function (rule) { return rule.getElement(); }));
|
|
75094
75303
|
// eject redundant rules associated elements altogether
|
|
75095
|
-
__spreadArray$4([], __read$
|
|
75304
|
+
__spreadArray$4([], __read$9(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
|
|
75096
75305
|
.forEach(function (elem) { return elem.parentElement.removeChild(elem); });
|
|
75097
75306
|
_this.rules = Object.values(registeredRules);
|
|
75098
75307
|
var attributionsToApply = attributions
|
|
@@ -75128,7 +75337,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75128
75337
|
var visibleTextNodes = function (elem) {
|
|
75129
75338
|
return Array.from(elem.style.display != 'none' ? elem.children : [])
|
|
75130
75339
|
.map(function (elem) { return visibleTextNodes(elem); })
|
|
75131
|
-
.reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$
|
|
75340
|
+
.reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$9(flattened)), __read$9(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
|
|
75132
75341
|
};
|
|
75133
75342
|
var newRenderContext = _this.virtualContext.cloneNode(true);
|
|
75134
75343
|
var visibleNodes = visibleTextNodes(newRenderContext);
|
|
@@ -75143,7 +75352,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75143
75352
|
// }
|
|
75144
75353
|
// });
|
|
75145
75354
|
// strip all predefined keywords
|
|
75146
|
-
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$
|
|
75355
|
+
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$9(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
|
|
75147
75356
|
// strip year from each node
|
|
75148
75357
|
// visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
|
|
75149
75358
|
// deduplicate attribution text
|
|
@@ -78108,7 +78317,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78108
78317
|
};
|
|
78109
78318
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
78110
78319
|
};
|
|
78111
|
-
var __read$
|
|
78320
|
+
var __read$a = (window && window.__read) || function (o, n) {
|
|
78112
78321
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
78113
78322
|
if (!m) return o;
|
|
78114
78323
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -78306,7 +78515,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78306
78515
|
var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
|
|
78307
78516
|
if (callbacks) {
|
|
78308
78517
|
callbacks.forEach(function (_a, callback) {
|
|
78309
|
-
var _b = __read$
|
|
78518
|
+
var _b = __read$a(_a, 2), _ = _b[0], once = _b[1];
|
|
78310
78519
|
// Invoking a listener this way circumvents the fire once logic in the modified callback.
|
|
78311
78520
|
// So we check if the callback was added as a fire once and if so remove it here.
|
|
78312
78521
|
if (once) {
|
|
@@ -78414,7 +78623,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78414
78623
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
78415
78624
|
callbackDict.forEach(function (_a) {
|
|
78416
78625
|
var e_6, _b;
|
|
78417
|
-
var _c = __read$
|
|
78626
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
78418
78627
|
try {
|
|
78419
78628
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
78420
78629
|
var mbLayerId = _e.value;
|
|
@@ -78447,7 +78656,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78447
78656
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
78448
78657
|
callbackDict.forEach(function (_a) {
|
|
78449
78658
|
var e_7, _b;
|
|
78450
|
-
var _c = __read$
|
|
78659
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
78451
78660
|
try {
|
|
78452
78661
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
78453
78662
|
var mbLayerId = _e.value;
|
|
@@ -78846,7 +79055,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78846
79055
|
};
|
|
78847
79056
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
78848
79057
|
};
|
|
78849
|
-
var __read$
|
|
79058
|
+
var __read$b = (window && window.__read) || function (o, n) {
|
|
78850
79059
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
78851
79060
|
if (!m) return o;
|
|
78852
79061
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -79298,7 +79507,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
79298
79507
|
// If a specified layer hasn't been added to the map throw an error.
|
|
79299
79508
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
79300
79509
|
if (index > -1) {
|
|
79301
|
-
layerIds.push.apply(layerIds, __spreadArray$5([], __read$
|
|
79510
|
+
layerIds.push.apply(layerIds, __spreadArray$5([], __read$b(this_1.layerIndex[index]._getLayerIds()
|
|
79302
79511
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
79303
79512
|
}
|
|
79304
79513
|
else {
|
|
@@ -80041,7 +80250,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80041
80250
|
};
|
|
80042
80251
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
80043
80252
|
};
|
|
80044
|
-
var __read$
|
|
80253
|
+
var __read$c = (window && window.__read) || function (o, n) {
|
|
80045
80254
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
80046
80255
|
if (!m) return o;
|
|
80047
80256
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -80132,7 +80341,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80132
80341
|
}
|
|
80133
80342
|
finally { if (e_1) throw e_1.error; }
|
|
80134
80343
|
}
|
|
80135
|
-
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$
|
|
80344
|
+
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valuesList)));
|
|
80136
80345
|
};
|
|
80137
80346
|
return CameraBoundsOptions;
|
|
80138
80347
|
}(Options));
|
|
@@ -80605,7 +80814,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80605
80814
|
};
|
|
80606
80815
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
80607
80816
|
};
|
|
80608
|
-
var __read$
|
|
80817
|
+
var __read$d = (window && window.__read) || function (o, n) {
|
|
80609
80818
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
80610
80819
|
if (!m) return o;
|
|
80611
80820
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -80780,7 +80989,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80780
80989
|
finally { if (e_1) throw e_1.error; }
|
|
80781
80990
|
}
|
|
80782
80991
|
// Then execute the standard merge behavior.
|
|
80783
|
-
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$
|
|
80992
|
+
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
|
|
80784
80993
|
};
|
|
80785
80994
|
return StyleOptions;
|
|
80786
80995
|
}(Options));
|
|
@@ -80822,7 +81031,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80822
81031
|
};
|
|
80823
81032
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
80824
81033
|
};
|
|
80825
|
-
var __read$
|
|
81034
|
+
var __read$e = (window && window.__read) || function (o, n) {
|
|
80826
81035
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
80827
81036
|
if (!m) return o;
|
|
80828
81037
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -81073,10 +81282,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81073
81282
|
// won't change default behavior in Options as usually that's what desired
|
|
81074
81283
|
// instead capture it here and reassign.
|
|
81075
81284
|
var currentTransforms = this._transformers;
|
|
81076
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$
|
|
81285
|
+
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$e(flattened)), __read$e(value._transformers || [])); }, []) : [];
|
|
81077
81286
|
// Then execute the standard merge behavior.
|
|
81078
81287
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
81079
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$
|
|
81288
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$e(valueList)));
|
|
81080
81289
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
81081
81290
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
81082
81291
|
}
|
|
@@ -81088,7 +81297,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81088
81297
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
81089
81298
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
81090
81299
|
}
|
|
81091
|
-
this._transformers = __spreadArray$8(__spreadArray$8([], __read$
|
|
81300
|
+
this._transformers = __spreadArray$8(__spreadArray$8([], __read$e(currentTransforms || [])), __read$e(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
81092
81301
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
81093
81302
|
this._transformers.push(this.transformRequest);
|
|
81094
81303
|
}
|
|
@@ -81284,7 +81493,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81284
81493
|
};
|
|
81285
81494
|
return __assign$8.apply(this, arguments);
|
|
81286
81495
|
};
|
|
81287
|
-
var __awaiter$
|
|
81496
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
81288
81497
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
81289
81498
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
81290
81499
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -81293,7 +81502,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81293
81502
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81294
81503
|
});
|
|
81295
81504
|
};
|
|
81296
|
-
var __generator$
|
|
81505
|
+
var __generator$4 = (window && window.__generator) || function (thisArg, body) {
|
|
81297
81506
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
81298
81507
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
81299
81508
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -81320,7 +81529,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81320
81529
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
81321
81530
|
}
|
|
81322
81531
|
};
|
|
81323
|
-
var __read$
|
|
81532
|
+
var __read$f = (window && window.__read) || function (o, n) {
|
|
81324
81533
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
81325
81534
|
if (!m) return o;
|
|
81326
81535
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -81387,9 +81596,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81387
81596
|
_this._progressiveLoadingState.mapStyle = currentMapStyle;
|
|
81388
81597
|
// Select deferrable layers
|
|
81389
81598
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
81390
|
-
var _b = __read$
|
|
81599
|
+
var _b = __read$f(_a, 2), groupName = _b[0], layers = _b[1];
|
|
81391
81600
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
81392
|
-
return __spreadArray$9(__spreadArray$9([], __read$
|
|
81601
|
+
return __spreadArray$9(__spreadArray$9([], __read$f(deferred)), __read$f(layers.filter(function (layer) {
|
|
81393
81602
|
var _a;
|
|
81394
81603
|
// Exclude custom layers
|
|
81395
81604
|
if (layer.type === 'custom')
|
|
@@ -81470,9 +81679,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81470
81679
|
|| definitions.configurations[0];
|
|
81471
81680
|
}
|
|
81472
81681
|
};
|
|
81473
|
-
this._lookUpAsync = function (options) { return __awaiter$
|
|
81682
|
+
this._lookUpAsync = function (options) { return __awaiter$4(_this, void 0, void 0, function () {
|
|
81474
81683
|
var definitions, result;
|
|
81475
|
-
return __generator$
|
|
81684
|
+
return __generator$4(this, function (_a) {
|
|
81476
81685
|
switch (_a.label) {
|
|
81477
81686
|
case 0: return [4 /*yield*/, this.definitions()];
|
|
81478
81687
|
case 1:
|
|
@@ -81658,8 +81867,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81658
81867
|
return style.theme.toLowerCase();
|
|
81659
81868
|
};
|
|
81660
81869
|
StyleManager.prototype.getThemeAsync = function (styleOptions) {
|
|
81661
|
-
return __awaiter$
|
|
81662
|
-
return __generator$
|
|
81870
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
81871
|
+
return __generator$4(this, function (_a) {
|
|
81663
81872
|
switch (_a.label) {
|
|
81664
81873
|
case 0: return [4 /*yield*/, this._lookUpAsync(styleOptions)];
|
|
81665
81874
|
case 1: return [2 /*return*/, (_a.sent()).theme];
|
|
@@ -81749,9 +81958,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81749
81958
|
setLayerVisibility(nextLayer, styleOptions.showBuildingModels ? 'visible' : 'none');
|
|
81750
81959
|
}
|
|
81751
81960
|
// Set visibility of traffic layers depending on traffic settings.
|
|
81752
|
-
if (trafficOptions.flow !== 'none' &&
|
|
81753
|
-
layerGroup === "traffic_" + trafficOptions.flow
|
|
81754
|
-
|
|
81961
|
+
if (trafficOptions.flow !== 'none' && nextLayer.type == 'line' &&
|
|
81962
|
+
(layerGroup === "traffic_" + trafficOptions.flow ||
|
|
81963
|
+
// Check if deprecated flow types are used and the layer is a bing-traffic layer.
|
|
81964
|
+
// Needed for backwards compatibility in Bing styles to support deprecated flow types.
|
|
81965
|
+
(['absolute', 'relative-delay'].includes(trafficOptions.flow) && nextLayer['source'] === "bing-traffic"))) {
|
|
81755
81966
|
setLayerVisibility(nextLayer, 'visible');
|
|
81756
81967
|
}
|
|
81757
81968
|
// Set visibility of labels
|
|
@@ -81780,7 +81991,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81780
81991
|
// A FundamentalMapLayer (grouped layer) representation of the next style must be built.
|
|
81781
81992
|
var previousLayers = this.map.layers.getLayers();
|
|
81782
81993
|
var nextLayers = Object.entries(layerGroupLayers).map(function (_a) {
|
|
81783
|
-
var _b = __read$
|
|
81994
|
+
var _b = __read$f(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
|
|
81784
81995
|
return _this._buildFundamentalLayerFrom(layerGroupMapboxLayers, layerGroupName);
|
|
81785
81996
|
});
|
|
81786
81997
|
// Update FundamentalMapLayers in LayerManager
|
|
@@ -81879,10 +82090,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81879
82090
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
81880
82091
|
var _a, _b;
|
|
81881
82092
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
81882
|
-
return __awaiter$
|
|
82093
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
81883
82094
|
var requestParams, fetchOptions;
|
|
81884
82095
|
var _c;
|
|
81885
|
-
return __generator$
|
|
82096
|
+
return __generator$4(this, function (_d) {
|
|
81886
82097
|
switch (_d.label) {
|
|
81887
82098
|
case 0:
|
|
81888
82099
|
requestParams = {
|
|
@@ -81945,6 +82156,123 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81945
82156
|
*/
|
|
81946
82157
|
var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
|
|
81947
82158
|
|
|
82159
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
82160
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
82161
|
+
if (m) return m.call(o);
|
|
82162
|
+
if (o && typeof o.length === "number") return {
|
|
82163
|
+
next: function () {
|
|
82164
|
+
if (o && i >= o.length) o = void 0;
|
|
82165
|
+
return { value: o && o[i++], done: !o };
|
|
82166
|
+
}
|
|
82167
|
+
};
|
|
82168
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
82169
|
+
};
|
|
82170
|
+
/**
|
|
82171
|
+
* @internal
|
|
82172
|
+
* A manager for the map control's hidden indicators.
|
|
82173
|
+
* Exposed through the `indicators` property of the `atlas.Map` class.
|
|
82174
|
+
* Cannot be instantiated by the user.
|
|
82175
|
+
*/
|
|
82176
|
+
var AccessibleIndicatorManager = /** @class */ (function () {
|
|
82177
|
+
/**
|
|
82178
|
+
* Constructs the indicator manager to be exposed only through the `indicators` property of the `Map` class.
|
|
82179
|
+
* @param map The map whose indicators are being managed by this.
|
|
82180
|
+
* @internal
|
|
82181
|
+
*/
|
|
82182
|
+
function AccessibleIndicatorManager(map) {
|
|
82183
|
+
this.map = map;
|
|
82184
|
+
this.indicators = new Set();
|
|
82185
|
+
}
|
|
82186
|
+
/**
|
|
82187
|
+
* Adds an indicator to the map
|
|
82188
|
+
* @param indicator The indicator(s) to add.
|
|
82189
|
+
*/
|
|
82190
|
+
AccessibleIndicatorManager.prototype.add = function (indicator) {
|
|
82191
|
+
var e_1, _a;
|
|
82192
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
82193
|
+
try {
|
|
82194
|
+
for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
|
|
82195
|
+
var i = indicator_1_1.value;
|
|
82196
|
+
if (!this.indicators.has(i)) {
|
|
82197
|
+
this.indicators.add(i);
|
|
82198
|
+
i.attach(this.map);
|
|
82199
|
+
}
|
|
82200
|
+
}
|
|
82201
|
+
}
|
|
82202
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
82203
|
+
finally {
|
|
82204
|
+
try {
|
|
82205
|
+
if (indicator_1_1 && !indicator_1_1.done && (_a = indicator_1.return)) _a.call(indicator_1);
|
|
82206
|
+
}
|
|
82207
|
+
finally { if (e_1) throw e_1.error; }
|
|
82208
|
+
}
|
|
82209
|
+
};
|
|
82210
|
+
/**
|
|
82211
|
+
* Removes all indicators from the map.
|
|
82212
|
+
*/
|
|
82213
|
+
AccessibleIndicatorManager.prototype.clear = function () {
|
|
82214
|
+
var _this = this;
|
|
82215
|
+
this.indicators.forEach(function (indicator) {
|
|
82216
|
+
_this.indicators.delete(indicator);
|
|
82217
|
+
indicator.remove();
|
|
82218
|
+
});
|
|
82219
|
+
};
|
|
82220
|
+
/**
|
|
82221
|
+
* Removes an indicator from the map
|
|
82222
|
+
* @param indicator The indicator(s) to remove.
|
|
82223
|
+
*/
|
|
82224
|
+
AccessibleIndicatorManager.prototype.remove = function (indicator) {
|
|
82225
|
+
var e_2, _a;
|
|
82226
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
82227
|
+
try {
|
|
82228
|
+
for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
|
|
82229
|
+
var i = indicator_2_1.value;
|
|
82230
|
+
if (this.indicators.has(i)) {
|
|
82231
|
+
this.indicators.delete(i);
|
|
82232
|
+
i.remove();
|
|
82233
|
+
}
|
|
82234
|
+
}
|
|
82235
|
+
}
|
|
82236
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
82237
|
+
finally {
|
|
82238
|
+
try {
|
|
82239
|
+
if (indicator_2_1 && !indicator_2_1.done && (_a = indicator_2.return)) _a.call(indicator_2);
|
|
82240
|
+
}
|
|
82241
|
+
finally { if (e_2) throw e_2.error; }
|
|
82242
|
+
}
|
|
82243
|
+
};
|
|
82244
|
+
/**
|
|
82245
|
+
* Returns the indicators currently attached to the map.
|
|
82246
|
+
*/
|
|
82247
|
+
AccessibleIndicatorManager.prototype.getIndicators = function () {
|
|
82248
|
+
return Array.from(this.indicators);
|
|
82249
|
+
};
|
|
82250
|
+
/**
|
|
82251
|
+
* Returns the div element that should contain all the indicator containers.
|
|
82252
|
+
* Creates it if it doesn't already exist.
|
|
82253
|
+
* @internal
|
|
82254
|
+
*/
|
|
82255
|
+
AccessibleIndicatorManager.prototype._getCollectionDiv = function () {
|
|
82256
|
+
var collection = this.map.getMapContainer()
|
|
82257
|
+
.querySelector("." + AccessibleIndicatorManager.Css.collection);
|
|
82258
|
+
if (!collection) {
|
|
82259
|
+
// If the collection div doesn't exist create it.
|
|
82260
|
+
collection = document.createElement("div");
|
|
82261
|
+
collection.setAttribute("aria-label", "map data");
|
|
82262
|
+
// Set the container role to listbox, and the descents' role to option, so the reader will read the listbox as a list.
|
|
82263
|
+
// For example, NVDA will read "data point, 1 of 1" when the indicator is focused.
|
|
82264
|
+
collection.setAttribute("role", "listbox");
|
|
82265
|
+
collection.classList.add(AccessibleIndicatorManager.Css.collection);
|
|
82266
|
+
this.map.getMapContainer().appendChild(collection);
|
|
82267
|
+
}
|
|
82268
|
+
return collection;
|
|
82269
|
+
};
|
|
82270
|
+
AccessibleIndicatorManager.Css = {
|
|
82271
|
+
collection: "accessible-indicator-collection-container"
|
|
82272
|
+
};
|
|
82273
|
+
return AccessibleIndicatorManager;
|
|
82274
|
+
}());
|
|
82275
|
+
|
|
81948
82276
|
var __extends$19 = (window && window.__extends) || (function () {
|
|
81949
82277
|
var extendStatics = function (d, b) {
|
|
81950
82278
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -81971,7 +82299,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81971
82299
|
};
|
|
81972
82300
|
return __assign$9.apply(this, arguments);
|
|
81973
82301
|
};
|
|
81974
|
-
var __awaiter$
|
|
82302
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
81975
82303
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
81976
82304
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
81977
82305
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -81980,7 +82308,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81980
82308
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81981
82309
|
});
|
|
81982
82310
|
};
|
|
81983
|
-
var __generator$
|
|
82311
|
+
var __generator$5 = (window && window.__generator) || function (thisArg, body) {
|
|
81984
82312
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
81985
82313
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
81986
82314
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -82007,7 +82335,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82007
82335
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
82008
82336
|
}
|
|
82009
82337
|
};
|
|
82010
|
-
var __read$
|
|
82338
|
+
var __read$g = (window && window.__read) || function (o, n) {
|
|
82011
82339
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
82012
82340
|
if (!m) return o;
|
|
82013
82341
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -82028,7 +82356,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82028
82356
|
to[j] = from[i];
|
|
82029
82357
|
return to;
|
|
82030
82358
|
};
|
|
82031
|
-
var __values$
|
|
82359
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
82032
82360
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
82033
82361
|
if (m) return m.call(o);
|
|
82034
82362
|
if (o && typeof o.length === "number") return {
|
|
@@ -82141,6 +82469,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82141
82469
|
_this.markers = new HtmlMarkerManager(_this);
|
|
82142
82470
|
_this.sources = new SourceManager(_this);
|
|
82143
82471
|
_this.popups = new PopupManager(_this);
|
|
82472
|
+
_this.indicators = new AccessibleIndicatorManager(_this);
|
|
82144
82473
|
// Add CSS classes and set attributes for DOM elements.
|
|
82145
82474
|
_this.map.getContainer().classList.add(Map.Css.container);
|
|
82146
82475
|
_this.map.getCanvasContainer().classList.add(Map.Css.canvasContainer);
|
|
@@ -82152,9 +82481,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82152
82481
|
showLogo: _this.styleOptions.showLogo,
|
|
82153
82482
|
customAttribution: _this.styleOptions.customAttribution
|
|
82154
82483
|
});
|
|
82155
|
-
_this.controls.add(_this.copyrightControl, {
|
|
82156
|
-
position: exports.ControlPosition.NonFixed
|
|
82157
|
-
});
|
|
82158
82484
|
// Initialize state of map
|
|
82159
82485
|
// --> Initialize the authentication manager
|
|
82160
82486
|
var authManInit = _this.authentication ?
|
|
@@ -82181,14 +82507,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82181
82507
|
_this._setAutoResize(_this.styleOptions.autoResize);
|
|
82182
82508
|
_this.map.showTileBoundaries = _this.styleOptions.showTileBoundaries;
|
|
82183
82509
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
82184
|
-
|
|
82185
|
-
|
|
82186
|
-
|
|
82510
|
+
authManInit
|
|
82511
|
+
.then(function () { return _this.styles.initStyleset(); })
|
|
82512
|
+
.then(function (definitions) {
|
|
82187
82513
|
// Check that the map hasn't been removed for any reason.
|
|
82188
82514
|
// If so no need to finish styling the map.
|
|
82189
82515
|
if (_this.removed) {
|
|
82190
82516
|
return;
|
|
82191
82517
|
}
|
|
82518
|
+
// Add controls after initStyleset to prevent redundant initStyleset calls
|
|
82519
|
+
_this.controls.add(_this.copyrightControl, {
|
|
82520
|
+
position: exports.ControlPosition.NonFixed
|
|
82521
|
+
});
|
|
82192
82522
|
if (_this.authentication && !_this.authentication.getToken()) {
|
|
82193
82523
|
throw new Error("AuthenticationManager finished initializing, but no token is available");
|
|
82194
82524
|
}
|
|
@@ -82284,6 +82614,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82284
82614
|
else {
|
|
82285
82615
|
this.accessibleMapDelegate.removeFromMap();
|
|
82286
82616
|
}
|
|
82617
|
+
if (this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration) {
|
|
82618
|
+
this.styles.initPromise = null;
|
|
82619
|
+
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
82620
|
+
this.setStyle({});
|
|
82621
|
+
}
|
|
82287
82622
|
};
|
|
82288
82623
|
/**
|
|
82289
82624
|
* Adds request transformer
|
|
@@ -82833,7 +83168,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82833
83168
|
urls = layer.getOptions().subdomains || [];
|
|
82834
83169
|
}
|
|
82835
83170
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
82836
|
-
urls.push.apply(urls, __spreadArray$a([], __read$
|
|
83171
|
+
urls.push.apply(urls, __spreadArray$a([], __read$g(tileSources)));
|
|
82837
83172
|
layer._setOptionsNoUpdate({
|
|
82838
83173
|
subdomains: urls
|
|
82839
83174
|
});
|
|
@@ -82855,7 +83190,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82855
83190
|
Map.prototype.removeLayers = function (layerNames) {
|
|
82856
83191
|
var e_1, _a;
|
|
82857
83192
|
try {
|
|
82858
|
-
for (var layerNames_1 = __values$
|
|
83193
|
+
for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
|
|
82859
83194
|
var layerName = layerNames_1_1.value;
|
|
82860
83195
|
// Previously calling removeLayers for layers that didn't exist in the map just did nothing.
|
|
82861
83196
|
// Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
|
|
@@ -82997,6 +83332,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82997
83332
|
this.layers.clear();
|
|
82998
83333
|
this.sources.clear();
|
|
82999
83334
|
this.markers.clear();
|
|
83335
|
+
this.indicators.clear();
|
|
83000
83336
|
};
|
|
83001
83337
|
/**
|
|
83002
83338
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
@@ -83049,7 +83385,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
83049
83385
|
var e_2, _a;
|
|
83050
83386
|
var positions = [];
|
|
83051
83387
|
try {
|
|
83052
|
-
for (var pixels_1 = __values$
|
|
83388
|
+
for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
|
|
83053
83389
|
var pixel = pixels_1_1.value;
|
|
83054
83390
|
var lngLat = this.map.unproject(pixel);
|
|
83055
83391
|
positions.push(new Position(lngLat.lng, lngLat.lat));
|
|
@@ -83072,7 +83408,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
83072
83408
|
var e_3, _a;
|
|
83073
83409
|
var pixels = [];
|
|
83074
83410
|
try {
|
|
83075
|
-
for (var positions_1 = __values$
|
|
83411
|
+
for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
83076
83412
|
var position = positions_1_1.value;
|
|
83077
83413
|
var point = this.map.project(position);
|
|
83078
83414
|
pixels.push(new Pixel(point.x, point.y));
|
|
@@ -83120,8 +83456,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
83120
83456
|
*/
|
|
83121
83457
|
Map.prototype._rebuildStyle = function (diff) {
|
|
83122
83458
|
if (diff === void 0) { diff = true; }
|
|
83123
|
-
return __awaiter$
|
|
83124
|
-
return __generator$
|
|
83459
|
+
return __awaiter$5(this, void 0, void 0, function () {
|
|
83460
|
+
return __generator$5(this, function (_a) {
|
|
83125
83461
|
this.styles.setStyle(this.styleOptions, diff);
|
|
83126
83462
|
this.imageSprite._restoreImages();
|
|
83127
83463
|
return [2 /*return*/];
|
|
@@ -83337,7 +83673,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
83337
83673
|
return Map;
|
|
83338
83674
|
}(EventEmitter));
|
|
83339
83675
|
|
|
83340
|
-
var __read$
|
|
83676
|
+
var __read$h = (window && window.__read) || function (o, n) {
|
|
83341
83677
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
83342
83678
|
if (!m) return o;
|
|
83343
83679
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -83499,7 +83835,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
83499
83835
|
lineLength = 50;
|
|
83500
83836
|
}
|
|
83501
83837
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
83502
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$
|
|
83838
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$h((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
83503
83839
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
83504
83840
|
if (w < width) {
|
|
83505
83841
|
width = w;
|