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.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
|
}
|
|
@@ -69626,11 +69818,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69626
69818
|
// Translations for oceans: https://en.wikipedia.org/wiki/List_of_alternative_names_for_oceans
|
|
69627
69819
|
this._preloadedCache.add(lang);
|
|
69628
69820
|
var oceanConfig = {
|
|
69629
|
-
source: [
|
|
69821
|
+
source: [],
|
|
69630
69822
|
labelType: "water",
|
|
69631
69823
|
minZoom: 0,
|
|
69632
69824
|
radius: 3950000,
|
|
69633
|
-
polygonSources: [
|
|
69825
|
+
polygonSources: [] // doesn't affect the cache key
|
|
69634
69826
|
};
|
|
69635
69827
|
var shortLang = lang;
|
|
69636
69828
|
var index = shortLang.indexOf("-");
|
|
@@ -69674,7 +69866,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69674
69866
|
return MapLabelCache;
|
|
69675
69867
|
}());
|
|
69676
69868
|
|
|
69677
|
-
var __awaiter$
|
|
69869
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
69678
69870
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
69679
69871
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
69680
69872
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -69683,7 +69875,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69683
69875
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
69684
69876
|
});
|
|
69685
69877
|
};
|
|
69686
|
-
var __generator$
|
|
69878
|
+
var __generator$2 = (window && window.__generator) || function (thisArg, body) {
|
|
69687
69879
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
69688
69880
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
69689
69881
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -69710,7 +69902,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69710
69902
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
69711
69903
|
}
|
|
69712
69904
|
};
|
|
69713
|
-
var __read$
|
|
69905
|
+
var __read$7 = (window && window.__read) || function (o, n) {
|
|
69714
69906
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
69715
69907
|
if (!m) return o;
|
|
69716
69908
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -69726,6 +69918,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69726
69918
|
}
|
|
69727
69919
|
return ar;
|
|
69728
69920
|
};
|
|
69921
|
+
var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
|
|
69922
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
69923
|
+
to[j] = from[i];
|
|
69924
|
+
return to;
|
|
69925
|
+
};
|
|
69729
69926
|
/**
|
|
69730
69927
|
* This class analyizes the current view of a map and provides a description for use by accessibilty tools.
|
|
69731
69928
|
* TODO: Use services when in GeoPol regions. (Kasmir) or when user region sensitive.
|
|
@@ -69784,7 +69981,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69784
69981
|
* Vector Tile source layers: https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile
|
|
69785
69982
|
*/
|
|
69786
69983
|
// Configuration for label extraction.
|
|
69787
|
-
this.
|
|
69984
|
+
this._labelConfig = [
|
|
69788
69985
|
// Water labels
|
|
69789
69986
|
{
|
|
69790
69987
|
source: ["Ocean label", "Ocean name"],
|
|
@@ -69918,10 +70115,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69918
70115
|
polygonSources: ["Reservation"]
|
|
69919
70116
|
}
|
|
69920
70117
|
];
|
|
69921
|
-
// Name of all polygon layers in which we want to do an intersection test with.
|
|
69922
|
-
this._polygonStyleLayer = ["National or state park", "National park", "Reservation", "Airport",
|
|
69923
|
-
"Runway", "Stadium", "University", "Zoo", "Shopping", "Hospital", "Amusement park", "Ocean", "Sea",
|
|
69924
|
-
"Ocean or sea"];
|
|
69925
70118
|
// Name of all label types to cache.
|
|
69926
70119
|
this._labelCache = new Set(["city", "state", "country", "water", "majorPoi"]);
|
|
69927
70120
|
// Name of all road source layers.
|
|
@@ -69962,9 +70155,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
69962
70155
|
// Flag indicating if detailed descriptions which include zoom, lat/lon information should be returned.
|
|
69963
70156
|
this._returnDetailedDescriptions = false;
|
|
69964
70157
|
/** Event handler for shortcuts. */
|
|
69965
|
-
this._shortcutListener = function (e) { return __awaiter$
|
|
70158
|
+
this._shortcutListener = function (e) { return __awaiter$2(_this, void 0, void 0, function () {
|
|
69966
70159
|
var cam, styleOps, lang, style, camDesc;
|
|
69967
|
-
return __generator$
|
|
70160
|
+
return __generator$2(this, function (_a) {
|
|
69968
70161
|
switch (_a.label) {
|
|
69969
70162
|
case 0:
|
|
69970
70163
|
if (!(e.altKey && e.ctrlKey && e.keyCode === 68)) return [3 /*break*/, 2];
|
|
@@ -70032,9 +70225,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70032
70225
|
/** Event handler for when the mouse or touch goes down */
|
|
70033
70226
|
this._onPointerDown = function (event) {
|
|
70034
70227
|
_this._lastPointerPos = _this._getEventPos(event);
|
|
70035
|
-
_this._pointerTimeout = setTimeout(function () { return __awaiter$
|
|
70228
|
+
_this._pointerTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
70036
70229
|
var styleOps, lang, style, cam, loc;
|
|
70037
|
-
return __generator$
|
|
70230
|
+
return __generator$2(this, function (_a) {
|
|
70038
70231
|
switch (_a.label) {
|
|
70039
70232
|
case 0:
|
|
70040
70233
|
styleOps = this._map.getStyle();
|
|
@@ -70092,9 +70285,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70092
70285
|
delete _this._rotateTimeout;
|
|
70093
70286
|
};
|
|
70094
70287
|
/** Called when the map has finished changing styles and is ready to create a new description */
|
|
70095
|
-
this._updateStyle = function () { return __awaiter$
|
|
70288
|
+
this._updateStyle = function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
70096
70289
|
var cam, styleOps, lang, style, camDesc;
|
|
70097
|
-
return __generator$
|
|
70290
|
+
return __generator$2(this, function (_a) {
|
|
70098
70291
|
switch (_a.label) {
|
|
70099
70292
|
case 0:
|
|
70100
70293
|
cam = this._map.getCamera();
|
|
@@ -70146,9 +70339,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70146
70339
|
delete _this._moveTimeout;
|
|
70147
70340
|
}
|
|
70148
70341
|
// Send the new description to the map.
|
|
70149
|
-
_this._moveTimeout = setTimeout(function () { return __awaiter$
|
|
70342
|
+
_this._moveTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
70150
70343
|
var loc;
|
|
70151
|
-
return __generator$
|
|
70344
|
+
return __generator$2(this, function (_a) {
|
|
70152
70345
|
switch (_a.label) {
|
|
70153
70346
|
case 0:
|
|
70154
70347
|
// Clear the rotate timeout as the move description will cover rotation.
|
|
@@ -70185,6 +70378,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70185
70378
|
_this._updateCam(true);
|
|
70186
70379
|
// Find the id of the vector tile source being used.
|
|
70187
70380
|
_this._baseVectorTileSourceId = MapViewDescriptor._baseVectorTileSourceIds.find(function (id) { return _this._map.sources.getById(id); });
|
|
70381
|
+
// Set the label config based on the vector tile source.
|
|
70382
|
+
if (_this._baseVectorTileSourceId === "bing-mvt") {
|
|
70383
|
+
_this._labelConfig = MapViewDescriptor._labelConfigBing;
|
|
70384
|
+
_this._roadLayers = MapViewDescriptor._roadLayersBing;
|
|
70385
|
+
}
|
|
70386
|
+
// Derive polygon layers from the label config.
|
|
70387
|
+
_this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
|
|
70388
|
+
if (cur.polygonSources) {
|
|
70389
|
+
acc.push.apply(acc, __spreadArray$2([], __read$7(cur.polygonSources)));
|
|
70390
|
+
}
|
|
70391
|
+
return acc;
|
|
70392
|
+
}, []);
|
|
70188
70393
|
// Add event listeners directly to mapbox because we will be using custom event data.
|
|
70189
70394
|
// We don't automatically forward all properties of a mapbox event, so the custom data would be lost.
|
|
70190
70395
|
var baseMap = _this._map._getMap();
|
|
@@ -70241,7 +70446,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70241
70446
|
};
|
|
70242
70447
|
/** Checks if the location has changed enough to justify a new description */
|
|
70243
70448
|
MapViewDescriptor.prototype._checkLocThreshold = function (newCenter, lastCenter) {
|
|
70244
|
-
var _a = __read$
|
|
70449
|
+
var _a = __read$7(this._map.positionsToPixels([lastCenter, newCenter]), 2), lastPixel = _a[0], newPixel = _a[1];
|
|
70245
70450
|
return Pixel.getDistance(lastPixel, newPixel) >= this._moveThreshold;
|
|
70246
70451
|
};
|
|
70247
70452
|
/** Checks if the heading has changed enough to justify a new description */
|
|
@@ -70266,10 +70471,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70266
70471
|
* @param cam The map camera informaiton.
|
|
70267
70472
|
*/
|
|
70268
70473
|
MapViewDescriptor.prototype._getLocDesc = function (cam, lang, style) {
|
|
70269
|
-
return __awaiter$
|
|
70474
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
70270
70475
|
var info_1, cPx_1, intersects_1, intersectingPolygon, intersectingType_1, i, cnt, layerInfo, cl_1;
|
|
70271
70476
|
var _this = this;
|
|
70272
|
-
return __generator$
|
|
70477
|
+
return __generator$2(this, function (_a) {
|
|
70273
70478
|
switch (_a.label) {
|
|
70274
70479
|
case 0:
|
|
70275
70480
|
if (!(style !== "blank")) return [3 /*break*/, 3];
|
|
@@ -70294,8 +70499,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70294
70499
|
}
|
|
70295
70500
|
intersectingType_1 = null;
|
|
70296
70501
|
// Loop through each label config and try and retireve details about the map view.
|
|
70297
|
-
for (i = 0, cnt = this.
|
|
70298
|
-
layerInfo = this.
|
|
70502
|
+
for (i = 0, cnt = this._labelConfig.length; i < cnt; i++) {
|
|
70503
|
+
layerInfo = this._labelConfig[i];
|
|
70299
70504
|
if (cam.zoom >= layerInfo.minZoom) {
|
|
70300
70505
|
// If the layer info has polygons defined, do an intersection test for matching.
|
|
70301
70506
|
if (layerInfo.polygonSources) {
|
|
@@ -70395,7 +70600,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70395
70600
|
// Loop through the label sources.
|
|
70396
70601
|
for (var i = 0, len = layerInfo.source.length; i < len; i++) {
|
|
70397
70602
|
var params = {
|
|
70398
|
-
sourceLayer: layerInfo.source[i]
|
|
70603
|
+
sourceLayer: layerInfo.source[i],
|
|
70604
|
+
filter: ["has", "name"]
|
|
70399
70605
|
};
|
|
70400
70606
|
var labels = this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId, params);
|
|
70401
70607
|
var closest = null;
|
|
@@ -70472,21 +70678,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70472
70678
|
}
|
|
70473
70679
|
if (closestRoad) {
|
|
70474
70680
|
// Capture state and country codes from the closest road to ensure we have the most accurate values.
|
|
70475
|
-
|
|
70681
|
+
// Note: bing tiles do not have country_code and country_subdivision in road features.
|
|
70682
|
+
if (!info.country && closestRoad.properties.country_code) {
|
|
70476
70683
|
info.country = closestRoad.properties.country_code;
|
|
70477
70684
|
info.countryDis = 0;
|
|
70478
70685
|
MapViewDescriptor._labelCache.cache(info.country, {
|
|
70479
|
-
source: [
|
|
70686
|
+
source: [],
|
|
70480
70687
|
labelType: "country",
|
|
70481
70688
|
radius: 5000,
|
|
70482
70689
|
minZoom: 0
|
|
70483
70690
|
}, cPoint.geometry.coordinates, lang);
|
|
70484
70691
|
}
|
|
70485
|
-
if (!info.state) {
|
|
70692
|
+
if (!info.state && closestRoad.properties.country_subdivision) {
|
|
70486
70693
|
info.state = closestRoad.properties.country_subdivision;
|
|
70487
70694
|
info.stateDis = 0;
|
|
70488
70695
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
70489
|
-
source: [
|
|
70696
|
+
source: [],
|
|
70490
70697
|
labelType: "state",
|
|
70491
70698
|
radius: 5000,
|
|
70492
70699
|
minZoom: 4
|
|
@@ -70741,7 +70948,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70741
70948
|
if (a.country) {
|
|
70742
70949
|
info.country = a.country;
|
|
70743
70950
|
MapViewDescriptor._labelCache.cache(info.country, {
|
|
70744
|
-
source: [
|
|
70951
|
+
source: [],
|
|
70745
70952
|
labelType: "country",
|
|
70746
70953
|
radius: 5000,
|
|
70747
70954
|
minZoom: 0
|
|
@@ -70750,7 +70957,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70750
70957
|
if (a.countrySubdivision) {
|
|
70751
70958
|
info.state = a.countrySubdivision;
|
|
70752
70959
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
70753
|
-
source: [
|
|
70960
|
+
source: [],
|
|
70754
70961
|
labelType: "state",
|
|
70755
70962
|
radius: 5000,
|
|
70756
70963
|
minZoom: 4
|
|
@@ -70759,7 +70966,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70759
70966
|
if (a.municipality) {
|
|
70760
70967
|
info.city = a.municipality;
|
|
70761
70968
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
70762
|
-
source: [
|
|
70969
|
+
source: [],
|
|
70763
70970
|
labelType: "city",
|
|
70764
70971
|
radius: 1000,
|
|
70765
70972
|
minZoom: 10
|
|
@@ -70794,6 +71001,116 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70794
71001
|
};
|
|
70795
71002
|
// Ids of vector tile sources for different style APIs.
|
|
70796
71003
|
MapViewDescriptor._baseVectorTileSourceIds = ["microsoft.base", "vectorTiles", "bing-mvt"];
|
|
71004
|
+
// Configuration for label extraction of Bing tiles.
|
|
71005
|
+
MapViewDescriptor._labelConfigBing = [
|
|
71006
|
+
// Water labels
|
|
71007
|
+
{
|
|
71008
|
+
source: ["water_feature"],
|
|
71009
|
+
labelType: "water",
|
|
71010
|
+
minZoom: 0,
|
|
71011
|
+
radius: 3950000,
|
|
71012
|
+
polygonSources: ["generic_water_fill"]
|
|
71013
|
+
},
|
|
71014
|
+
{
|
|
71015
|
+
source: ["water_feature"],
|
|
71016
|
+
labelType: "water",
|
|
71017
|
+
minZoom: 3,
|
|
71018
|
+
radius: 1000000,
|
|
71019
|
+
polygonSources: ["generic_water_fill"]
|
|
71020
|
+
},
|
|
71021
|
+
// Country labels
|
|
71022
|
+
{
|
|
71023
|
+
source: ["country_region"],
|
|
71024
|
+
labelType: "country",
|
|
71025
|
+
minZoom: 0,
|
|
71026
|
+
maxZoom: 5,
|
|
71027
|
+
radius: 300000
|
|
71028
|
+
},
|
|
71029
|
+
// State labels
|
|
71030
|
+
{
|
|
71031
|
+
source: ["admin_division1"],
|
|
71032
|
+
labelType: "state",
|
|
71033
|
+
minZoom: 4,
|
|
71034
|
+
maxZoom: 7,
|
|
71035
|
+
radius: 300000
|
|
71036
|
+
},
|
|
71037
|
+
// City labels
|
|
71038
|
+
{
|
|
71039
|
+
source: ["populated_place"],
|
|
71040
|
+
labelType: "city",
|
|
71041
|
+
minZoom: 8,
|
|
71042
|
+
radius: 40000
|
|
71043
|
+
},
|
|
71044
|
+
// Neighbourhood labels
|
|
71045
|
+
{
|
|
71046
|
+
source: ["neighborhood"],
|
|
71047
|
+
labelType: "neighbourhood",
|
|
71048
|
+
minZoom: 12,
|
|
71049
|
+
radius: 6000
|
|
71050
|
+
},
|
|
71051
|
+
// POI labels
|
|
71052
|
+
{
|
|
71053
|
+
source: ["amusement_park"],
|
|
71054
|
+
labelType: "poi",
|
|
71055
|
+
minZoom: 14,
|
|
71056
|
+
radius: 2000,
|
|
71057
|
+
polygonSources: ["amusement_park_fill"]
|
|
71058
|
+
},
|
|
71059
|
+
{
|
|
71060
|
+
source: ["hospital"],
|
|
71061
|
+
labelType: "poi",
|
|
71062
|
+
minZoom: 14,
|
|
71063
|
+
radius: 1000,
|
|
71064
|
+
polygonSources: ["hospital_fill"]
|
|
71065
|
+
},
|
|
71066
|
+
{
|
|
71067
|
+
source: ["shopping_center"],
|
|
71068
|
+
labelType: "poi",
|
|
71069
|
+
minZoom: 14,
|
|
71070
|
+
radius: 1000,
|
|
71071
|
+
polygonSources: ["shopping_center_fill"]
|
|
71072
|
+
},
|
|
71073
|
+
{
|
|
71074
|
+
source: ["stadium"],
|
|
71075
|
+
labelType: "poi",
|
|
71076
|
+
minZoom: 14,
|
|
71077
|
+
radius: 1000,
|
|
71078
|
+
polygonSources: ["stadium_fill"]
|
|
71079
|
+
},
|
|
71080
|
+
{
|
|
71081
|
+
source: ["higher_education_facility", "school"],
|
|
71082
|
+
labelType: "poi",
|
|
71083
|
+
minZoom: 14,
|
|
71084
|
+
radius: 1000,
|
|
71085
|
+
polygonSources: ["higher_education_facility_fill", "school_fill"]
|
|
71086
|
+
},
|
|
71087
|
+
{
|
|
71088
|
+
source: ["zoo"],
|
|
71089
|
+
labelType: "poi",
|
|
71090
|
+
minZoom: 14,
|
|
71091
|
+
radius: 1000,
|
|
71092
|
+
polygonSources: ["zoo_fill"]
|
|
71093
|
+
},
|
|
71094
|
+
// Major Poi labels
|
|
71095
|
+
{
|
|
71096
|
+
source: ["airport", "airport_terminal"],
|
|
71097
|
+
labelType: "majorPoi",
|
|
71098
|
+
minZoom: 11,
|
|
71099
|
+
radius: 3000,
|
|
71100
|
+
polygonSources: ["airport_terminal_fill", "airport_fill-merged7", "airport_runway_fill"]
|
|
71101
|
+
},
|
|
71102
|
+
{
|
|
71103
|
+
source: ["reserve"],
|
|
71104
|
+
labelType: "majorPoi",
|
|
71105
|
+
minZoom: 7,
|
|
71106
|
+
radius: 15000,
|
|
71107
|
+
polygonSources: ["generic_reserve_fill", "land_cover_forest_fill"]
|
|
71108
|
+
}
|
|
71109
|
+
];
|
|
71110
|
+
// Name of all road source layers of Bing tiles.
|
|
71111
|
+
MapViewDescriptor._roadLayersBing = new Set([
|
|
71112
|
+
"road"
|
|
71113
|
+
]);
|
|
70797
71114
|
return MapViewDescriptor;
|
|
70798
71115
|
}());
|
|
70799
71116
|
|
|
@@ -70941,14 +71258,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
70941
71258
|
var trafficOptions = _this.map.getTraffic();
|
|
70942
71259
|
if (trafficOptions.flow !== "none") {
|
|
70943
71260
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + trafficOptions.flow);
|
|
71261
|
+
if (!trafficFlowComponent && ['absolute', 'relative-delay'].includes(trafficOptions.flow)) {
|
|
71262
|
+
// Fallback to relative if deprecated flow type is used
|
|
71263
|
+
trafficFlowComponent = _this.map.layers.getLayerById("traffic_relative");
|
|
71264
|
+
}
|
|
70944
71265
|
if (trafficFlowComponent) {
|
|
70945
|
-
_this.lastFlowMode =
|
|
71266
|
+
_this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
|
|
70946
71267
|
trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
|
|
70947
71268
|
}
|
|
70948
71269
|
}
|
|
70949
71270
|
};
|
|
70950
71271
|
this.removeFromMap = function () {
|
|
70951
|
-
var trafficOptions = _this.map.getTraffic();
|
|
70952
71272
|
if (_this.lastFlowMode != "none") {
|
|
70953
71273
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
|
|
70954
71274
|
if (trafficFlowComponent) {
|
|
@@ -71201,7 +71521,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71201
71521
|
return IncidentPopupFactory;
|
|
71202
71522
|
}());
|
|
71203
71523
|
|
|
71204
|
-
var __awaiter$
|
|
71524
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
71205
71525
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
71206
71526
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
71207
71527
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -71210,7 +71530,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71210
71530
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71211
71531
|
});
|
|
71212
71532
|
};
|
|
71213
|
-
var __generator$
|
|
71533
|
+
var __generator$3 = (window && window.__generator) || function (thisArg, body) {
|
|
71214
71534
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
71215
71535
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
71216
71536
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -71264,10 +71584,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
71264
71584
|
_this.map.events.add('moveend', _this.setAccessiblePopups);
|
|
71265
71585
|
};
|
|
71266
71586
|
this.accessiblePopups = [];
|
|
71267
|
-
this.setAccessiblePopups = function () { return __awaiter$
|
|
71587
|
+
this.setAccessiblePopups = function () { return __awaiter$3(_this, void 0, void 0, function () {
|
|
71268
71588
|
var features, localizedStrings, createPopup, insertHiddenBefore, insertHiddenInFront, addHidden;
|
|
71269
71589
|
var _this = this;
|
|
71270
|
-
return __generator$
|
|
71590
|
+
return __generator$3(this, function (_a) {
|
|
71271
71591
|
switch (_a.label) {
|
|
71272
71592
|
case 0:
|
|
71273
71593
|
this.accessiblePopups.forEach(function (popup) { return popup.remove(); });
|
|
@@ -74535,7 +74855,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74535
74855
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
74536
74856
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
74537
74857
|
};
|
|
74538
|
-
var __read$
|
|
74858
|
+
var __read$8 = (window && window.__read) || function (o, n) {
|
|
74539
74859
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
74540
74860
|
if (!m) return o;
|
|
74541
74861
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -74551,7 +74871,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74551
74871
|
}
|
|
74552
74872
|
return ar;
|
|
74553
74873
|
};
|
|
74554
|
-
var __spreadArray$
|
|
74874
|
+
var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
|
|
74555
74875
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
74556
74876
|
to[j] = from[i];
|
|
74557
74877
|
return to;
|
|
@@ -74569,9 +74889,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74569
74889
|
'data-azure-maps-attribution-order',
|
|
74570
74890
|
'data-azure-maps-attribution-dynamic'
|
|
74571
74891
|
];
|
|
74572
|
-
var allowedAttributionAttributes = __spreadArray$
|
|
74892
|
+
var allowedAttributionAttributes = __spreadArray$3([
|
|
74573
74893
|
'href'
|
|
74574
|
-
], __read$
|
|
74894
|
+
], __read$8(attributionRuleAttributes));
|
|
74575
74895
|
var AttributionRuleProxy = /** @class */ (function () {
|
|
74576
74896
|
function AttributionRuleProxy(element, attributionChangeCallback) {
|
|
74577
74897
|
var _this = this;
|
|
@@ -74794,7 +75114,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74794
75114
|
};
|
|
74795
75115
|
AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
|
|
74796
75116
|
var _this = this;
|
|
74797
|
-
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$
|
|
75117
|
+
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$8(flat)), __read$8(copyrights)); }, []);
|
|
74798
75118
|
if (copyrights.length == 0) {
|
|
74799
75119
|
// no attribution for a provided tileset/bbox/z
|
|
74800
75120
|
return;
|
|
@@ -74843,7 +75163,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74843
75163
|
return AttributionRuleProxy;
|
|
74844
75164
|
}());
|
|
74845
75165
|
|
|
74846
|
-
var __read$
|
|
75166
|
+
var __read$9 = (window && window.__read) || function (o, n) {
|
|
74847
75167
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
74848
75168
|
if (!m) return o;
|
|
74849
75169
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -74859,7 +75179,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74859
75179
|
}
|
|
74860
75180
|
return ar;
|
|
74861
75181
|
};
|
|
74862
|
-
var __spreadArray$
|
|
75182
|
+
var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
|
|
74863
75183
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
74864
75184
|
to[j] = from[i];
|
|
74865
75185
|
return to;
|
|
@@ -74897,7 +75217,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74897
75217
|
var style = map.getStyle();
|
|
74898
75218
|
return Object.entries(style.sources)
|
|
74899
75219
|
.filter(function (_a) {
|
|
74900
|
-
var _b = __read$
|
|
75220
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
74901
75221
|
return style.layers
|
|
74902
75222
|
.filter(function (layer) { return layer && layer['source'] == key; })
|
|
74903
75223
|
.reduce(function (isVisible, layer) {
|
|
@@ -74905,7 +75225,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74905
75225
|
return !isLayerHidden || isVisible;
|
|
74906
75226
|
}, false);
|
|
74907
75227
|
}).map(function (_a) {
|
|
74908
|
-
var _b = __read$
|
|
75228
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
74909
75229
|
return map.getSource(key);
|
|
74910
75230
|
});
|
|
74911
75231
|
};
|
|
@@ -74980,10 +75300,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
74980
75300
|
}, function () { return document.createElement('span'); });
|
|
74981
75301
|
});
|
|
74982
75302
|
var registeredRuleSet = new Set(Object.values(registeredRules));
|
|
74983
|
-
var redundantRules = new Set(__spreadArray$
|
|
74984
|
-
var redundantElements = new Set(__spreadArray$
|
|
75303
|
+
var redundantRules = new Set(__spreadArray$4([], __read$9(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
|
|
75304
|
+
var redundantElements = new Set(__spreadArray$4([], __read$9(redundantRules)).map(function (rule) { return rule.getElement(); }));
|
|
74985
75305
|
// eject redundant rules associated elements altogether
|
|
74986
|
-
__spreadArray$
|
|
75306
|
+
__spreadArray$4([], __read$9(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
|
|
74987
75307
|
.forEach(function (elem) { return elem.parentElement.removeChild(elem); });
|
|
74988
75308
|
_this.rules = Object.values(registeredRules);
|
|
74989
75309
|
var attributionsToApply = attributions
|
|
@@ -75019,7 +75339,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75019
75339
|
var visibleTextNodes = function (elem) {
|
|
75020
75340
|
return Array.from(elem.style.display != 'none' ? elem.children : [])
|
|
75021
75341
|
.map(function (elem) { return visibleTextNodes(elem); })
|
|
75022
|
-
.reduce(function (flattened, nodes) { return __spreadArray$
|
|
75342
|
+
.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; }));
|
|
75023
75343
|
};
|
|
75024
75344
|
var newRenderContext = _this.virtualContext.cloneNode(true);
|
|
75025
75345
|
var visibleNodes = visibleTextNodes(newRenderContext);
|
|
@@ -75034,7 +75354,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
75034
75354
|
// }
|
|
75035
75355
|
// });
|
|
75036
75356
|
// strip all predefined keywords
|
|
75037
|
-
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$
|
|
75357
|
+
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$9(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
|
|
75038
75358
|
// strip year from each node
|
|
75039
75359
|
// visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
|
|
75040
75360
|
// deduplicate attribution text
|
|
@@ -77260,6 +77580,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
77260
77580
|
}
|
|
77261
77581
|
return this.initPromise;
|
|
77262
77582
|
};
|
|
77583
|
+
/**
|
|
77584
|
+
* Cleans up any resources used by the authentication manager.
|
|
77585
|
+
*/
|
|
77586
|
+
AuthenticationManager.prototype.dispose = function () {
|
|
77587
|
+
if (this.tokenTimeOutHandle) {
|
|
77588
|
+
clearTimeout(this.tokenTimeOutHandle);
|
|
77589
|
+
this.tokenTimeOutHandle = null;
|
|
77590
|
+
}
|
|
77591
|
+
};
|
|
77263
77592
|
/**
|
|
77264
77593
|
* Gets the default auth context to be shared between maps without one specified to them.
|
|
77265
77594
|
*/
|
|
@@ -77990,7 +78319,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
77990
78319
|
};
|
|
77991
78320
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
77992
78321
|
};
|
|
77993
|
-
var __read$
|
|
78322
|
+
var __read$a = (window && window.__read) || function (o, n) {
|
|
77994
78323
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
77995
78324
|
if (!m) return o;
|
|
77996
78325
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -78188,7 +78517,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78188
78517
|
var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
|
|
78189
78518
|
if (callbacks) {
|
|
78190
78519
|
callbacks.forEach(function (_a, callback) {
|
|
78191
|
-
var _b = __read$
|
|
78520
|
+
var _b = __read$a(_a, 2), _ = _b[0], once = _b[1];
|
|
78192
78521
|
// Invoking a listener this way circumvents the fire once logic in the modified callback.
|
|
78193
78522
|
// So we check if the callback was added as a fire once and if so remove it here.
|
|
78194
78523
|
if (once) {
|
|
@@ -78296,7 +78625,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78296
78625
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
78297
78626
|
callbackDict.forEach(function (_a) {
|
|
78298
78627
|
var e_6, _b;
|
|
78299
|
-
var _c = __read$
|
|
78628
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
78300
78629
|
try {
|
|
78301
78630
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
78302
78631
|
var mbLayerId = _e.value;
|
|
@@ -78329,7 +78658,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78329
78658
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
78330
78659
|
callbackDict.forEach(function (_a) {
|
|
78331
78660
|
var e_7, _b;
|
|
78332
|
-
var _c = __read$
|
|
78661
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
78333
78662
|
try {
|
|
78334
78663
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
78335
78664
|
var mbLayerId = _e.value;
|
|
@@ -78728,7 +79057,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78728
79057
|
};
|
|
78729
79058
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
78730
79059
|
};
|
|
78731
|
-
var __read$
|
|
79060
|
+
var __read$b = (window && window.__read) || function (o, n) {
|
|
78732
79061
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
78733
79062
|
if (!m) return o;
|
|
78734
79063
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -78744,7 +79073,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78744
79073
|
}
|
|
78745
79074
|
return ar;
|
|
78746
79075
|
};
|
|
78747
|
-
var __spreadArray$
|
|
79076
|
+
var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
|
|
78748
79077
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
78749
79078
|
to[j] = from[i];
|
|
78750
79079
|
return to;
|
|
@@ -79180,7 +79509,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
79180
79509
|
// If a specified layer hasn't been added to the map throw an error.
|
|
79181
79510
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
79182
79511
|
if (index > -1) {
|
|
79183
|
-
layerIds.push.apply(layerIds, __spreadArray$
|
|
79512
|
+
layerIds.push.apply(layerIds, __spreadArray$5([], __read$b(this_1.layerIndex[index]._getLayerIds()
|
|
79184
79513
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
79185
79514
|
}
|
|
79186
79515
|
else {
|
|
@@ -79923,7 +80252,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
79923
80252
|
};
|
|
79924
80253
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
79925
80254
|
};
|
|
79926
|
-
var __read$
|
|
80255
|
+
var __read$c = (window && window.__read) || function (o, n) {
|
|
79927
80256
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
79928
80257
|
if (!m) return o;
|
|
79929
80258
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -79939,7 +80268,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
79939
80268
|
}
|
|
79940
80269
|
return ar;
|
|
79941
80270
|
};
|
|
79942
|
-
var __spreadArray$
|
|
80271
|
+
var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
|
|
79943
80272
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
79944
80273
|
to[j] = from[i];
|
|
79945
80274
|
return to;
|
|
@@ -80014,7 +80343,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80014
80343
|
}
|
|
80015
80344
|
finally { if (e_1) throw e_1.error; }
|
|
80016
80345
|
}
|
|
80017
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
80346
|
+
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valuesList)));
|
|
80018
80347
|
};
|
|
80019
80348
|
return CameraBoundsOptions;
|
|
80020
80349
|
}(Options));
|
|
@@ -80487,7 +80816,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80487
80816
|
};
|
|
80488
80817
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
80489
80818
|
};
|
|
80490
|
-
var __read$
|
|
80819
|
+
var __read$d = (window && window.__read) || function (o, n) {
|
|
80491
80820
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
80492
80821
|
if (!m) return o;
|
|
80493
80822
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -80503,7 +80832,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80503
80832
|
}
|
|
80504
80833
|
return ar;
|
|
80505
80834
|
};
|
|
80506
|
-
var __spreadArray$
|
|
80835
|
+
var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
|
|
80507
80836
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
80508
80837
|
to[j] = from[i];
|
|
80509
80838
|
return to;
|
|
@@ -80662,7 +80991,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80662
80991
|
finally { if (e_1) throw e_1.error; }
|
|
80663
80992
|
}
|
|
80664
80993
|
// Then execute the standard merge behavior.
|
|
80665
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
80994
|
+
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
|
|
80666
80995
|
};
|
|
80667
80996
|
return StyleOptions;
|
|
80668
80997
|
}(Options));
|
|
@@ -80704,7 +81033,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80704
81033
|
};
|
|
80705
81034
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
80706
81035
|
};
|
|
80707
|
-
var __read$
|
|
81036
|
+
var __read$e = (window && window.__read) || function (o, n) {
|
|
80708
81037
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
80709
81038
|
if (!m) return o;
|
|
80710
81039
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -80720,7 +81049,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80720
81049
|
}
|
|
80721
81050
|
return ar;
|
|
80722
81051
|
};
|
|
80723
|
-
var __spreadArray$
|
|
81052
|
+
var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
|
|
80724
81053
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
80725
81054
|
to[j] = from[i];
|
|
80726
81055
|
return to;
|
|
@@ -80955,10 +81284,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80955
81284
|
// won't change default behavior in Options as usually that's what desired
|
|
80956
81285
|
// instead capture it here and reassign.
|
|
80957
81286
|
var currentTransforms = this._transformers;
|
|
80958
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$
|
|
81287
|
+
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 || [])); }, []) : [];
|
|
80959
81288
|
// Then execute the standard merge behavior.
|
|
80960
81289
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
80961
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$
|
|
81290
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$e(valueList)));
|
|
80962
81291
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
80963
81292
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
80964
81293
|
}
|
|
@@ -80970,7 +81299,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
80970
81299
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
80971
81300
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
80972
81301
|
}
|
|
80973
|
-
this._transformers = __spreadArray$
|
|
81302
|
+
this._transformers = __spreadArray$8(__spreadArray$8([], __read$e(currentTransforms || [])), __read$e(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
80974
81303
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
80975
81304
|
this._transformers.push(this.transformRequest);
|
|
80976
81305
|
}
|
|
@@ -81166,7 +81495,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81166
81495
|
};
|
|
81167
81496
|
return __assign$8.apply(this, arguments);
|
|
81168
81497
|
};
|
|
81169
|
-
var __awaiter$
|
|
81498
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
81170
81499
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
81171
81500
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
81172
81501
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -81175,7 +81504,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81175
81504
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81176
81505
|
});
|
|
81177
81506
|
};
|
|
81178
|
-
var __generator$
|
|
81507
|
+
var __generator$4 = (window && window.__generator) || function (thisArg, body) {
|
|
81179
81508
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
81180
81509
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
81181
81510
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -81202,7 +81531,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81202
81531
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
81203
81532
|
}
|
|
81204
81533
|
};
|
|
81205
|
-
var __read$
|
|
81534
|
+
var __read$f = (window && window.__read) || function (o, n) {
|
|
81206
81535
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
81207
81536
|
if (!m) return o;
|
|
81208
81537
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -81218,7 +81547,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81218
81547
|
}
|
|
81219
81548
|
return ar;
|
|
81220
81549
|
};
|
|
81221
|
-
var __spreadArray$
|
|
81550
|
+
var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
|
|
81222
81551
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
81223
81552
|
to[j] = from[i];
|
|
81224
81553
|
return to;
|
|
@@ -81269,9 +81598,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81269
81598
|
_this._progressiveLoadingState.mapStyle = currentMapStyle;
|
|
81270
81599
|
// Select deferrable layers
|
|
81271
81600
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
81272
|
-
var _b = __read$
|
|
81601
|
+
var _b = __read$f(_a, 2), groupName = _b[0], layers = _b[1];
|
|
81273
81602
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
81274
|
-
return __spreadArray$
|
|
81603
|
+
return __spreadArray$9(__spreadArray$9([], __read$f(deferred)), __read$f(layers.filter(function (layer) {
|
|
81275
81604
|
var _a;
|
|
81276
81605
|
// Exclude custom layers
|
|
81277
81606
|
if (layer.type === 'custom')
|
|
@@ -81352,9 +81681,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81352
81681
|
|| definitions.configurations[0];
|
|
81353
81682
|
}
|
|
81354
81683
|
};
|
|
81355
|
-
this._lookUpAsync = function (options) { return __awaiter$
|
|
81684
|
+
this._lookUpAsync = function (options) { return __awaiter$4(_this, void 0, void 0, function () {
|
|
81356
81685
|
var definitions, result;
|
|
81357
|
-
return __generator$
|
|
81686
|
+
return __generator$4(this, function (_a) {
|
|
81358
81687
|
switch (_a.label) {
|
|
81359
81688
|
case 0: return [4 /*yield*/, this.definitions()];
|
|
81360
81689
|
case 1:
|
|
@@ -81463,7 +81792,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81463
81792
|
domain: _this.serviceOptions.staticAssetsDomain,
|
|
81464
81793
|
path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
|
|
81465
81794
|
queryParams: {
|
|
81466
|
-
|
|
81795
|
+
// Use the style version from the API response if it's available,
|
|
81796
|
+
// otherwise fallback to the version specified in the serviceOptions.
|
|
81797
|
+
// This is needed for flight testing the 2023-01-01 style version.
|
|
81798
|
+
styleVersion: definitions.version !== undefined && definitions.version !== null
|
|
81799
|
+
? definitions.version
|
|
81800
|
+
: _this.serviceOptions.styleDefinitionsVersion
|
|
81467
81801
|
// thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
|
|
81468
81802
|
//language: styleOptions.language
|
|
81469
81803
|
},
|
|
@@ -81535,8 +81869,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81535
81869
|
return style.theme.toLowerCase();
|
|
81536
81870
|
};
|
|
81537
81871
|
StyleManager.prototype.getThemeAsync = function (styleOptions) {
|
|
81538
|
-
return __awaiter$
|
|
81539
|
-
return __generator$
|
|
81872
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
81873
|
+
return __generator$4(this, function (_a) {
|
|
81540
81874
|
switch (_a.label) {
|
|
81541
81875
|
case 0: return [4 /*yield*/, this._lookUpAsync(styleOptions)];
|
|
81542
81876
|
case 1: return [2 /*return*/, (_a.sent()).theme];
|
|
@@ -81626,9 +81960,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81626
81960
|
setLayerVisibility(nextLayer, styleOptions.showBuildingModels ? 'visible' : 'none');
|
|
81627
81961
|
}
|
|
81628
81962
|
// Set visibility of traffic layers depending on traffic settings.
|
|
81629
|
-
if (trafficOptions.flow !== 'none' &&
|
|
81630
|
-
layerGroup === "traffic_" + trafficOptions.flow
|
|
81631
|
-
|
|
81963
|
+
if (trafficOptions.flow !== 'none' && nextLayer.type == 'line' &&
|
|
81964
|
+
(layerGroup === "traffic_" + trafficOptions.flow ||
|
|
81965
|
+
// Check if deprecated flow types are used and the layer is a bing-traffic layer.
|
|
81966
|
+
// Needed for backwards compatibility in Bing styles to support deprecated flow types.
|
|
81967
|
+
(['absolute', 'relative-delay'].includes(trafficOptions.flow) && nextLayer['source'] === "bing-traffic"))) {
|
|
81632
81968
|
setLayerVisibility(nextLayer, 'visible');
|
|
81633
81969
|
}
|
|
81634
81970
|
// Set visibility of labels
|
|
@@ -81657,7 +81993,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81657
81993
|
// A FundamentalMapLayer (grouped layer) representation of the next style must be built.
|
|
81658
81994
|
var previousLayers = this.map.layers.getLayers();
|
|
81659
81995
|
var nextLayers = Object.entries(layerGroupLayers).map(function (_a) {
|
|
81660
|
-
var _b = __read$
|
|
81996
|
+
var _b = __read$f(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
|
|
81661
81997
|
return _this._buildFundamentalLayerFrom(layerGroupMapboxLayers, layerGroupName);
|
|
81662
81998
|
});
|
|
81663
81999
|
// Update FundamentalMapLayers in LayerManager
|
|
@@ -81754,27 +82090,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81754
82090
|
* Fetches a json resource at the specified domain and path.
|
|
81755
82091
|
*/
|
|
81756
82092
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
81757
|
-
var _a;
|
|
82093
|
+
var _a, _b;
|
|
81758
82094
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
81759
|
-
return __awaiter$
|
|
82095
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
81760
82096
|
var requestParams, fetchOptions;
|
|
81761
|
-
var
|
|
81762
|
-
return __generator$
|
|
81763
|
-
switch (
|
|
82097
|
+
var _c;
|
|
82098
|
+
return __generator$4(this, function (_d) {
|
|
82099
|
+
switch (_d.label) {
|
|
81764
82100
|
case 0:
|
|
81765
82101
|
requestParams = {
|
|
81766
82102
|
url: new Url({
|
|
81767
82103
|
protocol: "https",
|
|
81768
82104
|
domain: domain,
|
|
81769
82105
|
path: path,
|
|
81770
|
-
queryParams: __assign$8((
|
|
82106
|
+
queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
|
|
82107
|
+
// Generate a hash code to avoid cache conflict
|
|
82108
|
+
// TODO: Remove this once style version 2023-01-01 is publicly available
|
|
82109
|
+
_c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
|
|
81771
82110
|
}).toString()
|
|
81772
82111
|
};
|
|
81773
82112
|
if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
|
|
81774
82113
|
// If a transformRequest(...) was specified use it.
|
|
81775
82114
|
requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
|
|
81776
82115
|
}
|
|
81777
|
-
(
|
|
82116
|
+
(_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
|
|
81778
82117
|
fetchOptions = {
|
|
81779
82118
|
method: "GET",
|
|
81780
82119
|
mode: "cors",
|
|
@@ -81791,11 +82130,26 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81791
82130
|
throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
|
|
81792
82131
|
}
|
|
81793
82132
|
})];
|
|
81794
|
-
case 1: return [2 /*return*/,
|
|
82133
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
81795
82134
|
}
|
|
81796
82135
|
});
|
|
81797
82136
|
});
|
|
81798
82137
|
};
|
|
82138
|
+
/**
|
|
82139
|
+
* A basic helper function to generate a hash from an input string.
|
|
82140
|
+
*/
|
|
82141
|
+
StyleManager._hashCode = function (str) {
|
|
82142
|
+
if (str === void 0) { str = ""; }
|
|
82143
|
+
var chr, hash = 0;
|
|
82144
|
+
if (!str)
|
|
82145
|
+
return hash;
|
|
82146
|
+
for (var i = 0; i < str.length; i++) {
|
|
82147
|
+
chr = str.charCodeAt(i);
|
|
82148
|
+
hash = (hash << 5) - hash + chr;
|
|
82149
|
+
hash |= 0; // Convert to 32bit integer
|
|
82150
|
+
}
|
|
82151
|
+
return hash;
|
|
82152
|
+
};
|
|
81799
82153
|
return StyleManager;
|
|
81800
82154
|
}());
|
|
81801
82155
|
|
|
@@ -81804,6 +82158,123 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81804
82158
|
*/
|
|
81805
82159
|
var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
|
|
81806
82160
|
|
|
82161
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
82162
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
82163
|
+
if (m) return m.call(o);
|
|
82164
|
+
if (o && typeof o.length === "number") return {
|
|
82165
|
+
next: function () {
|
|
82166
|
+
if (o && i >= o.length) o = void 0;
|
|
82167
|
+
return { value: o && o[i++], done: !o };
|
|
82168
|
+
}
|
|
82169
|
+
};
|
|
82170
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
82171
|
+
};
|
|
82172
|
+
/**
|
|
82173
|
+
* @internal
|
|
82174
|
+
* A manager for the map control's hidden indicators.
|
|
82175
|
+
* Exposed through the `indicators` property of the `atlas.Map` class.
|
|
82176
|
+
* Cannot be instantiated by the user.
|
|
82177
|
+
*/
|
|
82178
|
+
var AccessibleIndicatorManager = /** @class */ (function () {
|
|
82179
|
+
/**
|
|
82180
|
+
* Constructs the indicator manager to be exposed only through the `indicators` property of the `Map` class.
|
|
82181
|
+
* @param map The map whose indicators are being managed by this.
|
|
82182
|
+
* @internal
|
|
82183
|
+
*/
|
|
82184
|
+
function AccessibleIndicatorManager(map) {
|
|
82185
|
+
this.map = map;
|
|
82186
|
+
this.indicators = new Set();
|
|
82187
|
+
}
|
|
82188
|
+
/**
|
|
82189
|
+
* Adds an indicator to the map
|
|
82190
|
+
* @param indicator The indicator(s) to add.
|
|
82191
|
+
*/
|
|
82192
|
+
AccessibleIndicatorManager.prototype.add = function (indicator) {
|
|
82193
|
+
var e_1, _a;
|
|
82194
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
82195
|
+
try {
|
|
82196
|
+
for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
|
|
82197
|
+
var i = indicator_1_1.value;
|
|
82198
|
+
if (!this.indicators.has(i)) {
|
|
82199
|
+
this.indicators.add(i);
|
|
82200
|
+
i.attach(this.map);
|
|
82201
|
+
}
|
|
82202
|
+
}
|
|
82203
|
+
}
|
|
82204
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
82205
|
+
finally {
|
|
82206
|
+
try {
|
|
82207
|
+
if (indicator_1_1 && !indicator_1_1.done && (_a = indicator_1.return)) _a.call(indicator_1);
|
|
82208
|
+
}
|
|
82209
|
+
finally { if (e_1) throw e_1.error; }
|
|
82210
|
+
}
|
|
82211
|
+
};
|
|
82212
|
+
/**
|
|
82213
|
+
* Removes all indicators from the map.
|
|
82214
|
+
*/
|
|
82215
|
+
AccessibleIndicatorManager.prototype.clear = function () {
|
|
82216
|
+
var _this = this;
|
|
82217
|
+
this.indicators.forEach(function (indicator) {
|
|
82218
|
+
_this.indicators.delete(indicator);
|
|
82219
|
+
indicator.remove();
|
|
82220
|
+
});
|
|
82221
|
+
};
|
|
82222
|
+
/**
|
|
82223
|
+
* Removes an indicator from the map
|
|
82224
|
+
* @param indicator The indicator(s) to remove.
|
|
82225
|
+
*/
|
|
82226
|
+
AccessibleIndicatorManager.prototype.remove = function (indicator) {
|
|
82227
|
+
var e_2, _a;
|
|
82228
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
82229
|
+
try {
|
|
82230
|
+
for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
|
|
82231
|
+
var i = indicator_2_1.value;
|
|
82232
|
+
if (this.indicators.has(i)) {
|
|
82233
|
+
this.indicators.delete(i);
|
|
82234
|
+
i.remove();
|
|
82235
|
+
}
|
|
82236
|
+
}
|
|
82237
|
+
}
|
|
82238
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
82239
|
+
finally {
|
|
82240
|
+
try {
|
|
82241
|
+
if (indicator_2_1 && !indicator_2_1.done && (_a = indicator_2.return)) _a.call(indicator_2);
|
|
82242
|
+
}
|
|
82243
|
+
finally { if (e_2) throw e_2.error; }
|
|
82244
|
+
}
|
|
82245
|
+
};
|
|
82246
|
+
/**
|
|
82247
|
+
* Returns the indicators currently attached to the map.
|
|
82248
|
+
*/
|
|
82249
|
+
AccessibleIndicatorManager.prototype.getIndicators = function () {
|
|
82250
|
+
return Array.from(this.indicators);
|
|
82251
|
+
};
|
|
82252
|
+
/**
|
|
82253
|
+
* Returns the div element that should contain all the indicator containers.
|
|
82254
|
+
* Creates it if it doesn't already exist.
|
|
82255
|
+
* @internal
|
|
82256
|
+
*/
|
|
82257
|
+
AccessibleIndicatorManager.prototype._getCollectionDiv = function () {
|
|
82258
|
+
var collection = this.map.getMapContainer()
|
|
82259
|
+
.querySelector("." + AccessibleIndicatorManager.Css.collection);
|
|
82260
|
+
if (!collection) {
|
|
82261
|
+
// If the collection div doesn't exist create it.
|
|
82262
|
+
collection = document.createElement("div");
|
|
82263
|
+
collection.setAttribute("aria-label", "map data");
|
|
82264
|
+
// Set the container role to listbox, and the descents' role to option, so the reader will read the listbox as a list.
|
|
82265
|
+
// For example, NVDA will read "data point, 1 of 1" when the indicator is focused.
|
|
82266
|
+
collection.setAttribute("role", "listbox");
|
|
82267
|
+
collection.classList.add(AccessibleIndicatorManager.Css.collection);
|
|
82268
|
+
this.map.getMapContainer().appendChild(collection);
|
|
82269
|
+
}
|
|
82270
|
+
return collection;
|
|
82271
|
+
};
|
|
82272
|
+
AccessibleIndicatorManager.Css = {
|
|
82273
|
+
collection: "accessible-indicator-collection-container"
|
|
82274
|
+
};
|
|
82275
|
+
return AccessibleIndicatorManager;
|
|
82276
|
+
}());
|
|
82277
|
+
|
|
81807
82278
|
var __extends$19 = (window && window.__extends) || (function () {
|
|
81808
82279
|
var extendStatics = function (d, b) {
|
|
81809
82280
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -81830,7 +82301,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81830
82301
|
};
|
|
81831
82302
|
return __assign$9.apply(this, arguments);
|
|
81832
82303
|
};
|
|
81833
|
-
var __awaiter$
|
|
82304
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
81834
82305
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
81835
82306
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
81836
82307
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -81839,7 +82310,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81839
82310
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
81840
82311
|
});
|
|
81841
82312
|
};
|
|
81842
|
-
var __generator$
|
|
82313
|
+
var __generator$5 = (window && window.__generator) || function (thisArg, body) {
|
|
81843
82314
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
81844
82315
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
81845
82316
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -81866,7 +82337,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81866
82337
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
81867
82338
|
}
|
|
81868
82339
|
};
|
|
81869
|
-
var __read$
|
|
82340
|
+
var __read$g = (window && window.__read) || function (o, n) {
|
|
81870
82341
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
81871
82342
|
if (!m) return o;
|
|
81872
82343
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -81882,12 +82353,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81882
82353
|
}
|
|
81883
82354
|
return ar;
|
|
81884
82355
|
};
|
|
81885
|
-
var __spreadArray$
|
|
82356
|
+
var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
|
|
81886
82357
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
81887
82358
|
to[j] = from[i];
|
|
81888
82359
|
return to;
|
|
81889
82360
|
};
|
|
81890
|
-
var __values$
|
|
82361
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
81891
82362
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
81892
82363
|
if (m) return m.call(o);
|
|
81893
82364
|
if (o && typeof o.length === "number") return {
|
|
@@ -82000,6 +82471,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82000
82471
|
_this.markers = new HtmlMarkerManager(_this);
|
|
82001
82472
|
_this.sources = new SourceManager(_this);
|
|
82002
82473
|
_this.popups = new PopupManager(_this);
|
|
82474
|
+
_this.indicators = new AccessibleIndicatorManager(_this);
|
|
82003
82475
|
// Add CSS classes and set attributes for DOM elements.
|
|
82004
82476
|
_this.map.getContainer().classList.add(Map.Css.container);
|
|
82005
82477
|
_this.map.getCanvasContainer().classList.add(Map.Css.canvasContainer);
|
|
@@ -82042,7 +82514,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82042
82514
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
82043
82515
|
var stylesInit = _this.styles.initStyleset();
|
|
82044
82516
|
Promise.all([authManInit, stylesInit]).then(function (_a) {
|
|
82045
|
-
var _b = __read$
|
|
82517
|
+
var _b = __read$g(_a, 2), _ = _b[0], definitions = _b[1];
|
|
82046
82518
|
// Check that the map hasn't been removed for any reason.
|
|
82047
82519
|
// If so no need to finish styling the map.
|
|
82048
82520
|
if (_this.removed) {
|
|
@@ -82072,7 +82544,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82072
82544
|
_this.events.invoke("error", errorData);
|
|
82073
82545
|
});
|
|
82074
82546
|
// --> Set initial camera state of map
|
|
82075
|
-
_this.setCamera(__assign$9(__assign$9({
|
|
82547
|
+
_this.setCamera(__assign$9(__assign$9({
|
|
82548
|
+
// Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
|
|
82549
|
+
minZoom: 1 }, options), { type: "jump", duration: 0 }));
|
|
82076
82550
|
// Add delegates to map
|
|
82077
82551
|
{
|
|
82078
82552
|
_this.incidentDelegate = new IncidentServiceDelegate(_this);
|
|
@@ -82141,6 +82615,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82141
82615
|
else {
|
|
82142
82616
|
this.accessibleMapDelegate.removeFromMap();
|
|
82143
82617
|
}
|
|
82618
|
+
if (this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration) {
|
|
82619
|
+
this.styles.initPromise = null;
|
|
82620
|
+
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
82621
|
+
this.setStyle({});
|
|
82622
|
+
}
|
|
82144
82623
|
};
|
|
82145
82624
|
/**
|
|
82146
82625
|
* Adds request transformer
|
|
@@ -82690,7 +83169,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82690
83169
|
urls = layer.getOptions().subdomains || [];
|
|
82691
83170
|
}
|
|
82692
83171
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
82693
|
-
urls.push.apply(urls, __spreadArray$
|
|
83172
|
+
urls.push.apply(urls, __spreadArray$a([], __read$g(tileSources)));
|
|
82694
83173
|
layer._setOptionsNoUpdate({
|
|
82695
83174
|
subdomains: urls
|
|
82696
83175
|
});
|
|
@@ -82712,7 +83191,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82712
83191
|
Map.prototype.removeLayers = function (layerNames) {
|
|
82713
83192
|
var e_1, _a;
|
|
82714
83193
|
try {
|
|
82715
|
-
for (var layerNames_1 = __values$
|
|
83194
|
+
for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
|
|
82716
83195
|
var layerName = layerNames_1_1.value;
|
|
82717
83196
|
// Previously calling removeLayers for layers that didn't exist in the map just did nothing.
|
|
82718
83197
|
// Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
|
|
@@ -82854,14 +83333,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82854
83333
|
this.layers.clear();
|
|
82855
83334
|
this.sources.clear();
|
|
82856
83335
|
this.markers.clear();
|
|
83336
|
+
this.indicators.clear();
|
|
82857
83337
|
};
|
|
82858
83338
|
/**
|
|
82859
83339
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
82860
83340
|
*/
|
|
82861
83341
|
Map.prototype.dispose = function () {
|
|
83342
|
+
var _a;
|
|
82862
83343
|
this.clear();
|
|
82863
83344
|
this.map.remove();
|
|
83345
|
+
(_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
82864
83346
|
this.removed = true;
|
|
83347
|
+
// Remove event listeners
|
|
83348
|
+
window.removeEventListener("resize", this._windowResizeCallback);
|
|
82865
83349
|
while (this.getMapContainer().firstChild) {
|
|
82866
83350
|
var currChild = this.getMapContainer().firstChild;
|
|
82867
83351
|
this.getMapContainer().removeChild(currChild);
|
|
@@ -82902,7 +83386,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82902
83386
|
var e_2, _a;
|
|
82903
83387
|
var positions = [];
|
|
82904
83388
|
try {
|
|
82905
|
-
for (var pixels_1 = __values$
|
|
83389
|
+
for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
|
|
82906
83390
|
var pixel = pixels_1_1.value;
|
|
82907
83391
|
var lngLat = this.map.unproject(pixel);
|
|
82908
83392
|
positions.push(new Position(lngLat.lng, lngLat.lat));
|
|
@@ -82925,7 +83409,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82925
83409
|
var e_3, _a;
|
|
82926
83410
|
var pixels = [];
|
|
82927
83411
|
try {
|
|
82928
|
-
for (var positions_1 = __values$
|
|
83412
|
+
for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
82929
83413
|
var position = positions_1_1.value;
|
|
82930
83414
|
var point = this.map.project(position);
|
|
82931
83415
|
pixels.push(new Pixel(point.x, point.y));
|
|
@@ -82973,8 +83457,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82973
83457
|
*/
|
|
82974
83458
|
Map.prototype._rebuildStyle = function (diff) {
|
|
82975
83459
|
if (diff === void 0) { diff = true; }
|
|
82976
|
-
return __awaiter$
|
|
82977
|
-
return __generator$
|
|
83460
|
+
return __awaiter$5(this, void 0, void 0, function () {
|
|
83461
|
+
return __generator$5(this, function (_a) {
|
|
82978
83462
|
this.styles.setStyle(this.styleOptions, diff);
|
|
82979
83463
|
this.imageSprite._restoreImages();
|
|
82980
83464
|
return [2 /*return*/];
|
|
@@ -83190,7 +83674,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
83190
83674
|
return Map;
|
|
83191
83675
|
}(EventEmitter));
|
|
83192
83676
|
|
|
83193
|
-
var __read$
|
|
83677
|
+
var __read$h = (window && window.__read) || function (o, n) {
|
|
83194
83678
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
83195
83679
|
if (!m) return o;
|
|
83196
83680
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -83206,7 +83690,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
83206
83690
|
}
|
|
83207
83691
|
return ar;
|
|
83208
83692
|
};
|
|
83209
|
-
var __spreadArray$
|
|
83693
|
+
var __spreadArray$b = (window && window.__spreadArray) || function (to, from) {
|
|
83210
83694
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
83211
83695
|
to[j] = from[i];
|
|
83212
83696
|
return to;
|
|
@@ -83352,7 +83836,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
83352
83836
|
lineLength = 50;
|
|
83353
83837
|
}
|
|
83354
83838
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
83355
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$
|
|
83839
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$h((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
83356
83840
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
83357
83841
|
if (w < width) {
|
|
83358
83842
|
width = w;
|