azure-maps-control 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atlas-core-bare-snr.js +394 -57
- package/dist/atlas-core-bare.js +421 -84
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +394 -57
- package/dist/atlas-core.js +421 -84
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.js +421 -84
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
package/dist/atlas-core-snr.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.5";
|
|
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
|
}
|
|
@@ -59272,7 +59480,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59272
59480
|
return __assign$4.apply(this, arguments);
|
|
59273
59481
|
};
|
|
59274
59482
|
|
|
59275
|
-
var __awaiter$
|
|
59483
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
59276
59484
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
59277
59485
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
59278
59486
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -59281,7 +59489,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59281
59489
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
59282
59490
|
});
|
|
59283
59491
|
};
|
|
59284
|
-
var __generator$
|
|
59492
|
+
var __generator$2 = (window && window.__generator) || function (thisArg, body) {
|
|
59285
59493
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
59286
59494
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
59287
59495
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -59308,7 +59516,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59308
59516
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59309
59517
|
}
|
|
59310
59518
|
};
|
|
59311
|
-
var __read$
|
|
59519
|
+
var __read$7 = (window && window.__read) || function (o, n) {
|
|
59312
59520
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
59313
59521
|
if (!m) return o;
|
|
59314
59522
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -59465,14 +59673,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59465
59673
|
var trafficOptions = _this.map.getTraffic();
|
|
59466
59674
|
if (trafficOptions.flow !== "none") {
|
|
59467
59675
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + trafficOptions.flow);
|
|
59676
|
+
if (!trafficFlowComponent && ['absolute', 'relative-delay'].includes(trafficOptions.flow)) {
|
|
59677
|
+
// Fallback to relative if deprecated flow type is used
|
|
59678
|
+
trafficFlowComponent = _this.map.layers.getLayerById("traffic_relative");
|
|
59679
|
+
}
|
|
59468
59680
|
if (trafficFlowComponent) {
|
|
59469
|
-
_this.lastFlowMode =
|
|
59681
|
+
_this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
|
|
59470
59682
|
trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
|
|
59471
59683
|
}
|
|
59472
59684
|
}
|
|
59473
59685
|
};
|
|
59474
59686
|
this.removeFromMap = function () {
|
|
59475
|
-
var trafficOptions = _this.map.getTraffic();
|
|
59476
59687
|
if (_this.lastFlowMode != "none") {
|
|
59477
59688
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
|
|
59478
59689
|
if (trafficFlowComponent) {
|
|
@@ -60206,7 +60417,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60206
60417
|
};
|
|
60207
60418
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
60208
60419
|
};
|
|
60209
|
-
var __read$
|
|
60420
|
+
var __read$8 = (window && window.__read) || function (o, n) {
|
|
60210
60421
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
60211
60422
|
if (!m) return o;
|
|
60212
60423
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -60404,7 +60615,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60404
60615
|
var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
|
|
60405
60616
|
if (callbacks) {
|
|
60406
60617
|
callbacks.forEach(function (_a, callback) {
|
|
60407
|
-
var _b = __read$
|
|
60618
|
+
var _b = __read$8(_a, 2), _ = _b[0], once = _b[1];
|
|
60408
60619
|
// Invoking a listener this way circumvents the fire once logic in the modified callback.
|
|
60409
60620
|
// So we check if the callback was added as a fire once and if so remove it here.
|
|
60410
60621
|
if (once) {
|
|
@@ -60512,7 +60723,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60512
60723
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
60513
60724
|
callbackDict.forEach(function (_a) {
|
|
60514
60725
|
var e_6, _b;
|
|
60515
|
-
var _c = __read$
|
|
60726
|
+
var _c = __read$8(_a, 1), modifiedCallback = _c[0];
|
|
60516
60727
|
try {
|
|
60517
60728
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
60518
60729
|
var mbLayerId = _e.value;
|
|
@@ -60545,7 +60756,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60545
60756
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
60546
60757
|
callbackDict.forEach(function (_a) {
|
|
60547
60758
|
var e_7, _b;
|
|
60548
|
-
var _c = __read$
|
|
60759
|
+
var _c = __read$8(_a, 1), modifiedCallback = _c[0];
|
|
60549
60760
|
try {
|
|
60550
60761
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
60551
60762
|
var mbLayerId = _e.value;
|
|
@@ -60944,7 +61155,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60944
61155
|
};
|
|
60945
61156
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
60946
61157
|
};
|
|
60947
|
-
var __read$
|
|
61158
|
+
var __read$9 = (window && window.__read) || function (o, n) {
|
|
60948
61159
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
60949
61160
|
if (!m) return o;
|
|
60950
61161
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -61396,7 +61607,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61396
61607
|
// If a specified layer hasn't been added to the map throw an error.
|
|
61397
61608
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
61398
61609
|
if (index > -1) {
|
|
61399
|
-
layerIds.push.apply(layerIds, __spreadArray$3([], __read$
|
|
61610
|
+
layerIds.push.apply(layerIds, __spreadArray$3([], __read$9(this_1.layerIndex[index]._getLayerIds()
|
|
61400
61611
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
61401
61612
|
}
|
|
61402
61613
|
else {
|
|
@@ -62139,7 +62350,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62139
62350
|
};
|
|
62140
62351
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
62141
62352
|
};
|
|
62142
|
-
var __read$
|
|
62353
|
+
var __read$a = (window && window.__read) || function (o, n) {
|
|
62143
62354
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
62144
62355
|
if (!m) return o;
|
|
62145
62356
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -62230,7 +62441,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62230
62441
|
}
|
|
62231
62442
|
finally { if (e_1) throw e_1.error; }
|
|
62232
62443
|
}
|
|
62233
|
-
return _super.prototype.merge.apply(this, __spreadArray$4([], __read$
|
|
62444
|
+
return _super.prototype.merge.apply(this, __spreadArray$4([], __read$a(valuesList)));
|
|
62234
62445
|
};
|
|
62235
62446
|
return CameraBoundsOptions;
|
|
62236
62447
|
}(Options));
|
|
@@ -62703,7 +62914,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62703
62914
|
};
|
|
62704
62915
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
62705
62916
|
};
|
|
62706
|
-
var __read$
|
|
62917
|
+
var __read$b = (window && window.__read) || function (o, n) {
|
|
62707
62918
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
62708
62919
|
if (!m) return o;
|
|
62709
62920
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -62878,7 +63089,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62878
63089
|
finally { if (e_1) throw e_1.error; }
|
|
62879
63090
|
}
|
|
62880
63091
|
// Then execute the standard merge behavior.
|
|
62881
|
-
return _super.prototype.merge.apply(this, __spreadArray$5([], __read$
|
|
63092
|
+
return _super.prototype.merge.apply(this, __spreadArray$5([], __read$b(valueList)));
|
|
62882
63093
|
};
|
|
62883
63094
|
return StyleOptions;
|
|
62884
63095
|
}(Options));
|
|
@@ -62920,7 +63131,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62920
63131
|
};
|
|
62921
63132
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
62922
63133
|
};
|
|
62923
|
-
var __read$
|
|
63134
|
+
var __read$c = (window && window.__read) || function (o, n) {
|
|
62924
63135
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
62925
63136
|
if (!m) return o;
|
|
62926
63137
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -63171,10 +63382,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63171
63382
|
// won't change default behavior in Options as usually that's what desired
|
|
63172
63383
|
// instead capture it here and reassign.
|
|
63173
63384
|
var currentTransforms = this._transformers;
|
|
63174
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$6(__spreadArray$6([], __read$
|
|
63385
|
+
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$6(__spreadArray$6([], __read$c(flattened)), __read$c(value._transformers || [])); }, []) : [];
|
|
63175
63386
|
// Then execute the standard merge behavior.
|
|
63176
63387
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
63177
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$6([], __read$
|
|
63388
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valueList)));
|
|
63178
63389
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
63179
63390
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
63180
63391
|
}
|
|
@@ -63186,7 +63397,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63186
63397
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
63187
63398
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
63188
63399
|
}
|
|
63189
|
-
this._transformers = __spreadArray$6(__spreadArray$6([], __read$
|
|
63400
|
+
this._transformers = __spreadArray$6(__spreadArray$6([], __read$c(currentTransforms || [])), __read$c(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
63190
63401
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
63191
63402
|
this._transformers.push(this.transformRequest);
|
|
63192
63403
|
}
|
|
@@ -63382,7 +63593,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63382
63593
|
};
|
|
63383
63594
|
return __assign$8.apply(this, arguments);
|
|
63384
63595
|
};
|
|
63385
|
-
var __awaiter$
|
|
63596
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
63386
63597
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
63387
63598
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
63388
63599
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -63391,7 +63602,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63391
63602
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
63392
63603
|
});
|
|
63393
63604
|
};
|
|
63394
|
-
var __generator$
|
|
63605
|
+
var __generator$3 = (window && window.__generator) || function (thisArg, body) {
|
|
63395
63606
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
63396
63607
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
63397
63608
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -63418,7 +63629,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63418
63629
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
63419
63630
|
}
|
|
63420
63631
|
};
|
|
63421
|
-
var __read$
|
|
63632
|
+
var __read$d = (window && window.__read) || function (o, n) {
|
|
63422
63633
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
63423
63634
|
if (!m) return o;
|
|
63424
63635
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -63485,9 +63696,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63485
63696
|
_this._progressiveLoadingState.mapStyle = currentMapStyle;
|
|
63486
63697
|
// Select deferrable layers
|
|
63487
63698
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
63488
|
-
var _b = __read$
|
|
63699
|
+
var _b = __read$d(_a, 2), groupName = _b[0], layers = _b[1];
|
|
63489
63700
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
63490
|
-
return __spreadArray$7(__spreadArray$7([], __read$
|
|
63701
|
+
return __spreadArray$7(__spreadArray$7([], __read$d(deferred)), __read$d(layers.filter(function (layer) {
|
|
63491
63702
|
var _a;
|
|
63492
63703
|
// Exclude custom layers
|
|
63493
63704
|
if (layer.type === 'custom')
|
|
@@ -63568,9 +63779,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63568
63779
|
|| definitions.configurations[0];
|
|
63569
63780
|
}
|
|
63570
63781
|
};
|
|
63571
|
-
this._lookUpAsync = function (options) { return __awaiter$
|
|
63782
|
+
this._lookUpAsync = function (options) { return __awaiter$3(_this, void 0, void 0, function () {
|
|
63572
63783
|
var definitions, result;
|
|
63573
|
-
return __generator$
|
|
63784
|
+
return __generator$3(this, function (_a) {
|
|
63574
63785
|
switch (_a.label) {
|
|
63575
63786
|
case 0: return [4 /*yield*/, this.definitions()];
|
|
63576
63787
|
case 1:
|
|
@@ -63756,8 +63967,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63756
63967
|
return style.theme.toLowerCase();
|
|
63757
63968
|
};
|
|
63758
63969
|
StyleManager.prototype.getThemeAsync = function (styleOptions) {
|
|
63759
|
-
return __awaiter$
|
|
63760
|
-
return __generator$
|
|
63970
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
63971
|
+
return __generator$3(this, function (_a) {
|
|
63761
63972
|
switch (_a.label) {
|
|
63762
63973
|
case 0: return [4 /*yield*/, this._lookUpAsync(styleOptions)];
|
|
63763
63974
|
case 1: return [2 /*return*/, (_a.sent()).theme];
|
|
@@ -63847,9 +64058,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63847
64058
|
setLayerVisibility(nextLayer, styleOptions.showBuildingModels ? 'visible' : 'none');
|
|
63848
64059
|
}
|
|
63849
64060
|
// Set visibility of traffic layers depending on traffic settings.
|
|
63850
|
-
if (trafficOptions.flow !== 'none' &&
|
|
63851
|
-
layerGroup === "traffic_" + trafficOptions.flow
|
|
63852
|
-
|
|
64061
|
+
if (trafficOptions.flow !== 'none' && nextLayer.type == 'line' &&
|
|
64062
|
+
(layerGroup === "traffic_" + trafficOptions.flow ||
|
|
64063
|
+
// Check if deprecated flow types are used and the layer is a bing-traffic layer.
|
|
64064
|
+
// Needed for backwards compatibility in Bing styles to support deprecated flow types.
|
|
64065
|
+
(['absolute', 'relative-delay'].includes(trafficOptions.flow) && nextLayer['source'] === "bing-traffic"))) {
|
|
63853
64066
|
setLayerVisibility(nextLayer, 'visible');
|
|
63854
64067
|
}
|
|
63855
64068
|
// Set visibility of labels
|
|
@@ -63878,7 +64091,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63878
64091
|
// A FundamentalMapLayer (grouped layer) representation of the next style must be built.
|
|
63879
64092
|
var previousLayers = this.map.layers.getLayers();
|
|
63880
64093
|
var nextLayers = Object.entries(layerGroupLayers).map(function (_a) {
|
|
63881
|
-
var _b = __read$
|
|
64094
|
+
var _b = __read$d(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
|
|
63882
64095
|
return _this._buildFundamentalLayerFrom(layerGroupMapboxLayers, layerGroupName);
|
|
63883
64096
|
});
|
|
63884
64097
|
// Update FundamentalMapLayers in LayerManager
|
|
@@ -63977,10 +64190,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63977
64190
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
63978
64191
|
var _a, _b;
|
|
63979
64192
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
63980
|
-
return __awaiter$
|
|
64193
|
+
return __awaiter$3(this, void 0, void 0, function () {
|
|
63981
64194
|
var requestParams, fetchOptions;
|
|
63982
64195
|
var _c;
|
|
63983
|
-
return __generator$
|
|
64196
|
+
return __generator$3(this, function (_d) {
|
|
63984
64197
|
switch (_d.label) {
|
|
63985
64198
|
case 0:
|
|
63986
64199
|
requestParams = {
|
|
@@ -64043,6 +64256,123 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64043
64256
|
*/
|
|
64044
64257
|
var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
|
|
64045
64258
|
|
|
64259
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
64260
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
64261
|
+
if (m) return m.call(o);
|
|
64262
|
+
if (o && typeof o.length === "number") return {
|
|
64263
|
+
next: function () {
|
|
64264
|
+
if (o && i >= o.length) o = void 0;
|
|
64265
|
+
return { value: o && o[i++], done: !o };
|
|
64266
|
+
}
|
|
64267
|
+
};
|
|
64268
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
64269
|
+
};
|
|
64270
|
+
/**
|
|
64271
|
+
* @internal
|
|
64272
|
+
* A manager for the map control's hidden indicators.
|
|
64273
|
+
* Exposed through the `indicators` property of the `atlas.Map` class.
|
|
64274
|
+
* Cannot be instantiated by the user.
|
|
64275
|
+
*/
|
|
64276
|
+
var AccessibleIndicatorManager = /** @class */ (function () {
|
|
64277
|
+
/**
|
|
64278
|
+
* Constructs the indicator manager to be exposed only through the `indicators` property of the `Map` class.
|
|
64279
|
+
* @param map The map whose indicators are being managed by this.
|
|
64280
|
+
* @internal
|
|
64281
|
+
*/
|
|
64282
|
+
function AccessibleIndicatorManager(map) {
|
|
64283
|
+
this.map = map;
|
|
64284
|
+
this.indicators = new Set();
|
|
64285
|
+
}
|
|
64286
|
+
/**
|
|
64287
|
+
* Adds an indicator to the map
|
|
64288
|
+
* @param indicator The indicator(s) to add.
|
|
64289
|
+
*/
|
|
64290
|
+
AccessibleIndicatorManager.prototype.add = function (indicator) {
|
|
64291
|
+
var e_1, _a;
|
|
64292
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
64293
|
+
try {
|
|
64294
|
+
for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
|
|
64295
|
+
var i = indicator_1_1.value;
|
|
64296
|
+
if (!this.indicators.has(i)) {
|
|
64297
|
+
this.indicators.add(i);
|
|
64298
|
+
i.attach(this.map);
|
|
64299
|
+
}
|
|
64300
|
+
}
|
|
64301
|
+
}
|
|
64302
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
64303
|
+
finally {
|
|
64304
|
+
try {
|
|
64305
|
+
if (indicator_1_1 && !indicator_1_1.done && (_a = indicator_1.return)) _a.call(indicator_1);
|
|
64306
|
+
}
|
|
64307
|
+
finally { if (e_1) throw e_1.error; }
|
|
64308
|
+
}
|
|
64309
|
+
};
|
|
64310
|
+
/**
|
|
64311
|
+
* Removes all indicators from the map.
|
|
64312
|
+
*/
|
|
64313
|
+
AccessibleIndicatorManager.prototype.clear = function () {
|
|
64314
|
+
var _this = this;
|
|
64315
|
+
this.indicators.forEach(function (indicator) {
|
|
64316
|
+
_this.indicators.delete(indicator);
|
|
64317
|
+
indicator.remove();
|
|
64318
|
+
});
|
|
64319
|
+
};
|
|
64320
|
+
/**
|
|
64321
|
+
* Removes an indicator from the map
|
|
64322
|
+
* @param indicator The indicator(s) to remove.
|
|
64323
|
+
*/
|
|
64324
|
+
AccessibleIndicatorManager.prototype.remove = function (indicator) {
|
|
64325
|
+
var e_2, _a;
|
|
64326
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
64327
|
+
try {
|
|
64328
|
+
for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
|
|
64329
|
+
var i = indicator_2_1.value;
|
|
64330
|
+
if (this.indicators.has(i)) {
|
|
64331
|
+
this.indicators.delete(i);
|
|
64332
|
+
i.remove();
|
|
64333
|
+
}
|
|
64334
|
+
}
|
|
64335
|
+
}
|
|
64336
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
64337
|
+
finally {
|
|
64338
|
+
try {
|
|
64339
|
+
if (indicator_2_1 && !indicator_2_1.done && (_a = indicator_2.return)) _a.call(indicator_2);
|
|
64340
|
+
}
|
|
64341
|
+
finally { if (e_2) throw e_2.error; }
|
|
64342
|
+
}
|
|
64343
|
+
};
|
|
64344
|
+
/**
|
|
64345
|
+
* Returns the indicators currently attached to the map.
|
|
64346
|
+
*/
|
|
64347
|
+
AccessibleIndicatorManager.prototype.getIndicators = function () {
|
|
64348
|
+
return Array.from(this.indicators);
|
|
64349
|
+
};
|
|
64350
|
+
/**
|
|
64351
|
+
* Returns the div element that should contain all the indicator containers.
|
|
64352
|
+
* Creates it if it doesn't already exist.
|
|
64353
|
+
* @internal
|
|
64354
|
+
*/
|
|
64355
|
+
AccessibleIndicatorManager.prototype._getCollectionDiv = function () {
|
|
64356
|
+
var collection = this.map.getMapContainer()
|
|
64357
|
+
.querySelector("." + AccessibleIndicatorManager.Css.collection);
|
|
64358
|
+
if (!collection) {
|
|
64359
|
+
// If the collection div doesn't exist create it.
|
|
64360
|
+
collection = document.createElement("div");
|
|
64361
|
+
collection.setAttribute("aria-label", "map data");
|
|
64362
|
+
// Set the container role to listbox, and the descents' role to option, so the reader will read the listbox as a list.
|
|
64363
|
+
// For example, NVDA will read "data point, 1 of 1" when the indicator is focused.
|
|
64364
|
+
collection.setAttribute("role", "listbox");
|
|
64365
|
+
collection.classList.add(AccessibleIndicatorManager.Css.collection);
|
|
64366
|
+
this.map.getMapContainer().appendChild(collection);
|
|
64367
|
+
}
|
|
64368
|
+
return collection;
|
|
64369
|
+
};
|
|
64370
|
+
AccessibleIndicatorManager.Css = {
|
|
64371
|
+
collection: "accessible-indicator-collection-container"
|
|
64372
|
+
};
|
|
64373
|
+
return AccessibleIndicatorManager;
|
|
64374
|
+
}());
|
|
64375
|
+
|
|
64046
64376
|
var __extends$18 = (window && window.__extends) || (function () {
|
|
64047
64377
|
var extendStatics = function (d, b) {
|
|
64048
64378
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -64069,7 +64399,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64069
64399
|
};
|
|
64070
64400
|
return __assign$9.apply(this, arguments);
|
|
64071
64401
|
};
|
|
64072
|
-
var __awaiter$
|
|
64402
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
64073
64403
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
64074
64404
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
64075
64405
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -64078,7 +64408,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64078
64408
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
64079
64409
|
});
|
|
64080
64410
|
};
|
|
64081
|
-
var __generator$
|
|
64411
|
+
var __generator$4 = (window && window.__generator) || function (thisArg, body) {
|
|
64082
64412
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
64083
64413
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
64084
64414
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -64105,7 +64435,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64105
64435
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64106
64436
|
}
|
|
64107
64437
|
};
|
|
64108
|
-
var __read$
|
|
64438
|
+
var __read$e = (window && window.__read) || function (o, n) {
|
|
64109
64439
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
64110
64440
|
if (!m) return o;
|
|
64111
64441
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -64126,7 +64456,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64126
64456
|
to[j] = from[i];
|
|
64127
64457
|
return to;
|
|
64128
64458
|
};
|
|
64129
|
-
var __values$
|
|
64459
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
64130
64460
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
64131
64461
|
if (m) return m.call(o);
|
|
64132
64462
|
if (o && typeof o.length === "number") return {
|
|
@@ -64232,6 +64562,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64232
64562
|
_this.markers = new HtmlMarkerManager(_this);
|
|
64233
64563
|
_this.sources = new SourceManager(_this);
|
|
64234
64564
|
_this.popups = new PopupManager(_this);
|
|
64565
|
+
_this.indicators = new AccessibleIndicatorManager(_this);
|
|
64235
64566
|
// Add CSS classes and set attributes for DOM elements.
|
|
64236
64567
|
_this.map.getContainer().classList.add(Map.Css.container);
|
|
64237
64568
|
_this.map.getCanvasContainer().classList.add(Map.Css.canvasContainer);
|
|
@@ -64274,7 +64605,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64274
64605
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
64275
64606
|
var stylesInit = _this.styles.initStyleset();
|
|
64276
64607
|
Promise.all([authManInit, stylesInit]).then(function (_a) {
|
|
64277
|
-
var _b = __read$
|
|
64608
|
+
var _b = __read$e(_a, 2), _ = _b[0], definitions = _b[1];
|
|
64278
64609
|
// Check that the map hasn't been removed for any reason.
|
|
64279
64610
|
// If so no need to finish styling the map.
|
|
64280
64611
|
if (_this.removed) {
|
|
@@ -64373,6 +64704,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64373
64704
|
else {
|
|
64374
64705
|
this.accessibleMapDelegate.removeFromMap();
|
|
64375
64706
|
}
|
|
64707
|
+
if (this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration) {
|
|
64708
|
+
this.styles.initPromise = null;
|
|
64709
|
+
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
64710
|
+
this.setStyle({});
|
|
64711
|
+
}
|
|
64376
64712
|
};
|
|
64377
64713
|
/**
|
|
64378
64714
|
* Adds request transformer
|
|
@@ -64922,7 +65258,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64922
65258
|
urls = layer.getOptions().subdomains || [];
|
|
64923
65259
|
}
|
|
64924
65260
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
64925
|
-
urls.push.apply(urls, __spreadArray$8([], __read$
|
|
65261
|
+
urls.push.apply(urls, __spreadArray$8([], __read$e(tileSources)));
|
|
64926
65262
|
layer._setOptionsNoUpdate({
|
|
64927
65263
|
subdomains: urls
|
|
64928
65264
|
});
|
|
@@ -64944,7 +65280,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64944
65280
|
Map.prototype.removeLayers = function (layerNames) {
|
|
64945
65281
|
var e_1, _a;
|
|
64946
65282
|
try {
|
|
64947
|
-
for (var layerNames_1 = __values$
|
|
65283
|
+
for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
|
|
64948
65284
|
var layerName = layerNames_1_1.value;
|
|
64949
65285
|
// Previously calling removeLayers for layers that didn't exist in the map just did nothing.
|
|
64950
65286
|
// Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
|
|
@@ -65086,6 +65422,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65086
65422
|
this.layers.clear();
|
|
65087
65423
|
this.sources.clear();
|
|
65088
65424
|
this.markers.clear();
|
|
65425
|
+
this.indicators.clear();
|
|
65089
65426
|
};
|
|
65090
65427
|
/**
|
|
65091
65428
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
@@ -65138,7 +65475,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65138
65475
|
var e_2, _a;
|
|
65139
65476
|
var positions = [];
|
|
65140
65477
|
try {
|
|
65141
|
-
for (var pixels_1 = __values$
|
|
65478
|
+
for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
|
|
65142
65479
|
var pixel = pixels_1_1.value;
|
|
65143
65480
|
var lngLat = this.map.unproject(pixel);
|
|
65144
65481
|
positions.push(new Position(lngLat.lng, lngLat.lat));
|
|
@@ -65161,7 +65498,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65161
65498
|
var e_3, _a;
|
|
65162
65499
|
var pixels = [];
|
|
65163
65500
|
try {
|
|
65164
|
-
for (var positions_1 = __values$
|
|
65501
|
+
for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
65165
65502
|
var position = positions_1_1.value;
|
|
65166
65503
|
var point = this.map.project(position);
|
|
65167
65504
|
pixels.push(new Pixel(point.x, point.y));
|
|
@@ -65209,8 +65546,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65209
65546
|
*/
|
|
65210
65547
|
Map.prototype._rebuildStyle = function (diff) {
|
|
65211
65548
|
if (diff === void 0) { diff = true; }
|
|
65212
|
-
return __awaiter$
|
|
65213
|
-
return __generator$
|
|
65549
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
65550
|
+
return __generator$4(this, function (_a) {
|
|
65214
65551
|
this.styles.setStyle(this.styleOptions, diff);
|
|
65215
65552
|
this.imageSprite._restoreImages();
|
|
65216
65553
|
return [2 /*return*/];
|
|
@@ -65426,7 +65763,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65426
65763
|
return Map;
|
|
65427
65764
|
}(EventEmitter));
|
|
65428
65765
|
|
|
65429
|
-
var __read$
|
|
65766
|
+
var __read$f = (window && window.__read) || function (o, n) {
|
|
65430
65767
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
65431
65768
|
if (!m) return o;
|
|
65432
65769
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -65588,7 +65925,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65588
65925
|
lineLength = 50;
|
|
65589
65926
|
}
|
|
65590
65927
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
65591
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$9([], __read$
|
|
65928
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$9([], __read$f((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
65592
65929
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
65593
65930
|
if (w < width) {
|
|
65594
65931
|
width = w;
|