azure-maps-control 2.2.3 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atlas-core-bare-snr.js +448 -93
- package/dist/atlas-core-bare.js +623 -139
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +448 -93
- package/dist/atlas-core.js +623 -139
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.css +4 -28
- package/dist/atlas.js +623 -139
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +4 -0
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.5";
|
|
43623
43623
|
|
|
43624
43624
|
/**
|
|
43625
43625
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -43660,27 +43660,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43660
43660
|
var tooltipContent = document.createElement("span");
|
|
43661
43661
|
tooltipContent.innerText = name;
|
|
43662
43662
|
tooltipContent.classList.add('tooltiptext');
|
|
43663
|
-
// mimics default edge tooltip theming
|
|
43664
|
-
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
43665
|
-
tooltipContent.classList.add('dark');
|
|
43666
|
-
}
|
|
43667
|
-
var themeQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
43668
|
-
var onThemeChange = function (e) {
|
|
43669
|
-
var isDark = e.matches;
|
|
43670
|
-
if (isDark && !tooltipContent.classList.contains('dark')) {
|
|
43671
|
-
tooltipContent.classList.add('dark');
|
|
43672
|
-
}
|
|
43673
|
-
else if (!isDark && tooltipContent.classList.contains('dark')) {
|
|
43674
|
-
tooltipContent.classList.remove('dark');
|
|
43675
|
-
}
|
|
43676
|
-
};
|
|
43677
|
-
// compensate for browsers where MediaQueryList is not derived from EventTarget (pre iOS13 Safari)
|
|
43678
|
-
if (typeof themeQuery.addEventListener === 'function') {
|
|
43679
|
-
themeQuery.addEventListener('change', function (e) { return onThemeChange(e); });
|
|
43680
|
-
}
|
|
43681
|
-
else if (typeof themeQuery.addListener === 'function') {
|
|
43682
|
-
themeQuery.addListener(function (e) { return onThemeChange(e); });
|
|
43683
|
-
}
|
|
43684
43663
|
if (navigator.userAgent.indexOf('Edg') != -1) {
|
|
43685
43664
|
tooltipContent.classList.add('edge');
|
|
43686
43665
|
}
|
|
@@ -47850,6 +47829,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47850
47829
|
}
|
|
47851
47830
|
});
|
|
47852
47831
|
container.addEventListener("focusout", function (event) {
|
|
47832
|
+
if (event.target === currStyleButton) {
|
|
47833
|
+
// on focusout from reveal button -> reset the tabIndex on the styleOpsGrid elements that could have been set to -1 on esc key press
|
|
47834
|
+
Array.from(styleOpsGrid.children).forEach(function (e) { return e.removeAttribute('tabIndex'); });
|
|
47835
|
+
}
|
|
47853
47836
|
if (!(event.relatedTarget instanceof Node && container.contains(event.relatedTarget))) {
|
|
47854
47837
|
_this.hasFocus = false;
|
|
47855
47838
|
if (!_this.hasMouse) {
|
|
@@ -47864,6 +47847,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47864
47847
|
if (event.keyCode === 27) {
|
|
47865
47848
|
event.stopPropagation();
|
|
47866
47849
|
currStyleButton.focus();
|
|
47850
|
+
Array.from(styleOpsGrid.children).forEach(function (e) { return e.setAttribute('tabIndex', "-1"); });
|
|
47867
47851
|
if (container.classList.contains(StyleControl.Css.inUse)) {
|
|
47868
47852
|
container.classList.remove(StyleControl.Css.inUse);
|
|
47869
47853
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
@@ -53456,6 +53440,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
53456
53440
|
|
|
53457
53441
|
var cloneDeepWith_1 = cloneDeepWith;
|
|
53458
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
|
+
|
|
53459
53509
|
var __extends$k = (window && window.__extends) || (function () {
|
|
53460
53510
|
var extendStatics = function (d, b) {
|
|
53461
53511
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -54314,7 +54364,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54314
54364
|
// and can be used to determine which events are ours vs Mapbox's.
|
|
54315
54365
|
Layer.LayerEvents = {
|
|
54316
54366
|
layeradded: undefined,
|
|
54317
|
-
layerremoved: undefined
|
|
54367
|
+
layerremoved: undefined,
|
|
54368
|
+
focusin: undefined,
|
|
54369
|
+
focusout: undefined,
|
|
54318
54370
|
};
|
|
54319
54371
|
return Layer;
|
|
54320
54372
|
}(EventEmitter));
|
|
@@ -54469,6 +54521,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54469
54521
|
* @default 8
|
|
54470
54522
|
*/
|
|
54471
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;
|
|
54472
54532
|
return _this;
|
|
54473
54533
|
}
|
|
54474
54534
|
return BubbleLayerOptions;
|
|
@@ -54489,6 +54549,58 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54489
54549
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
54490
54550
|
};
|
|
54491
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
|
+
};
|
|
54492
54604
|
/**
|
|
54493
54605
|
* Renders Point objects as scalable circles (bubbles).
|
|
54494
54606
|
*/
|
|
@@ -54502,6 +54614,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54502
54614
|
*/
|
|
54503
54615
|
function BubbleLayer(source, id, options) {
|
|
54504
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
|
+
}); };
|
|
54505
54683
|
_this.options = new BubbleLayerOptions().merge(cloneDeepWith_1(options, BubbleLayerOptions._cloneCustomizer));
|
|
54506
54684
|
_this.options.source = source || _this.options.source;
|
|
54507
54685
|
return _this;
|
|
@@ -54549,6 +54727,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54549
54727
|
}
|
|
54550
54728
|
this.options = newOptions;
|
|
54551
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
|
+
};
|
|
54552
54744
|
/**
|
|
54553
54745
|
* @internal
|
|
54554
54746
|
*/
|
|
@@ -55667,7 +55859,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
55667
55859
|
};
|
|
55668
55860
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
55669
55861
|
};
|
|
55670
|
-
var __read$
|
|
55862
|
+
var __read$4 = (window && window.__read) || function (o, n) {
|
|
55671
55863
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
55672
55864
|
if (!m) return o;
|
|
55673
55865
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -55758,7 +55950,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
55758
55950
|
finally { if (e_1) throw e_1.error; }
|
|
55759
55951
|
}
|
|
55760
55952
|
// Then execute the standard merge behavior.
|
|
55761
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$
|
|
55953
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$4(valueList)));
|
|
55762
55954
|
if (isNewColorSet) {
|
|
55763
55955
|
merged.fillPattern = undefined;
|
|
55764
55956
|
}
|
|
@@ -57089,7 +57281,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57089
57281
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
57090
57282
|
};
|
|
57091
57283
|
})();
|
|
57092
|
-
var __read$
|
|
57284
|
+
var __read$5 = (window && window.__read) || function (o, n) {
|
|
57093
57285
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
57094
57286
|
if (!m) return o;
|
|
57095
57287
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -57201,7 +57393,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57201
57393
|
*/
|
|
57202
57394
|
_this._onDown = function (event) {
|
|
57203
57395
|
_this.map.popups._addDraggedPopup(_this);
|
|
57204
|
-
var _a = __read$
|
|
57396
|
+
var _a = __read$5(_this.map.positionsToPixels([_this.options.position]), 1), anchorPixel = _a[0];
|
|
57205
57397
|
if (event.type === "mousedown") {
|
|
57206
57398
|
event = event;
|
|
57207
57399
|
_this.dragOffset = [
|
|
@@ -57365,7 +57557,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57365
57557
|
pixel[0] + this.dragOffset[0],
|
|
57366
57558
|
pixel[1] + this.dragOffset[1]
|
|
57367
57559
|
];
|
|
57368
|
-
var _a = __read$
|
|
57560
|
+
var _a = __read$5(this.map.pixelsToPositions([anchorPixel]), 1), anchorPos = _a[0];
|
|
57369
57561
|
this.options.position = anchorPos;
|
|
57370
57562
|
this.marker.setLngLat(this.options.position);
|
|
57371
57563
|
this._invokeEvent("drag", { type: "drag", target: this });
|
|
@@ -57519,7 +57711,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
57519
57711
|
posY = pt.y;
|
|
57520
57712
|
}
|
|
57521
57713
|
else {
|
|
57522
|
-
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];
|
|
57523
57715
|
posX = x;
|
|
57524
57716
|
posY = y;
|
|
57525
57717
|
}
|
|
@@ -58436,7 +58628,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58436
58628
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
58437
58629
|
};
|
|
58438
58630
|
})();
|
|
58439
|
-
var __read$
|
|
58631
|
+
var __read$6 = (window && window.__read) || function (o, n) {
|
|
58440
58632
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
58441
58633
|
if (!m) return o;
|
|
58442
58634
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -58589,7 +58781,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
58589
58781
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
58590
58782
|
valueList[_i] = arguments[_i];
|
|
58591
58783
|
}
|
|
58592
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$
|
|
58784
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$6(valueList)));
|
|
58593
58785
|
if (merged.authType === exports.AuthenticationType.subscriptionKey) {
|
|
58594
58786
|
merged.authContext = merged.aadAppId = merged.getToken = undefined;
|
|
58595
58787
|
}
|
|
@@ -59445,11 +59637,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59445
59637
|
// Translations for oceans: https://en.wikipedia.org/wiki/List_of_alternative_names_for_oceans
|
|
59446
59638
|
this._preloadedCache.add(lang);
|
|
59447
59639
|
var oceanConfig = {
|
|
59448
|
-
source: [
|
|
59640
|
+
source: [],
|
|
59449
59641
|
labelType: "water",
|
|
59450
59642
|
minZoom: 0,
|
|
59451
59643
|
radius: 3950000,
|
|
59452
|
-
polygonSources: [
|
|
59644
|
+
polygonSources: [] // doesn't affect the cache key
|
|
59453
59645
|
};
|
|
59454
59646
|
var shortLang = lang;
|
|
59455
59647
|
var index = shortLang.indexOf("-");
|
|
@@ -59493,7 +59685,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59493
59685
|
return MapLabelCache;
|
|
59494
59686
|
}());
|
|
59495
59687
|
|
|
59496
|
-
var __awaiter$
|
|
59688
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
59497
59689
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
59498
59690
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
59499
59691
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -59502,7 +59694,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59502
59694
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
59503
59695
|
});
|
|
59504
59696
|
};
|
|
59505
|
-
var __generator$
|
|
59697
|
+
var __generator$2 = (window && window.__generator) || function (thisArg, body) {
|
|
59506
59698
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
59507
59699
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
59508
59700
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -59529,7 +59721,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59529
59721
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59530
59722
|
}
|
|
59531
59723
|
};
|
|
59532
|
-
var __read$
|
|
59724
|
+
var __read$7 = (window && window.__read) || function (o, n) {
|
|
59533
59725
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
59534
59726
|
if (!m) return o;
|
|
59535
59727
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -59545,6 +59737,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59545
59737
|
}
|
|
59546
59738
|
return ar;
|
|
59547
59739
|
};
|
|
59740
|
+
var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
|
|
59741
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
59742
|
+
to[j] = from[i];
|
|
59743
|
+
return to;
|
|
59744
|
+
};
|
|
59548
59745
|
/**
|
|
59549
59746
|
* This class analyizes the current view of a map and provides a description for use by accessibilty tools.
|
|
59550
59747
|
* TODO: Use services when in GeoPol regions. (Kasmir) or when user region sensitive.
|
|
@@ -59603,7 +59800,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59603
59800
|
* Vector Tile source layers: https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile
|
|
59604
59801
|
*/
|
|
59605
59802
|
// Configuration for label extraction.
|
|
59606
|
-
this.
|
|
59803
|
+
this._labelConfig = [
|
|
59607
59804
|
// Water labels
|
|
59608
59805
|
{
|
|
59609
59806
|
source: ["Ocean label", "Ocean name"],
|
|
@@ -59737,10 +59934,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59737
59934
|
polygonSources: ["Reservation"]
|
|
59738
59935
|
}
|
|
59739
59936
|
];
|
|
59740
|
-
// Name of all polygon layers in which we want to do an intersection test with.
|
|
59741
|
-
this._polygonStyleLayer = ["National or state park", "National park", "Reservation", "Airport",
|
|
59742
|
-
"Runway", "Stadium", "University", "Zoo", "Shopping", "Hospital", "Amusement park", "Ocean", "Sea",
|
|
59743
|
-
"Ocean or sea"];
|
|
59744
59937
|
// Name of all label types to cache.
|
|
59745
59938
|
this._labelCache = new Set(["city", "state", "country", "water", "majorPoi"]);
|
|
59746
59939
|
// Name of all road source layers.
|
|
@@ -59781,9 +59974,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59781
59974
|
// Flag indicating if detailed descriptions which include zoom, lat/lon information should be returned.
|
|
59782
59975
|
this._returnDetailedDescriptions = false;
|
|
59783
59976
|
/** Event handler for shortcuts. */
|
|
59784
|
-
this._shortcutListener = function (e) { return __awaiter$
|
|
59977
|
+
this._shortcutListener = function (e) { return __awaiter$2(_this, void 0, void 0, function () {
|
|
59785
59978
|
var cam, styleOps, lang, style, camDesc;
|
|
59786
|
-
return __generator$
|
|
59979
|
+
return __generator$2(this, function (_a) {
|
|
59787
59980
|
switch (_a.label) {
|
|
59788
59981
|
case 0:
|
|
59789
59982
|
if (!(e.altKey && e.ctrlKey && e.keyCode === 68)) return [3 /*break*/, 2];
|
|
@@ -59851,9 +60044,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59851
60044
|
/** Event handler for when the mouse or touch goes down */
|
|
59852
60045
|
this._onPointerDown = function (event) {
|
|
59853
60046
|
_this._lastPointerPos = _this._getEventPos(event);
|
|
59854
|
-
_this._pointerTimeout = setTimeout(function () { return __awaiter$
|
|
60047
|
+
_this._pointerTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
59855
60048
|
var styleOps, lang, style, cam, loc;
|
|
59856
|
-
return __generator$
|
|
60049
|
+
return __generator$2(this, function (_a) {
|
|
59857
60050
|
switch (_a.label) {
|
|
59858
60051
|
case 0:
|
|
59859
60052
|
styleOps = this._map.getStyle();
|
|
@@ -59911,9 +60104,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59911
60104
|
delete _this._rotateTimeout;
|
|
59912
60105
|
};
|
|
59913
60106
|
/** Called when the map has finished changing styles and is ready to create a new description */
|
|
59914
|
-
this._updateStyle = function () { return __awaiter$
|
|
60107
|
+
this._updateStyle = function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
59915
60108
|
var cam, styleOps, lang, style, camDesc;
|
|
59916
|
-
return __generator$
|
|
60109
|
+
return __generator$2(this, function (_a) {
|
|
59917
60110
|
switch (_a.label) {
|
|
59918
60111
|
case 0:
|
|
59919
60112
|
cam = this._map.getCamera();
|
|
@@ -59965,9 +60158,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59965
60158
|
delete _this._moveTimeout;
|
|
59966
60159
|
}
|
|
59967
60160
|
// Send the new description to the map.
|
|
59968
|
-
_this._moveTimeout = setTimeout(function () { return __awaiter$
|
|
60161
|
+
_this._moveTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
59969
60162
|
var loc;
|
|
59970
|
-
return __generator$
|
|
60163
|
+
return __generator$2(this, function (_a) {
|
|
59971
60164
|
switch (_a.label) {
|
|
59972
60165
|
case 0:
|
|
59973
60166
|
// Clear the rotate timeout as the move description will cover rotation.
|
|
@@ -60004,6 +60197,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60004
60197
|
_this._updateCam(true);
|
|
60005
60198
|
// Find the id of the vector tile source being used.
|
|
60006
60199
|
_this._baseVectorTileSourceId = MapViewDescriptor._baseVectorTileSourceIds.find(function (id) { return _this._map.sources.getById(id); });
|
|
60200
|
+
// Set the label config based on the vector tile source.
|
|
60201
|
+
if (_this._baseVectorTileSourceId === "bing-mvt") {
|
|
60202
|
+
_this._labelConfig = MapViewDescriptor._labelConfigBing;
|
|
60203
|
+
_this._roadLayers = MapViewDescriptor._roadLayersBing;
|
|
60204
|
+
}
|
|
60205
|
+
// Derive polygon layers from the label config.
|
|
60206
|
+
_this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
|
|
60207
|
+
if (cur.polygonSources) {
|
|
60208
|
+
acc.push.apply(acc, __spreadArray$2([], __read$7(cur.polygonSources)));
|
|
60209
|
+
}
|
|
60210
|
+
return acc;
|
|
60211
|
+
}, []);
|
|
60007
60212
|
// Add event listeners directly to mapbox because we will be using custom event data.
|
|
60008
60213
|
// We don't automatically forward all properties of a mapbox event, so the custom data would be lost.
|
|
60009
60214
|
var baseMap = _this._map._getMap();
|
|
@@ -60060,7 +60265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60060
60265
|
};
|
|
60061
60266
|
/** Checks if the location has changed enough to justify a new description */
|
|
60062
60267
|
MapViewDescriptor.prototype._checkLocThreshold = function (newCenter, lastCenter) {
|
|
60063
|
-
var _a = __read$
|
|
60268
|
+
var _a = __read$7(this._map.positionsToPixels([lastCenter, newCenter]), 2), lastPixel = _a[0], newPixel = _a[1];
|
|
60064
60269
|
return Pixel.getDistance(lastPixel, newPixel) >= this._moveThreshold;
|
|
60065
60270
|
};
|
|
60066
60271
|
/** Checks if the heading has changed enough to justify a new description */
|
|
@@ -60085,10 +60290,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60085
60290
|
* @param cam The map camera informaiton.
|
|
60086
60291
|
*/
|
|
60087
60292
|
MapViewDescriptor.prototype._getLocDesc = function (cam, lang, style) {
|
|
60088
|
-
return __awaiter$
|
|
60293
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
60089
60294
|
var info_1, cPx_1, intersects_1, intersectingPolygon, intersectingType_1, i, cnt, layerInfo, cl_1;
|
|
60090
60295
|
var _this = this;
|
|
60091
|
-
return __generator$
|
|
60296
|
+
return __generator$2(this, function (_a) {
|
|
60092
60297
|
switch (_a.label) {
|
|
60093
60298
|
case 0:
|
|
60094
60299
|
if (!(style !== "blank")) return [3 /*break*/, 3];
|
|
@@ -60113,8 +60318,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60113
60318
|
}
|
|
60114
60319
|
intersectingType_1 = null;
|
|
60115
60320
|
// Loop through each label config and try and retireve details about the map view.
|
|
60116
|
-
for (i = 0, cnt = this.
|
|
60117
|
-
layerInfo = this.
|
|
60321
|
+
for (i = 0, cnt = this._labelConfig.length; i < cnt; i++) {
|
|
60322
|
+
layerInfo = this._labelConfig[i];
|
|
60118
60323
|
if (cam.zoom >= layerInfo.minZoom) {
|
|
60119
60324
|
// If the layer info has polygons defined, do an intersection test for matching.
|
|
60120
60325
|
if (layerInfo.polygonSources) {
|
|
@@ -60214,7 +60419,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60214
60419
|
// Loop through the label sources.
|
|
60215
60420
|
for (var i = 0, len = layerInfo.source.length; i < len; i++) {
|
|
60216
60421
|
var params = {
|
|
60217
|
-
sourceLayer: layerInfo.source[i]
|
|
60422
|
+
sourceLayer: layerInfo.source[i],
|
|
60423
|
+
filter: ["has", "name"]
|
|
60218
60424
|
};
|
|
60219
60425
|
var labels = this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId, params);
|
|
60220
60426
|
var closest = null;
|
|
@@ -60291,21 +60497,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60291
60497
|
}
|
|
60292
60498
|
if (closestRoad) {
|
|
60293
60499
|
// Capture state and country codes from the closest road to ensure we have the most accurate values.
|
|
60294
|
-
|
|
60500
|
+
// Note: bing tiles do not have country_code and country_subdivision in road features.
|
|
60501
|
+
if (!info.country && closestRoad.properties.country_code) {
|
|
60295
60502
|
info.country = closestRoad.properties.country_code;
|
|
60296
60503
|
info.countryDis = 0;
|
|
60297
60504
|
MapViewDescriptor._labelCache.cache(info.country, {
|
|
60298
|
-
source: [
|
|
60505
|
+
source: [],
|
|
60299
60506
|
labelType: "country",
|
|
60300
60507
|
radius: 5000,
|
|
60301
60508
|
minZoom: 0
|
|
60302
60509
|
}, cPoint.geometry.coordinates, lang);
|
|
60303
60510
|
}
|
|
60304
|
-
if (!info.state) {
|
|
60511
|
+
if (!info.state && closestRoad.properties.country_subdivision) {
|
|
60305
60512
|
info.state = closestRoad.properties.country_subdivision;
|
|
60306
60513
|
info.stateDis = 0;
|
|
60307
60514
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
60308
|
-
source: [
|
|
60515
|
+
source: [],
|
|
60309
60516
|
labelType: "state",
|
|
60310
60517
|
radius: 5000,
|
|
60311
60518
|
minZoom: 4
|
|
@@ -60560,7 +60767,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60560
60767
|
if (a.country) {
|
|
60561
60768
|
info.country = a.country;
|
|
60562
60769
|
MapViewDescriptor._labelCache.cache(info.country, {
|
|
60563
|
-
source: [
|
|
60770
|
+
source: [],
|
|
60564
60771
|
labelType: "country",
|
|
60565
60772
|
radius: 5000,
|
|
60566
60773
|
minZoom: 0
|
|
@@ -60569,7 +60776,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60569
60776
|
if (a.countrySubdivision) {
|
|
60570
60777
|
info.state = a.countrySubdivision;
|
|
60571
60778
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
60572
|
-
source: [
|
|
60779
|
+
source: [],
|
|
60573
60780
|
labelType: "state",
|
|
60574
60781
|
radius: 5000,
|
|
60575
60782
|
minZoom: 4
|
|
@@ -60578,7 +60785,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60578
60785
|
if (a.municipality) {
|
|
60579
60786
|
info.city = a.municipality;
|
|
60580
60787
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
60581
|
-
source: [
|
|
60788
|
+
source: [],
|
|
60582
60789
|
labelType: "city",
|
|
60583
60790
|
radius: 1000,
|
|
60584
60791
|
minZoom: 10
|
|
@@ -60613,6 +60820,116 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60613
60820
|
};
|
|
60614
60821
|
// Ids of vector tile sources for different style APIs.
|
|
60615
60822
|
MapViewDescriptor._baseVectorTileSourceIds = ["microsoft.base", "vectorTiles", "bing-mvt"];
|
|
60823
|
+
// Configuration for label extraction of Bing tiles.
|
|
60824
|
+
MapViewDescriptor._labelConfigBing = [
|
|
60825
|
+
// Water labels
|
|
60826
|
+
{
|
|
60827
|
+
source: ["water_feature"],
|
|
60828
|
+
labelType: "water",
|
|
60829
|
+
minZoom: 0,
|
|
60830
|
+
radius: 3950000,
|
|
60831
|
+
polygonSources: ["generic_water_fill"]
|
|
60832
|
+
},
|
|
60833
|
+
{
|
|
60834
|
+
source: ["water_feature"],
|
|
60835
|
+
labelType: "water",
|
|
60836
|
+
minZoom: 3,
|
|
60837
|
+
radius: 1000000,
|
|
60838
|
+
polygonSources: ["generic_water_fill"]
|
|
60839
|
+
},
|
|
60840
|
+
// Country labels
|
|
60841
|
+
{
|
|
60842
|
+
source: ["country_region"],
|
|
60843
|
+
labelType: "country",
|
|
60844
|
+
minZoom: 0,
|
|
60845
|
+
maxZoom: 5,
|
|
60846
|
+
radius: 300000
|
|
60847
|
+
},
|
|
60848
|
+
// State labels
|
|
60849
|
+
{
|
|
60850
|
+
source: ["admin_division1"],
|
|
60851
|
+
labelType: "state",
|
|
60852
|
+
minZoom: 4,
|
|
60853
|
+
maxZoom: 7,
|
|
60854
|
+
radius: 300000
|
|
60855
|
+
},
|
|
60856
|
+
// City labels
|
|
60857
|
+
{
|
|
60858
|
+
source: ["populated_place"],
|
|
60859
|
+
labelType: "city",
|
|
60860
|
+
minZoom: 8,
|
|
60861
|
+
radius: 40000
|
|
60862
|
+
},
|
|
60863
|
+
// Neighbourhood labels
|
|
60864
|
+
{
|
|
60865
|
+
source: ["neighborhood"],
|
|
60866
|
+
labelType: "neighbourhood",
|
|
60867
|
+
minZoom: 12,
|
|
60868
|
+
radius: 6000
|
|
60869
|
+
},
|
|
60870
|
+
// POI labels
|
|
60871
|
+
{
|
|
60872
|
+
source: ["amusement_park"],
|
|
60873
|
+
labelType: "poi",
|
|
60874
|
+
minZoom: 14,
|
|
60875
|
+
radius: 2000,
|
|
60876
|
+
polygonSources: ["amusement_park_fill"]
|
|
60877
|
+
},
|
|
60878
|
+
{
|
|
60879
|
+
source: ["hospital"],
|
|
60880
|
+
labelType: "poi",
|
|
60881
|
+
minZoom: 14,
|
|
60882
|
+
radius: 1000,
|
|
60883
|
+
polygonSources: ["hospital_fill"]
|
|
60884
|
+
},
|
|
60885
|
+
{
|
|
60886
|
+
source: ["shopping_center"],
|
|
60887
|
+
labelType: "poi",
|
|
60888
|
+
minZoom: 14,
|
|
60889
|
+
radius: 1000,
|
|
60890
|
+
polygonSources: ["shopping_center_fill"]
|
|
60891
|
+
},
|
|
60892
|
+
{
|
|
60893
|
+
source: ["stadium"],
|
|
60894
|
+
labelType: "poi",
|
|
60895
|
+
minZoom: 14,
|
|
60896
|
+
radius: 1000,
|
|
60897
|
+
polygonSources: ["stadium_fill"]
|
|
60898
|
+
},
|
|
60899
|
+
{
|
|
60900
|
+
source: ["higher_education_facility", "school"],
|
|
60901
|
+
labelType: "poi",
|
|
60902
|
+
minZoom: 14,
|
|
60903
|
+
radius: 1000,
|
|
60904
|
+
polygonSources: ["higher_education_facility_fill", "school_fill"]
|
|
60905
|
+
},
|
|
60906
|
+
{
|
|
60907
|
+
source: ["zoo"],
|
|
60908
|
+
labelType: "poi",
|
|
60909
|
+
minZoom: 14,
|
|
60910
|
+
radius: 1000,
|
|
60911
|
+
polygonSources: ["zoo_fill"]
|
|
60912
|
+
},
|
|
60913
|
+
// Major Poi labels
|
|
60914
|
+
{
|
|
60915
|
+
source: ["airport", "airport_terminal"],
|
|
60916
|
+
labelType: "majorPoi",
|
|
60917
|
+
minZoom: 11,
|
|
60918
|
+
radius: 3000,
|
|
60919
|
+
polygonSources: ["airport_terminal_fill", "airport_fill-merged7", "airport_runway_fill"]
|
|
60920
|
+
},
|
|
60921
|
+
{
|
|
60922
|
+
source: ["reserve"],
|
|
60923
|
+
labelType: "majorPoi",
|
|
60924
|
+
minZoom: 7,
|
|
60925
|
+
radius: 15000,
|
|
60926
|
+
polygonSources: ["generic_reserve_fill", "land_cover_forest_fill"]
|
|
60927
|
+
}
|
|
60928
|
+
];
|
|
60929
|
+
// Name of all road source layers of Bing tiles.
|
|
60930
|
+
MapViewDescriptor._roadLayersBing = new Set([
|
|
60931
|
+
"road"
|
|
60932
|
+
]);
|
|
60616
60933
|
return MapViewDescriptor;
|
|
60617
60934
|
}());
|
|
60618
60935
|
|
|
@@ -60760,14 +61077,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60760
61077
|
var trafficOptions = _this.map.getTraffic();
|
|
60761
61078
|
if (trafficOptions.flow !== "none") {
|
|
60762
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
|
+
}
|
|
60763
61084
|
if (trafficFlowComponent) {
|
|
60764
|
-
_this.lastFlowMode =
|
|
61085
|
+
_this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
|
|
60765
61086
|
trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
|
|
60766
61087
|
}
|
|
60767
61088
|
}
|
|
60768
61089
|
};
|
|
60769
61090
|
this.removeFromMap = function () {
|
|
60770
|
-
var trafficOptions = _this.map.getTraffic();
|
|
60771
61091
|
if (_this.lastFlowMode != "none") {
|
|
60772
61092
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
|
|
60773
61093
|
if (trafficFlowComponent) {
|
|
@@ -61020,7 +61340,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61020
61340
|
return IncidentPopupFactory;
|
|
61021
61341
|
}());
|
|
61022
61342
|
|
|
61023
|
-
var __awaiter$
|
|
61343
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
61024
61344
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
61025
61345
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
61026
61346
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -61029,7 +61349,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61029
61349
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
61030
61350
|
});
|
|
61031
61351
|
};
|
|
61032
|
-
var __generator$
|
|
61352
|
+
var __generator$3 = (window && window.__generator) || function (thisArg, body) {
|
|
61033
61353
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
61034
61354
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
61035
61355
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -61083,10 +61403,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61083
61403
|
_this.map.events.add('moveend', _this.setAccessiblePopups);
|
|
61084
61404
|
};
|
|
61085
61405
|
this.accessiblePopups = [];
|
|
61086
|
-
this.setAccessiblePopups = function () { return __awaiter$
|
|
61406
|
+
this.setAccessiblePopups = function () { return __awaiter$3(_this, void 0, void 0, function () {
|
|
61087
61407
|
var features, localizedStrings, createPopup, insertHiddenBefore, insertHiddenInFront, addHidden;
|
|
61088
61408
|
var _this = this;
|
|
61089
|
-
return __generator$
|
|
61409
|
+
return __generator$3(this, function (_a) {
|
|
61090
61410
|
switch (_a.label) {
|
|
61091
61411
|
case 0:
|
|
61092
61412
|
this.accessiblePopups.forEach(function (popup) { return popup.remove(); });
|
|
@@ -64354,7 +64674,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64354
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;
|
|
64355
64675
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64356
64676
|
};
|
|
64357
|
-
var __read$
|
|
64677
|
+
var __read$8 = (window && window.__read) || function (o, n) {
|
|
64358
64678
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
64359
64679
|
if (!m) return o;
|
|
64360
64680
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -64370,7 +64690,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64370
64690
|
}
|
|
64371
64691
|
return ar;
|
|
64372
64692
|
};
|
|
64373
|
-
var __spreadArray$
|
|
64693
|
+
var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
|
|
64374
64694
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
64375
64695
|
to[j] = from[i];
|
|
64376
64696
|
return to;
|
|
@@ -64388,9 +64708,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64388
64708
|
'data-azure-maps-attribution-order',
|
|
64389
64709
|
'data-azure-maps-attribution-dynamic'
|
|
64390
64710
|
];
|
|
64391
|
-
var allowedAttributionAttributes = __spreadArray$
|
|
64711
|
+
var allowedAttributionAttributes = __spreadArray$3([
|
|
64392
64712
|
'href'
|
|
64393
|
-
], __read$
|
|
64713
|
+
], __read$8(attributionRuleAttributes));
|
|
64394
64714
|
var AttributionRuleProxy = /** @class */ (function () {
|
|
64395
64715
|
function AttributionRuleProxy(element, attributionChangeCallback) {
|
|
64396
64716
|
var _this = this;
|
|
@@ -64613,7 +64933,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64613
64933
|
};
|
|
64614
64934
|
AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
|
|
64615
64935
|
var _this = this;
|
|
64616
|
-
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$
|
|
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)); }, []);
|
|
64617
64937
|
if (copyrights.length == 0) {
|
|
64618
64938
|
// no attribution for a provided tileset/bbox/z
|
|
64619
64939
|
return;
|
|
@@ -64662,7 +64982,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64662
64982
|
return AttributionRuleProxy;
|
|
64663
64983
|
}());
|
|
64664
64984
|
|
|
64665
|
-
var __read$
|
|
64985
|
+
var __read$9 = (window && window.__read) || function (o, n) {
|
|
64666
64986
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
64667
64987
|
if (!m) return o;
|
|
64668
64988
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -64678,7 +64998,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64678
64998
|
}
|
|
64679
64999
|
return ar;
|
|
64680
65000
|
};
|
|
64681
|
-
var __spreadArray$
|
|
65001
|
+
var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
|
|
64682
65002
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
64683
65003
|
to[j] = from[i];
|
|
64684
65004
|
return to;
|
|
@@ -64716,7 +65036,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64716
65036
|
var style = map.getStyle();
|
|
64717
65037
|
return Object.entries(style.sources)
|
|
64718
65038
|
.filter(function (_a) {
|
|
64719
|
-
var _b = __read$
|
|
65039
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
64720
65040
|
return style.layers
|
|
64721
65041
|
.filter(function (layer) { return layer && layer['source'] == key; })
|
|
64722
65042
|
.reduce(function (isVisible, layer) {
|
|
@@ -64724,7 +65044,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64724
65044
|
return !isLayerHidden || isVisible;
|
|
64725
65045
|
}, false);
|
|
64726
65046
|
}).map(function (_a) {
|
|
64727
|
-
var _b = __read$
|
|
65047
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
64728
65048
|
return map.getSource(key);
|
|
64729
65049
|
});
|
|
64730
65050
|
};
|
|
@@ -64799,10 +65119,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64799
65119
|
}, function () { return document.createElement('span'); });
|
|
64800
65120
|
});
|
|
64801
65121
|
var registeredRuleSet = new Set(Object.values(registeredRules));
|
|
64802
|
-
var redundantRules = new Set(__spreadArray$
|
|
64803
|
-
var redundantElements = new Set(__spreadArray$
|
|
65122
|
+
var redundantRules = new Set(__spreadArray$4([], __read$9(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
|
|
65123
|
+
var redundantElements = new Set(__spreadArray$4([], __read$9(redundantRules)).map(function (rule) { return rule.getElement(); }));
|
|
64804
65124
|
// eject redundant rules associated elements altogether
|
|
64805
|
-
__spreadArray$
|
|
65125
|
+
__spreadArray$4([], __read$9(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
|
|
64806
65126
|
.forEach(function (elem) { return elem.parentElement.removeChild(elem); });
|
|
64807
65127
|
_this.rules = Object.values(registeredRules);
|
|
64808
65128
|
var attributionsToApply = attributions
|
|
@@ -64838,7 +65158,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64838
65158
|
var visibleTextNodes = function (elem) {
|
|
64839
65159
|
return Array.from(elem.style.display != 'none' ? elem.children : [])
|
|
64840
65160
|
.map(function (elem) { return visibleTextNodes(elem); })
|
|
64841
|
-
.reduce(function (flattened, nodes) { return __spreadArray$
|
|
65161
|
+
.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; }));
|
|
64842
65162
|
};
|
|
64843
65163
|
var newRenderContext = _this.virtualContext.cloneNode(true);
|
|
64844
65164
|
var visibleNodes = visibleTextNodes(newRenderContext);
|
|
@@ -64853,7 +65173,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64853
65173
|
// }
|
|
64854
65174
|
// });
|
|
64855
65175
|
// strip all predefined keywords
|
|
64856
|
-
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$
|
|
65176
|
+
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$9(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
|
|
64857
65177
|
// strip year from each node
|
|
64858
65178
|
// visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
|
|
64859
65179
|
// deduplicate attribution text
|
|
@@ -67079,6 +67399,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
67079
67399
|
}
|
|
67080
67400
|
return this.initPromise;
|
|
67081
67401
|
};
|
|
67402
|
+
/**
|
|
67403
|
+
* Cleans up any resources used by the authentication manager.
|
|
67404
|
+
*/
|
|
67405
|
+
AuthenticationManager.prototype.dispose = function () {
|
|
67406
|
+
if (this.tokenTimeOutHandle) {
|
|
67407
|
+
clearTimeout(this.tokenTimeOutHandle);
|
|
67408
|
+
this.tokenTimeOutHandle = null;
|
|
67409
|
+
}
|
|
67410
|
+
};
|
|
67082
67411
|
/**
|
|
67083
67412
|
* Gets the default auth context to be shared between maps without one specified to them.
|
|
67084
67413
|
*/
|
|
@@ -67809,7 +68138,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
67809
68138
|
};
|
|
67810
68139
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
67811
68140
|
};
|
|
67812
|
-
var __read$
|
|
68141
|
+
var __read$a = (window && window.__read) || function (o, n) {
|
|
67813
68142
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
67814
68143
|
if (!m) return o;
|
|
67815
68144
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -68007,7 +68336,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68007
68336
|
var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
|
|
68008
68337
|
if (callbacks) {
|
|
68009
68338
|
callbacks.forEach(function (_a, callback) {
|
|
68010
|
-
var _b = __read$
|
|
68339
|
+
var _b = __read$a(_a, 2), _ = _b[0], once = _b[1];
|
|
68011
68340
|
// Invoking a listener this way circumvents the fire once logic in the modified callback.
|
|
68012
68341
|
// So we check if the callback was added as a fire once and if so remove it here.
|
|
68013
68342
|
if (once) {
|
|
@@ -68115,7 +68444,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68115
68444
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
68116
68445
|
callbackDict.forEach(function (_a) {
|
|
68117
68446
|
var e_6, _b;
|
|
68118
|
-
var _c = __read$
|
|
68447
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
68119
68448
|
try {
|
|
68120
68449
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
68121
68450
|
var mbLayerId = _e.value;
|
|
@@ -68148,7 +68477,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68148
68477
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
68149
68478
|
callbackDict.forEach(function (_a) {
|
|
68150
68479
|
var e_7, _b;
|
|
68151
|
-
var _c = __read$
|
|
68480
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
68152
68481
|
try {
|
|
68153
68482
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
68154
68483
|
var mbLayerId = _e.value;
|
|
@@ -68547,7 +68876,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68547
68876
|
};
|
|
68548
68877
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
68549
68878
|
};
|
|
68550
|
-
var __read$
|
|
68879
|
+
var __read$b = (window && window.__read) || function (o, n) {
|
|
68551
68880
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
68552
68881
|
if (!m) return o;
|
|
68553
68882
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -68563,7 +68892,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68563
68892
|
}
|
|
68564
68893
|
return ar;
|
|
68565
68894
|
};
|
|
68566
|
-
var __spreadArray$
|
|
68895
|
+
var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
|
|
68567
68896
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
68568
68897
|
to[j] = from[i];
|
|
68569
68898
|
return to;
|
|
@@ -68999,7 +69328,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
68999
69328
|
// If a specified layer hasn't been added to the map throw an error.
|
|
69000
69329
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
69001
69330
|
if (index > -1) {
|
|
69002
|
-
layerIds.push.apply(layerIds, __spreadArray$
|
|
69331
|
+
layerIds.push.apply(layerIds, __spreadArray$5([], __read$b(this_1.layerIndex[index]._getLayerIds()
|
|
69003
69332
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
69004
69333
|
}
|
|
69005
69334
|
else {
|
|
@@ -69742,7 +70071,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69742
70071
|
};
|
|
69743
70072
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
69744
70073
|
};
|
|
69745
|
-
var __read$
|
|
70074
|
+
var __read$c = (window && window.__read) || function (o, n) {
|
|
69746
70075
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
69747
70076
|
if (!m) return o;
|
|
69748
70077
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -69758,7 +70087,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69758
70087
|
}
|
|
69759
70088
|
return ar;
|
|
69760
70089
|
};
|
|
69761
|
-
var __spreadArray$
|
|
70090
|
+
var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
|
|
69762
70091
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
69763
70092
|
to[j] = from[i];
|
|
69764
70093
|
return to;
|
|
@@ -69833,7 +70162,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69833
70162
|
}
|
|
69834
70163
|
finally { if (e_1) throw e_1.error; }
|
|
69835
70164
|
}
|
|
69836
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
70165
|
+
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valuesList)));
|
|
69837
70166
|
};
|
|
69838
70167
|
return CameraBoundsOptions;
|
|
69839
70168
|
}(Options));
|
|
@@ -70306,7 +70635,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70306
70635
|
};
|
|
70307
70636
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
70308
70637
|
};
|
|
70309
|
-
var __read$
|
|
70638
|
+
var __read$d = (window && window.__read) || function (o, n) {
|
|
70310
70639
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
70311
70640
|
if (!m) return o;
|
|
70312
70641
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -70322,7 +70651,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70322
70651
|
}
|
|
70323
70652
|
return ar;
|
|
70324
70653
|
};
|
|
70325
|
-
var __spreadArray$
|
|
70654
|
+
var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
|
|
70326
70655
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
70327
70656
|
to[j] = from[i];
|
|
70328
70657
|
return to;
|
|
@@ -70481,7 +70810,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70481
70810
|
finally { if (e_1) throw e_1.error; }
|
|
70482
70811
|
}
|
|
70483
70812
|
// Then execute the standard merge behavior.
|
|
70484
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
70813
|
+
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
|
|
70485
70814
|
};
|
|
70486
70815
|
return StyleOptions;
|
|
70487
70816
|
}(Options));
|
|
@@ -70523,7 +70852,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70523
70852
|
};
|
|
70524
70853
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
70525
70854
|
};
|
|
70526
|
-
var __read$
|
|
70855
|
+
var __read$e = (window && window.__read) || function (o, n) {
|
|
70527
70856
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
70528
70857
|
if (!m) return o;
|
|
70529
70858
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -70539,7 +70868,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70539
70868
|
}
|
|
70540
70869
|
return ar;
|
|
70541
70870
|
};
|
|
70542
|
-
var __spreadArray$
|
|
70871
|
+
var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
|
|
70543
70872
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
70544
70873
|
to[j] = from[i];
|
|
70545
70874
|
return to;
|
|
@@ -70774,10 +71103,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70774
71103
|
// won't change default behavior in Options as usually that's what desired
|
|
70775
71104
|
// instead capture it here and reassign.
|
|
70776
71105
|
var currentTransforms = this._transformers;
|
|
70777
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$
|
|
71106
|
+
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 || [])); }, []) : [];
|
|
70778
71107
|
// Then execute the standard merge behavior.
|
|
70779
71108
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
70780
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$
|
|
71109
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$e(valueList)));
|
|
70781
71110
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
70782
71111
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
70783
71112
|
}
|
|
@@ -70789,7 +71118,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70789
71118
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
70790
71119
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
70791
71120
|
}
|
|
70792
|
-
this._transformers = __spreadArray$
|
|
71121
|
+
this._transformers = __spreadArray$8(__spreadArray$8([], __read$e(currentTransforms || [])), __read$e(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
70793
71122
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
70794
71123
|
this._transformers.push(this.transformRequest);
|
|
70795
71124
|
}
|
|
@@ -70985,7 +71314,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70985
71314
|
};
|
|
70986
71315
|
return __assign$8.apply(this, arguments);
|
|
70987
71316
|
};
|
|
70988
|
-
var __awaiter$
|
|
71317
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
70989
71318
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
70990
71319
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
70991
71320
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -70994,7 +71323,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70994
71323
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
70995
71324
|
});
|
|
70996
71325
|
};
|
|
70997
|
-
var __generator$
|
|
71326
|
+
var __generator$4 = (window && window.__generator) || function (thisArg, body) {
|
|
70998
71327
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
70999
71328
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
71000
71329
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -71021,7 +71350,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71021
71350
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
71022
71351
|
}
|
|
71023
71352
|
};
|
|
71024
|
-
var __read$
|
|
71353
|
+
var __read$f = (window && window.__read) || function (o, n) {
|
|
71025
71354
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
71026
71355
|
if (!m) return o;
|
|
71027
71356
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -71037,7 +71366,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71037
71366
|
}
|
|
71038
71367
|
return ar;
|
|
71039
71368
|
};
|
|
71040
|
-
var __spreadArray$
|
|
71369
|
+
var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
|
|
71041
71370
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
71042
71371
|
to[j] = from[i];
|
|
71043
71372
|
return to;
|
|
@@ -71088,9 +71417,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71088
71417
|
_this._progressiveLoadingState.mapStyle = currentMapStyle;
|
|
71089
71418
|
// Select deferrable layers
|
|
71090
71419
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
71091
|
-
var _b = __read$
|
|
71420
|
+
var _b = __read$f(_a, 2), groupName = _b[0], layers = _b[1];
|
|
71092
71421
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
71093
|
-
return __spreadArray$
|
|
71422
|
+
return __spreadArray$9(__spreadArray$9([], __read$f(deferred)), __read$f(layers.filter(function (layer) {
|
|
71094
71423
|
var _a;
|
|
71095
71424
|
// Exclude custom layers
|
|
71096
71425
|
if (layer.type === 'custom')
|
|
@@ -71171,9 +71500,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71171
71500
|
|| definitions.configurations[0];
|
|
71172
71501
|
}
|
|
71173
71502
|
};
|
|
71174
|
-
this._lookUpAsync = function (options) { return __awaiter$
|
|
71503
|
+
this._lookUpAsync = function (options) { return __awaiter$4(_this, void 0, void 0, function () {
|
|
71175
71504
|
var definitions, result;
|
|
71176
|
-
return __generator$
|
|
71505
|
+
return __generator$4(this, function (_a) {
|
|
71177
71506
|
switch (_a.label) {
|
|
71178
71507
|
case 0: return [4 /*yield*/, this.definitions()];
|
|
71179
71508
|
case 1:
|
|
@@ -71282,7 +71611,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71282
71611
|
domain: _this.serviceOptions.staticAssetsDomain,
|
|
71283
71612
|
path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
|
|
71284
71613
|
queryParams: {
|
|
71285
|
-
|
|
71614
|
+
// Use the style version from the API response if it's available,
|
|
71615
|
+
// otherwise fallback to the version specified in the serviceOptions.
|
|
71616
|
+
// This is needed for flight testing the 2023-01-01 style version.
|
|
71617
|
+
styleVersion: definitions.version !== undefined && definitions.version !== null
|
|
71618
|
+
? definitions.version
|
|
71619
|
+
: _this.serviceOptions.styleDefinitionsVersion
|
|
71286
71620
|
// thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
|
|
71287
71621
|
//language: styleOptions.language
|
|
71288
71622
|
},
|
|
@@ -71354,8 +71688,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71354
71688
|
return style.theme.toLowerCase();
|
|
71355
71689
|
};
|
|
71356
71690
|
StyleManager.prototype.getThemeAsync = function (styleOptions) {
|
|
71357
|
-
return __awaiter$
|
|
71358
|
-
return __generator$
|
|
71691
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
71692
|
+
return __generator$4(this, function (_a) {
|
|
71359
71693
|
switch (_a.label) {
|
|
71360
71694
|
case 0: return [4 /*yield*/, this._lookUpAsync(styleOptions)];
|
|
71361
71695
|
case 1: return [2 /*return*/, (_a.sent()).theme];
|
|
@@ -71445,9 +71779,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71445
71779
|
setLayerVisibility(nextLayer, styleOptions.showBuildingModels ? 'visible' : 'none');
|
|
71446
71780
|
}
|
|
71447
71781
|
// Set visibility of traffic layers depending on traffic settings.
|
|
71448
|
-
if (trafficOptions.flow !== 'none' &&
|
|
71449
|
-
layerGroup === "traffic_" + trafficOptions.flow
|
|
71450
|
-
|
|
71782
|
+
if (trafficOptions.flow !== 'none' && nextLayer.type == 'line' &&
|
|
71783
|
+
(layerGroup === "traffic_" + trafficOptions.flow ||
|
|
71784
|
+
// Check if deprecated flow types are used and the layer is a bing-traffic layer.
|
|
71785
|
+
// Needed for backwards compatibility in Bing styles to support deprecated flow types.
|
|
71786
|
+
(['absolute', 'relative-delay'].includes(trafficOptions.flow) && nextLayer['source'] === "bing-traffic"))) {
|
|
71451
71787
|
setLayerVisibility(nextLayer, 'visible');
|
|
71452
71788
|
}
|
|
71453
71789
|
// Set visibility of labels
|
|
@@ -71476,7 +71812,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71476
71812
|
// A FundamentalMapLayer (grouped layer) representation of the next style must be built.
|
|
71477
71813
|
var previousLayers = this.map.layers.getLayers();
|
|
71478
71814
|
var nextLayers = Object.entries(layerGroupLayers).map(function (_a) {
|
|
71479
|
-
var _b = __read$
|
|
71815
|
+
var _b = __read$f(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
|
|
71480
71816
|
return _this._buildFundamentalLayerFrom(layerGroupMapboxLayers, layerGroupName);
|
|
71481
71817
|
});
|
|
71482
71818
|
// Update FundamentalMapLayers in LayerManager
|
|
@@ -71573,27 +71909,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71573
71909
|
* Fetches a json resource at the specified domain and path.
|
|
71574
71910
|
*/
|
|
71575
71911
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
71576
|
-
var _a;
|
|
71912
|
+
var _a, _b;
|
|
71577
71913
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
71578
|
-
return __awaiter$
|
|
71914
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
71579
71915
|
var requestParams, fetchOptions;
|
|
71580
|
-
var
|
|
71581
|
-
return __generator$
|
|
71582
|
-
switch (
|
|
71916
|
+
var _c;
|
|
71917
|
+
return __generator$4(this, function (_d) {
|
|
71918
|
+
switch (_d.label) {
|
|
71583
71919
|
case 0:
|
|
71584
71920
|
requestParams = {
|
|
71585
71921
|
url: new Url({
|
|
71586
71922
|
protocol: "https",
|
|
71587
71923
|
domain: domain,
|
|
71588
71924
|
path: path,
|
|
71589
|
-
queryParams: __assign$8((
|
|
71925
|
+
queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
|
|
71926
|
+
// Generate a hash code to avoid cache conflict
|
|
71927
|
+
// TODO: Remove this once style version 2023-01-01 is publicly available
|
|
71928
|
+
_c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
|
|
71590
71929
|
}).toString()
|
|
71591
71930
|
};
|
|
71592
71931
|
if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
|
|
71593
71932
|
// If a transformRequest(...) was specified use it.
|
|
71594
71933
|
requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
|
|
71595
71934
|
}
|
|
71596
|
-
(
|
|
71935
|
+
(_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
|
|
71597
71936
|
fetchOptions = {
|
|
71598
71937
|
method: "GET",
|
|
71599
71938
|
mode: "cors",
|
|
@@ -71610,11 +71949,26 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71610
71949
|
throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
|
|
71611
71950
|
}
|
|
71612
71951
|
})];
|
|
71613
|
-
case 1: return [2 /*return*/,
|
|
71952
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
71614
71953
|
}
|
|
71615
71954
|
});
|
|
71616
71955
|
});
|
|
71617
71956
|
};
|
|
71957
|
+
/**
|
|
71958
|
+
* A basic helper function to generate a hash from an input string.
|
|
71959
|
+
*/
|
|
71960
|
+
StyleManager._hashCode = function (str) {
|
|
71961
|
+
if (str === void 0) { str = ""; }
|
|
71962
|
+
var chr, hash = 0;
|
|
71963
|
+
if (!str)
|
|
71964
|
+
return hash;
|
|
71965
|
+
for (var i = 0; i < str.length; i++) {
|
|
71966
|
+
chr = str.charCodeAt(i);
|
|
71967
|
+
hash = (hash << 5) - hash + chr;
|
|
71968
|
+
hash |= 0; // Convert to 32bit integer
|
|
71969
|
+
}
|
|
71970
|
+
return hash;
|
|
71971
|
+
};
|
|
71618
71972
|
return StyleManager;
|
|
71619
71973
|
}());
|
|
71620
71974
|
|
|
@@ -71623,6 +71977,123 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71623
71977
|
*/
|
|
71624
71978
|
var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
|
|
71625
71979
|
|
|
71980
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
71981
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
71982
|
+
if (m) return m.call(o);
|
|
71983
|
+
if (o && typeof o.length === "number") return {
|
|
71984
|
+
next: function () {
|
|
71985
|
+
if (o && i >= o.length) o = void 0;
|
|
71986
|
+
return { value: o && o[i++], done: !o };
|
|
71987
|
+
}
|
|
71988
|
+
};
|
|
71989
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
71990
|
+
};
|
|
71991
|
+
/**
|
|
71992
|
+
* @internal
|
|
71993
|
+
* A manager for the map control's hidden indicators.
|
|
71994
|
+
* Exposed through the `indicators` property of the `atlas.Map` class.
|
|
71995
|
+
* Cannot be instantiated by the user.
|
|
71996
|
+
*/
|
|
71997
|
+
var AccessibleIndicatorManager = /** @class */ (function () {
|
|
71998
|
+
/**
|
|
71999
|
+
* Constructs the indicator manager to be exposed only through the `indicators` property of the `Map` class.
|
|
72000
|
+
* @param map The map whose indicators are being managed by this.
|
|
72001
|
+
* @internal
|
|
72002
|
+
*/
|
|
72003
|
+
function AccessibleIndicatorManager(map) {
|
|
72004
|
+
this.map = map;
|
|
72005
|
+
this.indicators = new Set();
|
|
72006
|
+
}
|
|
72007
|
+
/**
|
|
72008
|
+
* Adds an indicator to the map
|
|
72009
|
+
* @param indicator The indicator(s) to add.
|
|
72010
|
+
*/
|
|
72011
|
+
AccessibleIndicatorManager.prototype.add = function (indicator) {
|
|
72012
|
+
var e_1, _a;
|
|
72013
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
72014
|
+
try {
|
|
72015
|
+
for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
|
|
72016
|
+
var i = indicator_1_1.value;
|
|
72017
|
+
if (!this.indicators.has(i)) {
|
|
72018
|
+
this.indicators.add(i);
|
|
72019
|
+
i.attach(this.map);
|
|
72020
|
+
}
|
|
72021
|
+
}
|
|
72022
|
+
}
|
|
72023
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
72024
|
+
finally {
|
|
72025
|
+
try {
|
|
72026
|
+
if (indicator_1_1 && !indicator_1_1.done && (_a = indicator_1.return)) _a.call(indicator_1);
|
|
72027
|
+
}
|
|
72028
|
+
finally { if (e_1) throw e_1.error; }
|
|
72029
|
+
}
|
|
72030
|
+
};
|
|
72031
|
+
/**
|
|
72032
|
+
* Removes all indicators from the map.
|
|
72033
|
+
*/
|
|
72034
|
+
AccessibleIndicatorManager.prototype.clear = function () {
|
|
72035
|
+
var _this = this;
|
|
72036
|
+
this.indicators.forEach(function (indicator) {
|
|
72037
|
+
_this.indicators.delete(indicator);
|
|
72038
|
+
indicator.remove();
|
|
72039
|
+
});
|
|
72040
|
+
};
|
|
72041
|
+
/**
|
|
72042
|
+
* Removes an indicator from the map
|
|
72043
|
+
* @param indicator The indicator(s) to remove.
|
|
72044
|
+
*/
|
|
72045
|
+
AccessibleIndicatorManager.prototype.remove = function (indicator) {
|
|
72046
|
+
var e_2, _a;
|
|
72047
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
72048
|
+
try {
|
|
72049
|
+
for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
|
|
72050
|
+
var i = indicator_2_1.value;
|
|
72051
|
+
if (this.indicators.has(i)) {
|
|
72052
|
+
this.indicators.delete(i);
|
|
72053
|
+
i.remove();
|
|
72054
|
+
}
|
|
72055
|
+
}
|
|
72056
|
+
}
|
|
72057
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
72058
|
+
finally {
|
|
72059
|
+
try {
|
|
72060
|
+
if (indicator_2_1 && !indicator_2_1.done && (_a = indicator_2.return)) _a.call(indicator_2);
|
|
72061
|
+
}
|
|
72062
|
+
finally { if (e_2) throw e_2.error; }
|
|
72063
|
+
}
|
|
72064
|
+
};
|
|
72065
|
+
/**
|
|
72066
|
+
* Returns the indicators currently attached to the map.
|
|
72067
|
+
*/
|
|
72068
|
+
AccessibleIndicatorManager.prototype.getIndicators = function () {
|
|
72069
|
+
return Array.from(this.indicators);
|
|
72070
|
+
};
|
|
72071
|
+
/**
|
|
72072
|
+
* Returns the div element that should contain all the indicator containers.
|
|
72073
|
+
* Creates it if it doesn't already exist.
|
|
72074
|
+
* @internal
|
|
72075
|
+
*/
|
|
72076
|
+
AccessibleIndicatorManager.prototype._getCollectionDiv = function () {
|
|
72077
|
+
var collection = this.map.getMapContainer()
|
|
72078
|
+
.querySelector("." + AccessibleIndicatorManager.Css.collection);
|
|
72079
|
+
if (!collection) {
|
|
72080
|
+
// If the collection div doesn't exist create it.
|
|
72081
|
+
collection = document.createElement("div");
|
|
72082
|
+
collection.setAttribute("aria-label", "map data");
|
|
72083
|
+
// Set the container role to listbox, and the descents' role to option, so the reader will read the listbox as a list.
|
|
72084
|
+
// For example, NVDA will read "data point, 1 of 1" when the indicator is focused.
|
|
72085
|
+
collection.setAttribute("role", "listbox");
|
|
72086
|
+
collection.classList.add(AccessibleIndicatorManager.Css.collection);
|
|
72087
|
+
this.map.getMapContainer().appendChild(collection);
|
|
72088
|
+
}
|
|
72089
|
+
return collection;
|
|
72090
|
+
};
|
|
72091
|
+
AccessibleIndicatorManager.Css = {
|
|
72092
|
+
collection: "accessible-indicator-collection-container"
|
|
72093
|
+
};
|
|
72094
|
+
return AccessibleIndicatorManager;
|
|
72095
|
+
}());
|
|
72096
|
+
|
|
71626
72097
|
var __extends$19 = (window && window.__extends) || (function () {
|
|
71627
72098
|
var extendStatics = function (d, b) {
|
|
71628
72099
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -71649,7 +72120,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71649
72120
|
};
|
|
71650
72121
|
return __assign$9.apply(this, arguments);
|
|
71651
72122
|
};
|
|
71652
|
-
var __awaiter$
|
|
72123
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
71653
72124
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
71654
72125
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
71655
72126
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -71658,7 +72129,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71658
72129
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71659
72130
|
});
|
|
71660
72131
|
};
|
|
71661
|
-
var __generator$
|
|
72132
|
+
var __generator$5 = (window && window.__generator) || function (thisArg, body) {
|
|
71662
72133
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
71663
72134
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
71664
72135
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -71685,7 +72156,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71685
72156
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
71686
72157
|
}
|
|
71687
72158
|
};
|
|
71688
|
-
var __read$
|
|
72159
|
+
var __read$g = (window && window.__read) || function (o, n) {
|
|
71689
72160
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
71690
72161
|
if (!m) return o;
|
|
71691
72162
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -71701,12 +72172,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71701
72172
|
}
|
|
71702
72173
|
return ar;
|
|
71703
72174
|
};
|
|
71704
|
-
var __spreadArray$
|
|
72175
|
+
var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
|
|
71705
72176
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
71706
72177
|
to[j] = from[i];
|
|
71707
72178
|
return to;
|
|
71708
72179
|
};
|
|
71709
|
-
var __values$
|
|
72180
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
71710
72181
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
71711
72182
|
if (m) return m.call(o);
|
|
71712
72183
|
if (o && typeof o.length === "number") return {
|
|
@@ -71816,6 +72287,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71816
72287
|
_this.markers = new HtmlMarkerManager(_this);
|
|
71817
72288
|
_this.sources = new SourceManager(_this);
|
|
71818
72289
|
_this.popups = new PopupManager(_this);
|
|
72290
|
+
_this.indicators = new AccessibleIndicatorManager(_this);
|
|
71819
72291
|
// Add CSS classes and set attributes for DOM elements.
|
|
71820
72292
|
_this.map.getContainer().classList.add(Map.Css.container);
|
|
71821
72293
|
_this.map.getCanvasContainer().classList.add(Map.Css.canvasContainer);
|
|
@@ -71858,7 +72330,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71858
72330
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
71859
72331
|
var stylesInit = _this.styles.initStyleset();
|
|
71860
72332
|
Promise.all([authManInit, stylesInit]).then(function (_a) {
|
|
71861
|
-
var _b = __read$
|
|
72333
|
+
var _b = __read$g(_a, 2), _ = _b[0], definitions = _b[1];
|
|
71862
72334
|
// Check that the map hasn't been removed for any reason.
|
|
71863
72335
|
// If so no need to finish styling the map.
|
|
71864
72336
|
if (_this.removed) {
|
|
@@ -71888,7 +72360,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71888
72360
|
_this.events.invoke("error", errorData);
|
|
71889
72361
|
});
|
|
71890
72362
|
// --> Set initial camera state of map
|
|
71891
|
-
_this.setCamera(__assign$9(__assign$9({
|
|
72363
|
+
_this.setCamera(__assign$9(__assign$9({
|
|
72364
|
+
// Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
|
|
72365
|
+
minZoom: 1 }, options), { type: "jump", duration: 0 }));
|
|
71892
72366
|
// Add delegates to map
|
|
71893
72367
|
{
|
|
71894
72368
|
_this.incidentDelegate = new IncidentServiceDelegate(_this);
|
|
@@ -71957,6 +72431,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71957
72431
|
else {
|
|
71958
72432
|
this.accessibleMapDelegate.removeFromMap();
|
|
71959
72433
|
}
|
|
72434
|
+
if (this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration) {
|
|
72435
|
+
this.styles.initPromise = null;
|
|
72436
|
+
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
72437
|
+
this.setStyle({});
|
|
72438
|
+
}
|
|
71960
72439
|
};
|
|
71961
72440
|
/**
|
|
71962
72441
|
* Adds request transformer
|
|
@@ -72506,7 +72985,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72506
72985
|
urls = layer.getOptions().subdomains || [];
|
|
72507
72986
|
}
|
|
72508
72987
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
72509
|
-
urls.push.apply(urls, __spreadArray$
|
|
72988
|
+
urls.push.apply(urls, __spreadArray$a([], __read$g(tileSources)));
|
|
72510
72989
|
layer._setOptionsNoUpdate({
|
|
72511
72990
|
subdomains: urls
|
|
72512
72991
|
});
|
|
@@ -72528,7 +73007,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72528
73007
|
Map.prototype.removeLayers = function (layerNames) {
|
|
72529
73008
|
var e_1, _a;
|
|
72530
73009
|
try {
|
|
72531
|
-
for (var layerNames_1 = __values$
|
|
73010
|
+
for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
|
|
72532
73011
|
var layerName = layerNames_1_1.value;
|
|
72533
73012
|
// Previously calling removeLayers for layers that didn't exist in the map just did nothing.
|
|
72534
73013
|
// Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
|
|
@@ -72670,14 +73149,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72670
73149
|
this.layers.clear();
|
|
72671
73150
|
this.sources.clear();
|
|
72672
73151
|
this.markers.clear();
|
|
73152
|
+
this.indicators.clear();
|
|
72673
73153
|
};
|
|
72674
73154
|
/**
|
|
72675
73155
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
72676
73156
|
*/
|
|
72677
73157
|
Map.prototype.dispose = function () {
|
|
73158
|
+
var _a;
|
|
72678
73159
|
this.clear();
|
|
72679
73160
|
this.map.remove();
|
|
73161
|
+
(_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
72680
73162
|
this.removed = true;
|
|
73163
|
+
// Remove event listeners
|
|
73164
|
+
window.removeEventListener("resize", this._windowResizeCallback);
|
|
72681
73165
|
while (this.getMapContainer().firstChild) {
|
|
72682
73166
|
var currChild = this.getMapContainer().firstChild;
|
|
72683
73167
|
this.getMapContainer().removeChild(currChild);
|
|
@@ -72718,7 +73202,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72718
73202
|
var e_2, _a;
|
|
72719
73203
|
var positions = [];
|
|
72720
73204
|
try {
|
|
72721
|
-
for (var pixels_1 = __values$
|
|
73205
|
+
for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
|
|
72722
73206
|
var pixel = pixels_1_1.value;
|
|
72723
73207
|
var lngLat = this.map.unproject(pixel);
|
|
72724
73208
|
positions.push(new Position(lngLat.lng, lngLat.lat));
|
|
@@ -72741,7 +73225,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72741
73225
|
var e_3, _a;
|
|
72742
73226
|
var pixels = [];
|
|
72743
73227
|
try {
|
|
72744
|
-
for (var positions_1 = __values$
|
|
73228
|
+
for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
72745
73229
|
var position = positions_1_1.value;
|
|
72746
73230
|
var point = this.map.project(position);
|
|
72747
73231
|
pixels.push(new Pixel(point.x, point.y));
|
|
@@ -72789,8 +73273,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
72789
73273
|
*/
|
|
72790
73274
|
Map.prototype._rebuildStyle = function (diff) {
|
|
72791
73275
|
if (diff === void 0) { diff = true; }
|
|
72792
|
-
return __awaiter$
|
|
72793
|
-
return __generator$
|
|
73276
|
+
return __awaiter$5(this, void 0, void 0, function () {
|
|
73277
|
+
return __generator$5(this, function (_a) {
|
|
72794
73278
|
this.styles.setStyle(this.styleOptions, diff);
|
|
72795
73279
|
this.imageSprite._restoreImages();
|
|
72796
73280
|
return [2 /*return*/];
|
|
@@ -73006,7 +73490,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
73006
73490
|
return Map;
|
|
73007
73491
|
}(EventEmitter));
|
|
73008
73492
|
|
|
73009
|
-
var __read$
|
|
73493
|
+
var __read$h = (window && window.__read) || function (o, n) {
|
|
73010
73494
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
73011
73495
|
if (!m) return o;
|
|
73012
73496
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -73022,7 +73506,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
73022
73506
|
}
|
|
73023
73507
|
return ar;
|
|
73024
73508
|
};
|
|
73025
|
-
var __spreadArray$
|
|
73509
|
+
var __spreadArray$b = (window && window.__spreadArray) || function (to, from) {
|
|
73026
73510
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
73027
73511
|
to[j] = from[i];
|
|
73028
73512
|
return to;
|
|
@@ -73168,7 +73652,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
73168
73652
|
lineLength = 50;
|
|
73169
73653
|
}
|
|
73170
73654
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
73171
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$
|
|
73655
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$h((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
73172
73656
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
73173
73657
|
if (w < width) {
|
|
73174
73658
|
width = w;
|