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-core.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
|
}
|
|
@@ -59477,7 +59685,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59477
59685
|
return MapLabelCache;
|
|
59478
59686
|
}());
|
|
59479
59687
|
|
|
59480
|
-
var __awaiter$
|
|
59688
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
59481
59689
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
59482
59690
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
59483
59691
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -59486,7 +59694,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59486
59694
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
59487
59695
|
});
|
|
59488
59696
|
};
|
|
59489
|
-
var __generator$
|
|
59697
|
+
var __generator$2 = (window && window.__generator) || function (thisArg, body) {
|
|
59490
59698
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
59491
59699
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
59492
59700
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -59513,7 +59721,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59513
59721
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59514
59722
|
}
|
|
59515
59723
|
};
|
|
59516
|
-
var __read$
|
|
59724
|
+
var __read$7 = (window && window.__read) || function (o, n) {
|
|
59517
59725
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
59518
59726
|
if (!m) return o;
|
|
59519
59727
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -59766,9 +59974,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59766
59974
|
// Flag indicating if detailed descriptions which include zoom, lat/lon information should be returned.
|
|
59767
59975
|
this._returnDetailedDescriptions = false;
|
|
59768
59976
|
/** Event handler for shortcuts. */
|
|
59769
|
-
this._shortcutListener = function (e) { return __awaiter$
|
|
59977
|
+
this._shortcutListener = function (e) { return __awaiter$2(_this, void 0, void 0, function () {
|
|
59770
59978
|
var cam, styleOps, lang, style, camDesc;
|
|
59771
|
-
return __generator$
|
|
59979
|
+
return __generator$2(this, function (_a) {
|
|
59772
59980
|
switch (_a.label) {
|
|
59773
59981
|
case 0:
|
|
59774
59982
|
if (!(e.altKey && e.ctrlKey && e.keyCode === 68)) return [3 /*break*/, 2];
|
|
@@ -59836,9 +60044,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59836
60044
|
/** Event handler for when the mouse or touch goes down */
|
|
59837
60045
|
this._onPointerDown = function (event) {
|
|
59838
60046
|
_this._lastPointerPos = _this._getEventPos(event);
|
|
59839
|
-
_this._pointerTimeout = setTimeout(function () { return __awaiter$
|
|
60047
|
+
_this._pointerTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
59840
60048
|
var styleOps, lang, style, cam, loc;
|
|
59841
|
-
return __generator$
|
|
60049
|
+
return __generator$2(this, function (_a) {
|
|
59842
60050
|
switch (_a.label) {
|
|
59843
60051
|
case 0:
|
|
59844
60052
|
styleOps = this._map.getStyle();
|
|
@@ -59896,9 +60104,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59896
60104
|
delete _this._rotateTimeout;
|
|
59897
60105
|
};
|
|
59898
60106
|
/** Called when the map has finished changing styles and is ready to create a new description */
|
|
59899
|
-
this._updateStyle = function () { return __awaiter$
|
|
60107
|
+
this._updateStyle = function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
59900
60108
|
var cam, styleOps, lang, style, camDesc;
|
|
59901
|
-
return __generator$
|
|
60109
|
+
return __generator$2(this, function (_a) {
|
|
59902
60110
|
switch (_a.label) {
|
|
59903
60111
|
case 0:
|
|
59904
60112
|
cam = this._map.getCamera();
|
|
@@ -59950,9 +60158,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59950
60158
|
delete _this._moveTimeout;
|
|
59951
60159
|
}
|
|
59952
60160
|
// Send the new description to the map.
|
|
59953
|
-
_this._moveTimeout = setTimeout(function () { return __awaiter$
|
|
60161
|
+
_this._moveTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
59954
60162
|
var loc;
|
|
59955
|
-
return __generator$
|
|
60163
|
+
return __generator$2(this, function (_a) {
|
|
59956
60164
|
switch (_a.label) {
|
|
59957
60165
|
case 0:
|
|
59958
60166
|
// Clear the rotate timeout as the move description will cover rotation.
|
|
@@ -59997,7 +60205,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59997
60205
|
// Derive polygon layers from the label config.
|
|
59998
60206
|
_this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
|
|
59999
60207
|
if (cur.polygonSources) {
|
|
60000
|
-
acc.push.apply(acc, __spreadArray$2([], __read$
|
|
60208
|
+
acc.push.apply(acc, __spreadArray$2([], __read$7(cur.polygonSources)));
|
|
60001
60209
|
}
|
|
60002
60210
|
return acc;
|
|
60003
60211
|
}, []);
|
|
@@ -60057,7 +60265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60057
60265
|
};
|
|
60058
60266
|
/** Checks if the location has changed enough to justify a new description */
|
|
60059
60267
|
MapViewDescriptor.prototype._checkLocThreshold = function (newCenter, lastCenter) {
|
|
60060
|
-
var _a = __read$
|
|
60268
|
+
var _a = __read$7(this._map.positionsToPixels([lastCenter, newCenter]), 2), lastPixel = _a[0], newPixel = _a[1];
|
|
60061
60269
|
return Pixel.getDistance(lastPixel, newPixel) >= this._moveThreshold;
|
|
60062
60270
|
};
|
|
60063
60271
|
/** Checks if the heading has changed enough to justify a new description */
|
|
@@ -60082,10 +60290,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60082
60290
|
* @param cam The map camera informaiton.
|
|
60083
60291
|
*/
|
|
60084
60292
|
MapViewDescriptor.prototype._getLocDesc = function (cam, lang, style) {
|
|
60085
|
-
return __awaiter$
|
|
60293
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
60086
60294
|
var info_1, cPx_1, intersects_1, intersectingPolygon, intersectingType_1, i, cnt, layerInfo, cl_1;
|
|
60087
60295
|
var _this = this;
|
|
60088
|
-
return __generator$
|
|
60296
|
+
return __generator$2(this, function (_a) {
|
|
60089
60297
|
switch (_a.label) {
|
|
60090
60298
|
case 0:
|
|
60091
60299
|
if (!(style !== "blank")) return [3 /*break*/, 3];
|
|
@@ -60869,14 +61077,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60869
61077
|
var trafficOptions = _this.map.getTraffic();
|
|
60870
61078
|
if (trafficOptions.flow !== "none") {
|
|
60871
61079
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + trafficOptions.flow);
|
|
61080
|
+
if (!trafficFlowComponent && ['absolute', 'relative-delay'].includes(trafficOptions.flow)) {
|
|
61081
|
+
// Fallback to relative if deprecated flow type is used
|
|
61082
|
+
trafficFlowComponent = _this.map.layers.getLayerById("traffic_relative");
|
|
61083
|
+
}
|
|
60872
61084
|
if (trafficFlowComponent) {
|
|
60873
|
-
_this.lastFlowMode =
|
|
61085
|
+
_this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
|
|
60874
61086
|
trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
|
|
60875
61087
|
}
|
|
60876
61088
|
}
|
|
60877
61089
|
};
|
|
60878
61090
|
this.removeFromMap = function () {
|
|
60879
|
-
var trafficOptions = _this.map.getTraffic();
|
|
60880
61091
|
if (_this.lastFlowMode != "none") {
|
|
60881
61092
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
|
|
60882
61093
|
if (trafficFlowComponent) {
|
|
@@ -61129,7 +61340,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61129
61340
|
return IncidentPopupFactory;
|
|
61130
61341
|
}());
|
|
61131
61342
|
|
|
61132
|
-
var __awaiter$
|
|
61343
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
61133
61344
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
61134
61345
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
61135
61346
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -61138,7 +61349,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61138
61349
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
61139
61350
|
});
|
|
61140
61351
|
};
|
|
61141
|
-
var __generator$
|
|
61352
|
+
var __generator$3 = (window && window.__generator) || function (thisArg, body) {
|
|
61142
61353
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
61143
61354
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
61144
61355
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -61192,10 +61403,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61192
61403
|
_this.map.events.add('moveend', _this.setAccessiblePopups);
|
|
61193
61404
|
};
|
|
61194
61405
|
this.accessiblePopups = [];
|
|
61195
|
-
this.setAccessiblePopups = function () { return __awaiter$
|
|
61406
|
+
this.setAccessiblePopups = function () { return __awaiter$3(_this, void 0, void 0, function () {
|
|
61196
61407
|
var features, localizedStrings, createPopup, insertHiddenBefore, insertHiddenInFront, addHidden;
|
|
61197
61408
|
var _this = this;
|
|
61198
|
-
return __generator$
|
|
61409
|
+
return __generator$3(this, function (_a) {
|
|
61199
61410
|
switch (_a.label) {
|
|
61200
61411
|
case 0:
|
|
61201
61412
|
this.accessiblePopups.forEach(function (popup) { return popup.remove(); });
|
|
@@ -64463,7 +64674,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64463
64674
|
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;
|
|
64464
64675
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64465
64676
|
};
|
|
64466
|
-
var __read$
|
|
64677
|
+
var __read$8 = (window && window.__read) || function (o, n) {
|
|
64467
64678
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
64468
64679
|
if (!m) return o;
|
|
64469
64680
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -64499,7 +64710,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64499
64710
|
];
|
|
64500
64711
|
var allowedAttributionAttributes = __spreadArray$3([
|
|
64501
64712
|
'href'
|
|
64502
|
-
], __read$
|
|
64713
|
+
], __read$8(attributionRuleAttributes));
|
|
64503
64714
|
var AttributionRuleProxy = /** @class */ (function () {
|
|
64504
64715
|
function AttributionRuleProxy(element, attributionChangeCallback) {
|
|
64505
64716
|
var _this = this;
|
|
@@ -64722,7 +64933,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64722
64933
|
};
|
|
64723
64934
|
AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
|
|
64724
64935
|
var _this = this;
|
|
64725
|
-
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$
|
|
64936
|
+
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$8(flat)), __read$8(copyrights)); }, []);
|
|
64726
64937
|
if (copyrights.length == 0) {
|
|
64727
64938
|
// no attribution for a provided tileset/bbox/z
|
|
64728
64939
|
return;
|
|
@@ -64771,7 +64982,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64771
64982
|
return AttributionRuleProxy;
|
|
64772
64983
|
}());
|
|
64773
64984
|
|
|
64774
|
-
var __read$
|
|
64985
|
+
var __read$9 = (window && window.__read) || function (o, n) {
|
|
64775
64986
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
64776
64987
|
if (!m) return o;
|
|
64777
64988
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -64825,7 +65036,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64825
65036
|
var style = map.getStyle();
|
|
64826
65037
|
return Object.entries(style.sources)
|
|
64827
65038
|
.filter(function (_a) {
|
|
64828
|
-
var _b = __read$
|
|
65039
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
64829
65040
|
return style.layers
|
|
64830
65041
|
.filter(function (layer) { return layer && layer['source'] == key; })
|
|
64831
65042
|
.reduce(function (isVisible, layer) {
|
|
@@ -64833,7 +65044,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64833
65044
|
return !isLayerHidden || isVisible;
|
|
64834
65045
|
}, false);
|
|
64835
65046
|
}).map(function (_a) {
|
|
64836
|
-
var _b = __read$
|
|
65047
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
64837
65048
|
return map.getSource(key);
|
|
64838
65049
|
});
|
|
64839
65050
|
};
|
|
@@ -64844,8 +65055,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64844
65055
|
resolve(source);
|
|
64845
65056
|
}
|
|
64846
65057
|
else {
|
|
64847
|
-
// force source loading as same resolved source in different style will get cached and won't emit events
|
|
64848
|
-
source.load();
|
|
64849
65058
|
source.on('data', function sourceDataListener(event) {
|
|
64850
65059
|
if (event.sourceDataType == 'metadata') {
|
|
64851
65060
|
source.off('data', sourceDataListener);
|
|
@@ -64908,10 +65117,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64908
65117
|
}, function () { return document.createElement('span'); });
|
|
64909
65118
|
});
|
|
64910
65119
|
var registeredRuleSet = new Set(Object.values(registeredRules));
|
|
64911
|
-
var redundantRules = new Set(__spreadArray$4([], __read$
|
|
64912
|
-
var redundantElements = new Set(__spreadArray$4([], __read$
|
|
65120
|
+
var redundantRules = new Set(__spreadArray$4([], __read$9(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
|
|
65121
|
+
var redundantElements = new Set(__spreadArray$4([], __read$9(redundantRules)).map(function (rule) { return rule.getElement(); }));
|
|
64913
65122
|
// eject redundant rules associated elements altogether
|
|
64914
|
-
__spreadArray$4([], __read$
|
|
65123
|
+
__spreadArray$4([], __read$9(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
|
|
64915
65124
|
.forEach(function (elem) { return elem.parentElement.removeChild(elem); });
|
|
64916
65125
|
_this.rules = Object.values(registeredRules);
|
|
64917
65126
|
var attributionsToApply = attributions
|
|
@@ -64947,7 +65156,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64947
65156
|
var visibleTextNodes = function (elem) {
|
|
64948
65157
|
return Array.from(elem.style.display != 'none' ? elem.children : [])
|
|
64949
65158
|
.map(function (elem) { return visibleTextNodes(elem); })
|
|
64950
|
-
.reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$
|
|
65159
|
+
.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; }));
|
|
64951
65160
|
};
|
|
64952
65161
|
var newRenderContext = _this.virtualContext.cloneNode(true);
|
|
64953
65162
|
var visibleNodes = visibleTextNodes(newRenderContext);
|
|
@@ -64962,7 +65171,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64962
65171
|
// }
|
|
64963
65172
|
// });
|
|
64964
65173
|
// strip all predefined keywords
|
|
64965
|
-
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$
|
|
65174
|
+
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$9(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
|
|
64966
65175
|
// strip year from each node
|
|
64967
65176
|
// visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
|
|
64968
65177
|
// deduplicate attribution text
|
|
@@ -67927,7 +68136,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
67927
68136
|
};
|
|
67928
68137
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
67929
68138
|
};
|
|
67930
|
-
var __read$
|
|
68139
|
+
var __read$a = (window && window.__read) || function (o, n) {
|
|
67931
68140
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
67932
68141
|
if (!m) return o;
|
|
67933
68142
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -68125,7 +68334,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68125
68334
|
var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
|
|
68126
68335
|
if (callbacks) {
|
|
68127
68336
|
callbacks.forEach(function (_a, callback) {
|
|
68128
|
-
var _b = __read$
|
|
68337
|
+
var _b = __read$a(_a, 2), _ = _b[0], once = _b[1];
|
|
68129
68338
|
// Invoking a listener this way circumvents the fire once logic in the modified callback.
|
|
68130
68339
|
// So we check if the callback was added as a fire once and if so remove it here.
|
|
68131
68340
|
if (once) {
|
|
@@ -68233,7 +68442,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68233
68442
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
68234
68443
|
callbackDict.forEach(function (_a) {
|
|
68235
68444
|
var e_6, _b;
|
|
68236
|
-
var _c = __read$
|
|
68445
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
68237
68446
|
try {
|
|
68238
68447
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
68239
68448
|
var mbLayerId = _e.value;
|
|
@@ -68266,7 +68475,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68266
68475
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
68267
68476
|
callbackDict.forEach(function (_a) {
|
|
68268
68477
|
var e_7, _b;
|
|
68269
|
-
var _c = __read$
|
|
68478
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
68270
68479
|
try {
|
|
68271
68480
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
68272
68481
|
var mbLayerId = _e.value;
|
|
@@ -68665,7 +68874,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68665
68874
|
};
|
|
68666
68875
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
68667
68876
|
};
|
|
68668
|
-
var __read$
|
|
68877
|
+
var __read$b = (window && window.__read) || function (o, n) {
|
|
68669
68878
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
68670
68879
|
if (!m) return o;
|
|
68671
68880
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -69117,7 +69326,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69117
69326
|
// If a specified layer hasn't been added to the map throw an error.
|
|
69118
69327
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
69119
69328
|
if (index > -1) {
|
|
69120
|
-
layerIds.push.apply(layerIds, __spreadArray$5([], __read$
|
|
69329
|
+
layerIds.push.apply(layerIds, __spreadArray$5([], __read$b(this_1.layerIndex[index]._getLayerIds()
|
|
69121
69330
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
69122
69331
|
}
|
|
69123
69332
|
else {
|
|
@@ -69860,7 +70069,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69860
70069
|
};
|
|
69861
70070
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
69862
70071
|
};
|
|
69863
|
-
var __read$
|
|
70072
|
+
var __read$c = (window && window.__read) || function (o, n) {
|
|
69864
70073
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
69865
70074
|
if (!m) return o;
|
|
69866
70075
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -69951,7 +70160,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69951
70160
|
}
|
|
69952
70161
|
finally { if (e_1) throw e_1.error; }
|
|
69953
70162
|
}
|
|
69954
|
-
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$
|
|
70163
|
+
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valuesList)));
|
|
69955
70164
|
};
|
|
69956
70165
|
return CameraBoundsOptions;
|
|
69957
70166
|
}(Options));
|
|
@@ -70424,7 +70633,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70424
70633
|
};
|
|
70425
70634
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
70426
70635
|
};
|
|
70427
|
-
var __read$
|
|
70636
|
+
var __read$d = (window && window.__read) || function (o, n) {
|
|
70428
70637
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
70429
70638
|
if (!m) return o;
|
|
70430
70639
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -70599,7 +70808,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70599
70808
|
finally { if (e_1) throw e_1.error; }
|
|
70600
70809
|
}
|
|
70601
70810
|
// Then execute the standard merge behavior.
|
|
70602
|
-
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$
|
|
70811
|
+
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
|
|
70603
70812
|
};
|
|
70604
70813
|
return StyleOptions;
|
|
70605
70814
|
}(Options));
|
|
@@ -70641,7 +70850,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70641
70850
|
};
|
|
70642
70851
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
70643
70852
|
};
|
|
70644
|
-
var __read$
|
|
70853
|
+
var __read$e = (window && window.__read) || function (o, n) {
|
|
70645
70854
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
70646
70855
|
if (!m) return o;
|
|
70647
70856
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -70892,10 +71101,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70892
71101
|
// won't change default behavior in Options as usually that's what desired
|
|
70893
71102
|
// instead capture it here and reassign.
|
|
70894
71103
|
var currentTransforms = this._transformers;
|
|
70895
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$
|
|
71104
|
+
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 || [])); }, []) : [];
|
|
70896
71105
|
// Then execute the standard merge behavior.
|
|
70897
71106
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
70898
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$
|
|
71107
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$e(valueList)));
|
|
70899
71108
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
70900
71109
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
70901
71110
|
}
|
|
@@ -70907,7 +71116,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70907
71116
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
70908
71117
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
70909
71118
|
}
|
|
70910
|
-
this._transformers = __spreadArray$8(__spreadArray$8([], __read$
|
|
71119
|
+
this._transformers = __spreadArray$8(__spreadArray$8([], __read$e(currentTransforms || [])), __read$e(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
70911
71120
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
70912
71121
|
this._transformers.push(this.transformRequest);
|
|
70913
71122
|
}
|
|
@@ -71103,7 +71312,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71103
71312
|
};
|
|
71104
71313
|
return __assign$8.apply(this, arguments);
|
|
71105
71314
|
};
|
|
71106
|
-
var __awaiter$
|
|
71315
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
71107
71316
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
71108
71317
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
71109
71318
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -71112,7 +71321,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71112
71321
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71113
71322
|
});
|
|
71114
71323
|
};
|
|
71115
|
-
var __generator$
|
|
71324
|
+
var __generator$4 = (window && window.__generator) || function (thisArg, body) {
|
|
71116
71325
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
71117
71326
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
71118
71327
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -71139,7 +71348,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71139
71348
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
71140
71349
|
}
|
|
71141
71350
|
};
|
|
71142
|
-
var __read$
|
|
71351
|
+
var __read$f = (window && window.__read) || function (o, n) {
|
|
71143
71352
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
71144
71353
|
if (!m) return o;
|
|
71145
71354
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -71206,9 +71415,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71206
71415
|
_this._progressiveLoadingState.mapStyle = currentMapStyle;
|
|
71207
71416
|
// Select deferrable layers
|
|
71208
71417
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
71209
|
-
var _b = __read$
|
|
71418
|
+
var _b = __read$f(_a, 2), groupName = _b[0], layers = _b[1];
|
|
71210
71419
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
71211
|
-
return __spreadArray$9(__spreadArray$9([], __read$
|
|
71420
|
+
return __spreadArray$9(__spreadArray$9([], __read$f(deferred)), __read$f(layers.filter(function (layer) {
|
|
71212
71421
|
var _a;
|
|
71213
71422
|
// Exclude custom layers
|
|
71214
71423
|
if (layer.type === 'custom')
|
|
@@ -71289,9 +71498,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71289
71498
|
|| definitions.configurations[0];
|
|
71290
71499
|
}
|
|
71291
71500
|
};
|
|
71292
|
-
this._lookUpAsync = function (options) { return __awaiter$
|
|
71501
|
+
this._lookUpAsync = function (options) { return __awaiter$4(_this, void 0, void 0, function () {
|
|
71293
71502
|
var definitions, result;
|
|
71294
|
-
return __generator$
|
|
71503
|
+
return __generator$4(this, function (_a) {
|
|
71295
71504
|
switch (_a.label) {
|
|
71296
71505
|
case 0: return [4 /*yield*/, this.definitions()];
|
|
71297
71506
|
case 1:
|
|
@@ -71477,8 +71686,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71477
71686
|
return style.theme.toLowerCase();
|
|
71478
71687
|
};
|
|
71479
71688
|
StyleManager.prototype.getThemeAsync = function (styleOptions) {
|
|
71480
|
-
return __awaiter$
|
|
71481
|
-
return __generator$
|
|
71689
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
71690
|
+
return __generator$4(this, function (_a) {
|
|
71482
71691
|
switch (_a.label) {
|
|
71483
71692
|
case 0: return [4 /*yield*/, this._lookUpAsync(styleOptions)];
|
|
71484
71693
|
case 1: return [2 /*return*/, (_a.sent()).theme];
|
|
@@ -71568,9 +71777,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71568
71777
|
setLayerVisibility(nextLayer, styleOptions.showBuildingModels ? 'visible' : 'none');
|
|
71569
71778
|
}
|
|
71570
71779
|
// Set visibility of traffic layers depending on traffic settings.
|
|
71571
|
-
if (trafficOptions.flow !== 'none' &&
|
|
71572
|
-
layerGroup === "traffic_" + trafficOptions.flow
|
|
71573
|
-
|
|
71780
|
+
if (trafficOptions.flow !== 'none' && nextLayer.type == 'line' &&
|
|
71781
|
+
(layerGroup === "traffic_" + trafficOptions.flow ||
|
|
71782
|
+
// Check if deprecated flow types are used and the layer is a bing-traffic layer.
|
|
71783
|
+
// Needed for backwards compatibility in Bing styles to support deprecated flow types.
|
|
71784
|
+
(['absolute', 'relative-delay'].includes(trafficOptions.flow) && nextLayer['source'] === "bing-traffic"))) {
|
|
71574
71785
|
setLayerVisibility(nextLayer, 'visible');
|
|
71575
71786
|
}
|
|
71576
71787
|
// Set visibility of labels
|
|
@@ -71599,7 +71810,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71599
71810
|
// A FundamentalMapLayer (grouped layer) representation of the next style must be built.
|
|
71600
71811
|
var previousLayers = this.map.layers.getLayers();
|
|
71601
71812
|
var nextLayers = Object.entries(layerGroupLayers).map(function (_a) {
|
|
71602
|
-
var _b = __read$
|
|
71813
|
+
var _b = __read$f(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
|
|
71603
71814
|
return _this._buildFundamentalLayerFrom(layerGroupMapboxLayers, layerGroupName);
|
|
71604
71815
|
});
|
|
71605
71816
|
// Update FundamentalMapLayers in LayerManager
|
|
@@ -71698,10 +71909,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71698
71909
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
71699
71910
|
var _a, _b;
|
|
71700
71911
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
71701
|
-
return __awaiter$
|
|
71912
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
71702
71913
|
var requestParams, fetchOptions;
|
|
71703
71914
|
var _c;
|
|
71704
|
-
return __generator$
|
|
71915
|
+
return __generator$4(this, function (_d) {
|
|
71705
71916
|
switch (_d.label) {
|
|
71706
71917
|
case 0:
|
|
71707
71918
|
requestParams = {
|
|
@@ -71764,6 +71975,123 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71764
71975
|
*/
|
|
71765
71976
|
var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
|
|
71766
71977
|
|
|
71978
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
71979
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
71980
|
+
if (m) return m.call(o);
|
|
71981
|
+
if (o && typeof o.length === "number") return {
|
|
71982
|
+
next: function () {
|
|
71983
|
+
if (o && i >= o.length) o = void 0;
|
|
71984
|
+
return { value: o && o[i++], done: !o };
|
|
71985
|
+
}
|
|
71986
|
+
};
|
|
71987
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
71988
|
+
};
|
|
71989
|
+
/**
|
|
71990
|
+
* @internal
|
|
71991
|
+
* A manager for the map control's hidden indicators.
|
|
71992
|
+
* Exposed through the `indicators` property of the `atlas.Map` class.
|
|
71993
|
+
* Cannot be instantiated by the user.
|
|
71994
|
+
*/
|
|
71995
|
+
var AccessibleIndicatorManager = /** @class */ (function () {
|
|
71996
|
+
/**
|
|
71997
|
+
* Constructs the indicator manager to be exposed only through the `indicators` property of the `Map` class.
|
|
71998
|
+
* @param map The map whose indicators are being managed by this.
|
|
71999
|
+
* @internal
|
|
72000
|
+
*/
|
|
72001
|
+
function AccessibleIndicatorManager(map) {
|
|
72002
|
+
this.map = map;
|
|
72003
|
+
this.indicators = new Set();
|
|
72004
|
+
}
|
|
72005
|
+
/**
|
|
72006
|
+
* Adds an indicator to the map
|
|
72007
|
+
* @param indicator The indicator(s) to add.
|
|
72008
|
+
*/
|
|
72009
|
+
AccessibleIndicatorManager.prototype.add = function (indicator) {
|
|
72010
|
+
var e_1, _a;
|
|
72011
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
72012
|
+
try {
|
|
72013
|
+
for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
|
|
72014
|
+
var i = indicator_1_1.value;
|
|
72015
|
+
if (!this.indicators.has(i)) {
|
|
72016
|
+
this.indicators.add(i);
|
|
72017
|
+
i.attach(this.map);
|
|
72018
|
+
}
|
|
72019
|
+
}
|
|
72020
|
+
}
|
|
72021
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
72022
|
+
finally {
|
|
72023
|
+
try {
|
|
72024
|
+
if (indicator_1_1 && !indicator_1_1.done && (_a = indicator_1.return)) _a.call(indicator_1);
|
|
72025
|
+
}
|
|
72026
|
+
finally { if (e_1) throw e_1.error; }
|
|
72027
|
+
}
|
|
72028
|
+
};
|
|
72029
|
+
/**
|
|
72030
|
+
* Removes all indicators from the map.
|
|
72031
|
+
*/
|
|
72032
|
+
AccessibleIndicatorManager.prototype.clear = function () {
|
|
72033
|
+
var _this = this;
|
|
72034
|
+
this.indicators.forEach(function (indicator) {
|
|
72035
|
+
_this.indicators.delete(indicator);
|
|
72036
|
+
indicator.remove();
|
|
72037
|
+
});
|
|
72038
|
+
};
|
|
72039
|
+
/**
|
|
72040
|
+
* Removes an indicator from the map
|
|
72041
|
+
* @param indicator The indicator(s) to remove.
|
|
72042
|
+
*/
|
|
72043
|
+
AccessibleIndicatorManager.prototype.remove = function (indicator) {
|
|
72044
|
+
var e_2, _a;
|
|
72045
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
72046
|
+
try {
|
|
72047
|
+
for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
|
|
72048
|
+
var i = indicator_2_1.value;
|
|
72049
|
+
if (this.indicators.has(i)) {
|
|
72050
|
+
this.indicators.delete(i);
|
|
72051
|
+
i.remove();
|
|
72052
|
+
}
|
|
72053
|
+
}
|
|
72054
|
+
}
|
|
72055
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
72056
|
+
finally {
|
|
72057
|
+
try {
|
|
72058
|
+
if (indicator_2_1 && !indicator_2_1.done && (_a = indicator_2.return)) _a.call(indicator_2);
|
|
72059
|
+
}
|
|
72060
|
+
finally { if (e_2) throw e_2.error; }
|
|
72061
|
+
}
|
|
72062
|
+
};
|
|
72063
|
+
/**
|
|
72064
|
+
* Returns the indicators currently attached to the map.
|
|
72065
|
+
*/
|
|
72066
|
+
AccessibleIndicatorManager.prototype.getIndicators = function () {
|
|
72067
|
+
return Array.from(this.indicators);
|
|
72068
|
+
};
|
|
72069
|
+
/**
|
|
72070
|
+
* Returns the div element that should contain all the indicator containers.
|
|
72071
|
+
* Creates it if it doesn't already exist.
|
|
72072
|
+
* @internal
|
|
72073
|
+
*/
|
|
72074
|
+
AccessibleIndicatorManager.prototype._getCollectionDiv = function () {
|
|
72075
|
+
var collection = this.map.getMapContainer()
|
|
72076
|
+
.querySelector("." + AccessibleIndicatorManager.Css.collection);
|
|
72077
|
+
if (!collection) {
|
|
72078
|
+
// If the collection div doesn't exist create it.
|
|
72079
|
+
collection = document.createElement("div");
|
|
72080
|
+
collection.setAttribute("aria-label", "map data");
|
|
72081
|
+
// Set the container role to listbox, and the descents' role to option, so the reader will read the listbox as a list.
|
|
72082
|
+
// For example, NVDA will read "data point, 1 of 1" when the indicator is focused.
|
|
72083
|
+
collection.setAttribute("role", "listbox");
|
|
72084
|
+
collection.classList.add(AccessibleIndicatorManager.Css.collection);
|
|
72085
|
+
this.map.getMapContainer().appendChild(collection);
|
|
72086
|
+
}
|
|
72087
|
+
return collection;
|
|
72088
|
+
};
|
|
72089
|
+
AccessibleIndicatorManager.Css = {
|
|
72090
|
+
collection: "accessible-indicator-collection-container"
|
|
72091
|
+
};
|
|
72092
|
+
return AccessibleIndicatorManager;
|
|
72093
|
+
}());
|
|
72094
|
+
|
|
71767
72095
|
var __extends$19 = (window && window.__extends) || (function () {
|
|
71768
72096
|
var extendStatics = function (d, b) {
|
|
71769
72097
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -71790,7 +72118,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71790
72118
|
};
|
|
71791
72119
|
return __assign$9.apply(this, arguments);
|
|
71792
72120
|
};
|
|
71793
|
-
var __awaiter$
|
|
72121
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
71794
72122
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
71795
72123
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
71796
72124
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -71799,7 +72127,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71799
72127
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71800
72128
|
});
|
|
71801
72129
|
};
|
|
71802
|
-
var __generator$
|
|
72130
|
+
var __generator$5 = (window && window.__generator) || function (thisArg, body) {
|
|
71803
72131
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
71804
72132
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
71805
72133
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -71826,7 +72154,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71826
72154
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
71827
72155
|
}
|
|
71828
72156
|
};
|
|
71829
|
-
var __read$
|
|
72157
|
+
var __read$g = (window && window.__read) || function (o, n) {
|
|
71830
72158
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
71831
72159
|
if (!m) return o;
|
|
71832
72160
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -71847,7 +72175,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71847
72175
|
to[j] = from[i];
|
|
71848
72176
|
return to;
|
|
71849
72177
|
};
|
|
71850
|
-
var __values$
|
|
72178
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
71851
72179
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
71852
72180
|
if (m) return m.call(o);
|
|
71853
72181
|
if (o && typeof o.length === "number") return {
|
|
@@ -71957,6 +72285,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71957
72285
|
_this.markers = new HtmlMarkerManager(_this);
|
|
71958
72286
|
_this.sources = new SourceManager(_this);
|
|
71959
72287
|
_this.popups = new PopupManager(_this);
|
|
72288
|
+
_this.indicators = new AccessibleIndicatorManager(_this);
|
|
71960
72289
|
// Add CSS classes and set attributes for DOM elements.
|
|
71961
72290
|
_this.map.getContainer().classList.add(Map.Css.container);
|
|
71962
72291
|
_this.map.getCanvasContainer().classList.add(Map.Css.canvasContainer);
|
|
@@ -71968,9 +72297,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71968
72297
|
showLogo: _this.styleOptions.showLogo,
|
|
71969
72298
|
customAttribution: _this.styleOptions.customAttribution
|
|
71970
72299
|
});
|
|
71971
|
-
_this.controls.add(_this.copyrightControl, {
|
|
71972
|
-
position: exports.ControlPosition.NonFixed
|
|
71973
|
-
});
|
|
71974
72300
|
// Initialize state of map
|
|
71975
72301
|
// --> Initialize the authentication manager
|
|
71976
72302
|
var authManInit = _this.authentication ?
|
|
@@ -71997,14 +72323,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71997
72323
|
_this._setAutoResize(_this.styleOptions.autoResize);
|
|
71998
72324
|
_this.map.showTileBoundaries = _this.styleOptions.showTileBoundaries;
|
|
71999
72325
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
72000
|
-
|
|
72001
|
-
|
|
72002
|
-
|
|
72326
|
+
authManInit
|
|
72327
|
+
.then(function () { return _this.styles.initStyleset(); })
|
|
72328
|
+
.then(function (definitions) {
|
|
72003
72329
|
// Check that the map hasn't been removed for any reason.
|
|
72004
72330
|
// If so no need to finish styling the map.
|
|
72005
72331
|
if (_this.removed) {
|
|
72006
72332
|
return;
|
|
72007
72333
|
}
|
|
72334
|
+
// Add controls after initStyleset to prevent redundant initStyleset calls
|
|
72335
|
+
_this.controls.add(_this.copyrightControl, {
|
|
72336
|
+
position: exports.ControlPosition.NonFixed
|
|
72337
|
+
});
|
|
72008
72338
|
if (_this.authentication && !_this.authentication.getToken()) {
|
|
72009
72339
|
throw new Error("AuthenticationManager finished initializing, but no token is available");
|
|
72010
72340
|
}
|
|
@@ -72100,6 +72430,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72100
72430
|
else {
|
|
72101
72431
|
this.accessibleMapDelegate.removeFromMap();
|
|
72102
72432
|
}
|
|
72433
|
+
if (this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration) {
|
|
72434
|
+
this.styles.initPromise = null;
|
|
72435
|
+
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
72436
|
+
this.setStyle({});
|
|
72437
|
+
}
|
|
72103
72438
|
};
|
|
72104
72439
|
/**
|
|
72105
72440
|
* Adds request transformer
|
|
@@ -72649,7 +72984,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72649
72984
|
urls = layer.getOptions().subdomains || [];
|
|
72650
72985
|
}
|
|
72651
72986
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
72652
|
-
urls.push.apply(urls, __spreadArray$a([], __read$
|
|
72987
|
+
urls.push.apply(urls, __spreadArray$a([], __read$g(tileSources)));
|
|
72653
72988
|
layer._setOptionsNoUpdate({
|
|
72654
72989
|
subdomains: urls
|
|
72655
72990
|
});
|
|
@@ -72671,7 +73006,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72671
73006
|
Map.prototype.removeLayers = function (layerNames) {
|
|
72672
73007
|
var e_1, _a;
|
|
72673
73008
|
try {
|
|
72674
|
-
for (var layerNames_1 = __values$
|
|
73009
|
+
for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
|
|
72675
73010
|
var layerName = layerNames_1_1.value;
|
|
72676
73011
|
// Previously calling removeLayers for layers that didn't exist in the map just did nothing.
|
|
72677
73012
|
// Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
|
|
@@ -72813,6 +73148,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72813
73148
|
this.layers.clear();
|
|
72814
73149
|
this.sources.clear();
|
|
72815
73150
|
this.markers.clear();
|
|
73151
|
+
this.indicators.clear();
|
|
72816
73152
|
};
|
|
72817
73153
|
/**
|
|
72818
73154
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
@@ -72865,7 +73201,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72865
73201
|
var e_2, _a;
|
|
72866
73202
|
var positions = [];
|
|
72867
73203
|
try {
|
|
72868
|
-
for (var pixels_1 = __values$
|
|
73204
|
+
for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
|
|
72869
73205
|
var pixel = pixels_1_1.value;
|
|
72870
73206
|
var lngLat = this.map.unproject(pixel);
|
|
72871
73207
|
positions.push(new Position(lngLat.lng, lngLat.lat));
|
|
@@ -72888,7 +73224,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72888
73224
|
var e_3, _a;
|
|
72889
73225
|
var pixels = [];
|
|
72890
73226
|
try {
|
|
72891
|
-
for (var positions_1 = __values$
|
|
73227
|
+
for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
72892
73228
|
var position = positions_1_1.value;
|
|
72893
73229
|
var point = this.map.project(position);
|
|
72894
73230
|
pixels.push(new Pixel(point.x, point.y));
|
|
@@ -72936,8 +73272,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72936
73272
|
*/
|
|
72937
73273
|
Map.prototype._rebuildStyle = function (diff) {
|
|
72938
73274
|
if (diff === void 0) { diff = true; }
|
|
72939
|
-
return __awaiter$
|
|
72940
|
-
return __generator$
|
|
73275
|
+
return __awaiter$5(this, void 0, void 0, function () {
|
|
73276
|
+
return __generator$5(this, function (_a) {
|
|
72941
73277
|
this.styles.setStyle(this.styleOptions, diff);
|
|
72942
73278
|
this.imageSprite._restoreImages();
|
|
72943
73279
|
return [2 /*return*/];
|
|
@@ -73153,7 +73489,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
73153
73489
|
return Map;
|
|
73154
73490
|
}(EventEmitter));
|
|
73155
73491
|
|
|
73156
|
-
var __read$
|
|
73492
|
+
var __read$h = (window && window.__read) || function (o, n) {
|
|
73157
73493
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
73158
73494
|
if (!m) return o;
|
|
73159
73495
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -73315,7 +73651,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
73315
73651
|
lineLength = 50;
|
|
73316
73652
|
}
|
|
73317
73653
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
73318
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$
|
|
73654
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$h((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
73319
73655
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
73320
73656
|
if (w < width) {
|
|
73321
73657
|
width = w;
|