azure-maps-control 2.2.4 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atlas-core-bare-snr.js +400 -62
- package/dist/atlas-core-bare.js +427 -91
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +400 -62
- package/dist/atlas-core.js +427 -91
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.js +427 -91
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
package/dist/atlas-core-bare.js
CHANGED
|
@@ -265,7 +265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
265
265
|
return Url;
|
|
266
266
|
}());
|
|
267
267
|
|
|
268
|
-
var version = "2.2.
|
|
268
|
+
var version = "2.2.6";
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -10104,6 +10104,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10104
10104
|
|
|
10105
10105
|
var cloneDeepWith_1 = cloneDeepWith;
|
|
10106
10106
|
|
|
10107
|
+
/**
|
|
10108
|
+
* A hidden HTML element that is used to provide accessibility to shapes such as bubble.
|
|
10109
|
+
*/
|
|
10110
|
+
var AccessibleIndicator = /** @class */ (function () {
|
|
10111
|
+
/**
|
|
10112
|
+
* Constructs an AccessibleIndicator object by initializing a hidden `div` element.
|
|
10113
|
+
* @internal
|
|
10114
|
+
*/
|
|
10115
|
+
function AccessibleIndicator(options) {
|
|
10116
|
+
var _this = this;
|
|
10117
|
+
/**
|
|
10118
|
+
* Attaches the indicator to the HTML document in a hidden style.
|
|
10119
|
+
* @param map The map.
|
|
10120
|
+
*/
|
|
10121
|
+
this.attach = function (map) {
|
|
10122
|
+
// If attaching to a different map, remove popup on current map
|
|
10123
|
+
if (_this.map !== map) {
|
|
10124
|
+
// If map was defined the indicator was attached to another map.
|
|
10125
|
+
if (_this.map) {
|
|
10126
|
+
_this.detachFromCurrentMap();
|
|
10127
|
+
}
|
|
10128
|
+
_this.map = map;
|
|
10129
|
+
_this.map.indicators._getCollectionDiv().appendChild(_this.element);
|
|
10130
|
+
_this.map.indicators.add(_this);
|
|
10131
|
+
}
|
|
10132
|
+
};
|
|
10133
|
+
/**
|
|
10134
|
+
* Removes the indicator from the map and the HTML document.
|
|
10135
|
+
*/
|
|
10136
|
+
this.remove = function () {
|
|
10137
|
+
_this.detachFromCurrentMap();
|
|
10138
|
+
_this.element.remove();
|
|
10139
|
+
};
|
|
10140
|
+
/**
|
|
10141
|
+
* Get the DOM element of the indicator.
|
|
10142
|
+
* @returns The DOM element of the indicator.
|
|
10143
|
+
*/
|
|
10144
|
+
this.getElement = function () {
|
|
10145
|
+
return _this.element;
|
|
10146
|
+
};
|
|
10147
|
+
this.detachFromCurrentMap = function () {
|
|
10148
|
+
if (_this.map) {
|
|
10149
|
+
_this.map.indicators.remove(_this);
|
|
10150
|
+
delete _this.map;
|
|
10151
|
+
}
|
|
10152
|
+
};
|
|
10153
|
+
this.element = document.createElement("div");
|
|
10154
|
+
// Set tabindex to 0 to make the element focusable.
|
|
10155
|
+
this.element.setAttribute("tabindex", "0");
|
|
10156
|
+
// Set the role to option, and it's container to listbox so the reader will read the listbox as a list.
|
|
10157
|
+
// For example, NVDA will read "data point, {posinset} of {setsize}" when the indicator is focused.
|
|
10158
|
+
this.element.setAttribute("role", "option");
|
|
10159
|
+
if (options === null || options === void 0 ? void 0 : options.setSize)
|
|
10160
|
+
this.element.setAttribute("aria-setsize", options.setSize.toString());
|
|
10161
|
+
if (options === null || options === void 0 ? void 0 : options.positionInSet)
|
|
10162
|
+
this.element.setAttribute("aria-posinset", options.positionInSet.toString());
|
|
10163
|
+
this.element.setAttribute("aria-label", "data point");
|
|
10164
|
+
this.element.classList.add(AccessibleIndicator.Css.hidden);
|
|
10165
|
+
}
|
|
10166
|
+
// CSS class names.
|
|
10167
|
+
AccessibleIndicator.Css = {
|
|
10168
|
+
hidden: "hidden-accessible-element"
|
|
10169
|
+
};
|
|
10170
|
+
return AccessibleIndicator;
|
|
10171
|
+
}());
|
|
10172
|
+
|
|
10107
10173
|
var __extends$k = (window && window.__extends) || (function () {
|
|
10108
10174
|
var extendStatics = function (d, b) {
|
|
10109
10175
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -10962,7 +11028,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10962
11028
|
// and can be used to determine which events are ours vs Mapbox's.
|
|
10963
11029
|
Layer.LayerEvents = {
|
|
10964
11030
|
layeradded: undefined,
|
|
10965
|
-
layerremoved: undefined
|
|
11031
|
+
layerremoved: undefined,
|
|
11032
|
+
focusin: undefined,
|
|
11033
|
+
focusout: undefined,
|
|
10966
11034
|
};
|
|
10967
11035
|
return Layer;
|
|
10968
11036
|
}(EventEmitter));
|
|
@@ -11117,6 +11185,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11117
11185
|
* @default 8
|
|
11118
11186
|
*/
|
|
11119
11187
|
_this.radius = 8;
|
|
11188
|
+
/**
|
|
11189
|
+
* @internal
|
|
11190
|
+
* Specifies whether to create focusable indicators for the bubbles.
|
|
11191
|
+
*
|
|
11192
|
+
* Note: We treat this as an internal option for now because we hadn't fully decided the default styling for the indicators.
|
|
11193
|
+
* Once we decide, we will make this a public option or remove it.
|
|
11194
|
+
*/
|
|
11195
|
+
_this.createIndicators = false;
|
|
11120
11196
|
return _this;
|
|
11121
11197
|
}
|
|
11122
11198
|
return BubbleLayerOptions;
|
|
@@ -11137,6 +11213,58 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11137
11213
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
11138
11214
|
};
|
|
11139
11215
|
})();
|
|
11216
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11217
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11218
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11219
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11220
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11221
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11222
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11223
|
+
});
|
|
11224
|
+
};
|
|
11225
|
+
var __generator$1 = (window && window.__generator) || function (thisArg, body) {
|
|
11226
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
11227
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
11228
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
11229
|
+
function step(op) {
|
|
11230
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
11231
|
+
while (_) try {
|
|
11232
|
+
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;
|
|
11233
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
11234
|
+
switch (op[0]) {
|
|
11235
|
+
case 0: case 1: t = op; break;
|
|
11236
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
11237
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
11238
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
11239
|
+
default:
|
|
11240
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
11241
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
11242
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
11243
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
11244
|
+
if (t[2]) _.ops.pop();
|
|
11245
|
+
_.trys.pop(); continue;
|
|
11246
|
+
}
|
|
11247
|
+
op = body.call(thisArg, _);
|
|
11248
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
11249
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
11250
|
+
}
|
|
11251
|
+
};
|
|
11252
|
+
var __read$3 = (window && window.__read) || function (o, n) {
|
|
11253
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
11254
|
+
if (!m) return o;
|
|
11255
|
+
var i = m.call(o), r, ar = [], e;
|
|
11256
|
+
try {
|
|
11257
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
11258
|
+
}
|
|
11259
|
+
catch (error) { e = { error: error }; }
|
|
11260
|
+
finally {
|
|
11261
|
+
try {
|
|
11262
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
11263
|
+
}
|
|
11264
|
+
finally { if (e) throw e.error; }
|
|
11265
|
+
}
|
|
11266
|
+
return ar;
|
|
11267
|
+
};
|
|
11140
11268
|
/**
|
|
11141
11269
|
* Renders Point objects as scalable circles (bubbles).
|
|
11142
11270
|
*/
|
|
@@ -11150,6 +11278,72 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11150
11278
|
*/
|
|
11151
11279
|
function BubbleLayer(source, id, options) {
|
|
11152
11280
|
var _this = _super.call(this, id) || this;
|
|
11281
|
+
_this.accessibleIndicator = [];
|
|
11282
|
+
_this.setAccessibleIndicator = function () { return __awaiter$1(_this, void 0, void 0, function () {
|
|
11283
|
+
var features, createIndicator, insertHiddenBefore, attach;
|
|
11284
|
+
var _this = this;
|
|
11285
|
+
return __generator$1(this, function (_a) {
|
|
11286
|
+
this.accessibleIndicator.forEach(function (indicator) { return indicator.remove(); });
|
|
11287
|
+
this.accessibleIndicator = [];
|
|
11288
|
+
features = this.map.layers.getRenderedShapes(this.map.getCamera().bounds, this);
|
|
11289
|
+
createIndicator = function (features, idx) {
|
|
11290
|
+
var bubbleFeature = features[idx];
|
|
11291
|
+
var indicator = new AccessibleIndicator({ positionInSet: idx + 1, setSize: features.length });
|
|
11292
|
+
var element = indicator.getElement();
|
|
11293
|
+
var _a = __read$3(_this.map.positionsToPixels([bubbleFeature.data.geometry.coordinates]), 1), pixel = _a[0];
|
|
11294
|
+
element.addEventListener('focusin', function (event) {
|
|
11295
|
+
_this.accessibleIndicator.filter(function (p) { return p !== indicator; }).forEach(function (popup) { return popup.remove(); });
|
|
11296
|
+
// insert previous and next popups
|
|
11297
|
+
if (idx - 1 >= 0) {
|
|
11298
|
+
insertHiddenBefore(indicator, createIndicator(features, idx - 1));
|
|
11299
|
+
}
|
|
11300
|
+
if (idx + 1 < features.length) {
|
|
11301
|
+
attach(createIndicator(features, idx + 1));
|
|
11302
|
+
}
|
|
11303
|
+
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], '#000000', _this.options.strokeColor]);
|
|
11304
|
+
var focusEvent = {
|
|
11305
|
+
target: element,
|
|
11306
|
+
type: 'focusin',
|
|
11307
|
+
map: _this.map,
|
|
11308
|
+
shape: bubbleFeature,
|
|
11309
|
+
originalEvent: event,
|
|
11310
|
+
pixel: pixel
|
|
11311
|
+
};
|
|
11312
|
+
_this._invokeEvent('focusin', focusEvent);
|
|
11313
|
+
});
|
|
11314
|
+
element.addEventListener('focusout', function (event) {
|
|
11315
|
+
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], _this.options.strokeColor, _this.options.strokeColor]);
|
|
11316
|
+
var focusEvent = {
|
|
11317
|
+
target: element,
|
|
11318
|
+
type: 'focusout',
|
|
11319
|
+
map: _this.map,
|
|
11320
|
+
shape: bubbleFeature,
|
|
11321
|
+
originalEvent: event,
|
|
11322
|
+
pixel: pixel
|
|
11323
|
+
};
|
|
11324
|
+
_this._invokeEvent('focusout', focusEvent);
|
|
11325
|
+
});
|
|
11326
|
+
_this.accessibleIndicator.push(indicator);
|
|
11327
|
+
return indicator;
|
|
11328
|
+
};
|
|
11329
|
+
insertHiddenBefore = function (base, toInsert) {
|
|
11330
|
+
toInsert.attach(_this.map);
|
|
11331
|
+
var elementToSwapIn = toInsert.getElement();
|
|
11332
|
+
var baseElement = base.getElement();
|
|
11333
|
+
baseElement.parentElement.insertBefore(elementToSwapIn, baseElement);
|
|
11334
|
+
};
|
|
11335
|
+
attach = function (popup) {
|
|
11336
|
+
popup.attach(_this.map);
|
|
11337
|
+
};
|
|
11338
|
+
if (features.length > 0) {
|
|
11339
|
+
attach(createIndicator(features, 0));
|
|
11340
|
+
}
|
|
11341
|
+
if (features.length > 1) {
|
|
11342
|
+
attach(createIndicator(features, features.length - 1));
|
|
11343
|
+
}
|
|
11344
|
+
return [2 /*return*/];
|
|
11345
|
+
});
|
|
11346
|
+
}); };
|
|
11153
11347
|
_this.options = new BubbleLayerOptions().merge(cloneDeepWith_1(options, BubbleLayerOptions._cloneCustomizer));
|
|
11154
11348
|
_this.options.source = source || _this.options.source;
|
|
11155
11349
|
return _this;
|
|
@@ -11197,6 +11391,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
11197
11391
|
}
|
|
11198
11392
|
this.options = newOptions;
|
|
11199
11393
|
};
|
|
11394
|
+
BubbleLayer.prototype.onAdd = function (map) {
|
|
11395
|
+
_super.prototype.onAdd.call(this, map);
|
|
11396
|
+
if (this.options.createIndicators) {
|
|
11397
|
+
map.events.addOnce('idle', this.setAccessibleIndicator);
|
|
11398
|
+
map.events.add('moveend', this.setAccessibleIndicator);
|
|
11399
|
+
}
|
|
11400
|
+
};
|
|
11401
|
+
BubbleLayer.prototype.onRemove = function () {
|
|
11402
|
+
_super.prototype.onRemove.call(this);
|
|
11403
|
+
if (this.options.createIndicators) {
|
|
11404
|
+
this.map.events.remove('idle', this.setAccessibleIndicator);
|
|
11405
|
+
this.map.events.remove('moveend', this.setAccessibleIndicator);
|
|
11406
|
+
}
|
|
11407
|
+
};
|
|
11200
11408
|
/**
|
|
11201
11409
|
* @internal
|
|
11202
11410
|
*/
|
|
@@ -12315,7 +12523,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
12315
12523
|
};
|
|
12316
12524
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12317
12525
|
};
|
|
12318
|
-
var __read$
|
|
12526
|
+
var __read$4 = (window && window.__read) || function (o, n) {
|
|
12319
12527
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
12320
12528
|
if (!m) return o;
|
|
12321
12529
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -12406,7 +12614,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
12406
12614
|
finally { if (e_1) throw e_1.error; }
|
|
12407
12615
|
}
|
|
12408
12616
|
// Then execute the standard merge behavior.
|
|
12409
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$
|
|
12617
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray([], __read$4(valueList)));
|
|
12410
12618
|
if (isNewColorSet) {
|
|
12411
12619
|
merged.fillPattern = undefined;
|
|
12412
12620
|
}
|
|
@@ -13737,7 +13945,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13737
13945
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13738
13946
|
};
|
|
13739
13947
|
})();
|
|
13740
|
-
var __read$
|
|
13948
|
+
var __read$5 = (window && window.__read) || function (o, n) {
|
|
13741
13949
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
13742
13950
|
if (!m) return o;
|
|
13743
13951
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -13849,7 +14057,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13849
14057
|
*/
|
|
13850
14058
|
_this._onDown = function (event) {
|
|
13851
14059
|
_this.map.popups._addDraggedPopup(_this);
|
|
13852
|
-
var _a = __read$
|
|
14060
|
+
var _a = __read$5(_this.map.positionsToPixels([_this.options.position]), 1), anchorPixel = _a[0];
|
|
13853
14061
|
if (event.type === "mousedown") {
|
|
13854
14062
|
event = event;
|
|
13855
14063
|
_this.dragOffset = [
|
|
@@ -14013,7 +14221,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
14013
14221
|
pixel[0] + this.dragOffset[0],
|
|
14014
14222
|
pixel[1] + this.dragOffset[1]
|
|
14015
14223
|
];
|
|
14016
|
-
var _a = __read$
|
|
14224
|
+
var _a = __read$5(this.map.pixelsToPositions([anchorPixel]), 1), anchorPos = _a[0];
|
|
14017
14225
|
this.options.position = anchorPos;
|
|
14018
14226
|
this.marker.setLngLat(this.options.position);
|
|
14019
14227
|
this._invokeEvent("drag", { type: "drag", target: this });
|
|
@@ -14167,7 +14375,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
14167
14375
|
posY = pt.y;
|
|
14168
14376
|
}
|
|
14169
14377
|
else {
|
|
14170
|
-
var _a = __read$
|
|
14378
|
+
var _a = __read$5(map.positionsToPixels([options.position]), 1), _b = __read$5(_a[0], 2), x = _b[0], y = _b[1];
|
|
14171
14379
|
posX = x;
|
|
14172
14380
|
posY = y;
|
|
14173
14381
|
}
|
|
@@ -15084,7 +15292,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15084
15292
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15085
15293
|
};
|
|
15086
15294
|
})();
|
|
15087
|
-
var __read$
|
|
15295
|
+
var __read$6 = (window && window.__read) || function (o, n) {
|
|
15088
15296
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15089
15297
|
if (!m) return o;
|
|
15090
15298
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -15237,7 +15445,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
15237
15445
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
15238
15446
|
valueList[_i] = arguments[_i];
|
|
15239
15447
|
}
|
|
15240
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$
|
|
15448
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$1([], __read$6(valueList)));
|
|
15241
15449
|
if (merged.authType === exports.AuthenticationType.subscriptionKey) {
|
|
15242
15450
|
merged.authContext = merged.aadAppId = merged.getToken = undefined;
|
|
15243
15451
|
}
|
|
@@ -16141,7 +16349,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16141
16349
|
return MapLabelCache;
|
|
16142
16350
|
}());
|
|
16143
16351
|
|
|
16144
|
-
var __awaiter$
|
|
16352
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16145
16353
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16146
16354
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16147
16355
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -16150,7 +16358,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16150
16358
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16151
16359
|
});
|
|
16152
16360
|
};
|
|
16153
|
-
var __generator$
|
|
16361
|
+
var __generator$2 = (window && window.__generator) || function (thisArg, body) {
|
|
16154
16362
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
16155
16363
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16156
16364
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -16177,7 +16385,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16177
16385
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
16178
16386
|
}
|
|
16179
16387
|
};
|
|
16180
|
-
var __read$
|
|
16388
|
+
var __read$7 = (window && window.__read) || function (o, n) {
|
|
16181
16389
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
16182
16390
|
if (!m) return o;
|
|
16183
16391
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -16430,9 +16638,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16430
16638
|
// Flag indicating if detailed descriptions which include zoom, lat/lon information should be returned.
|
|
16431
16639
|
this._returnDetailedDescriptions = false;
|
|
16432
16640
|
/** Event handler for shortcuts. */
|
|
16433
|
-
this._shortcutListener = function (e) { return __awaiter$
|
|
16641
|
+
this._shortcutListener = function (e) { return __awaiter$2(_this, void 0, void 0, function () {
|
|
16434
16642
|
var cam, styleOps, lang, style, camDesc;
|
|
16435
|
-
return __generator$
|
|
16643
|
+
return __generator$2(this, function (_a) {
|
|
16436
16644
|
switch (_a.label) {
|
|
16437
16645
|
case 0:
|
|
16438
16646
|
if (!(e.altKey && e.ctrlKey && e.keyCode === 68)) return [3 /*break*/, 2];
|
|
@@ -16500,9 +16708,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16500
16708
|
/** Event handler for when the mouse or touch goes down */
|
|
16501
16709
|
this._onPointerDown = function (event) {
|
|
16502
16710
|
_this._lastPointerPos = _this._getEventPos(event);
|
|
16503
|
-
_this._pointerTimeout = setTimeout(function () { return __awaiter$
|
|
16711
|
+
_this._pointerTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
16504
16712
|
var styleOps, lang, style, cam, loc;
|
|
16505
|
-
return __generator$
|
|
16713
|
+
return __generator$2(this, function (_a) {
|
|
16506
16714
|
switch (_a.label) {
|
|
16507
16715
|
case 0:
|
|
16508
16716
|
styleOps = this._map.getStyle();
|
|
@@ -16560,9 +16768,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16560
16768
|
delete _this._rotateTimeout;
|
|
16561
16769
|
};
|
|
16562
16770
|
/** Called when the map has finished changing styles and is ready to create a new description */
|
|
16563
|
-
this._updateStyle = function () { return __awaiter$
|
|
16771
|
+
this._updateStyle = function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
16564
16772
|
var cam, styleOps, lang, style, camDesc;
|
|
16565
|
-
return __generator$
|
|
16773
|
+
return __generator$2(this, function (_a) {
|
|
16566
16774
|
switch (_a.label) {
|
|
16567
16775
|
case 0:
|
|
16568
16776
|
cam = this._map.getCamera();
|
|
@@ -16614,9 +16822,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16614
16822
|
delete _this._moveTimeout;
|
|
16615
16823
|
}
|
|
16616
16824
|
// Send the new description to the map.
|
|
16617
|
-
_this._moveTimeout = setTimeout(function () { return __awaiter$
|
|
16825
|
+
_this._moveTimeout = setTimeout(function () { return __awaiter$2(_this, void 0, void 0, function () {
|
|
16618
16826
|
var loc;
|
|
16619
|
-
return __generator$
|
|
16827
|
+
return __generator$2(this, function (_a) {
|
|
16620
16828
|
switch (_a.label) {
|
|
16621
16829
|
case 0:
|
|
16622
16830
|
// Clear the rotate timeout as the move description will cover rotation.
|
|
@@ -16661,7 +16869,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16661
16869
|
// Derive polygon layers from the label config.
|
|
16662
16870
|
_this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
|
|
16663
16871
|
if (cur.polygonSources) {
|
|
16664
|
-
acc.push.apply(acc, __spreadArray$2([], __read$
|
|
16872
|
+
acc.push.apply(acc, __spreadArray$2([], __read$7(cur.polygonSources)));
|
|
16665
16873
|
}
|
|
16666
16874
|
return acc;
|
|
16667
16875
|
}, []);
|
|
@@ -16721,7 +16929,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16721
16929
|
};
|
|
16722
16930
|
/** Checks if the location has changed enough to justify a new description */
|
|
16723
16931
|
MapViewDescriptor.prototype._checkLocThreshold = function (newCenter, lastCenter) {
|
|
16724
|
-
var _a = __read$
|
|
16932
|
+
var _a = __read$7(this._map.positionsToPixels([lastCenter, newCenter]), 2), lastPixel = _a[0], newPixel = _a[1];
|
|
16725
16933
|
return Pixel.getDistance(lastPixel, newPixel) >= this._moveThreshold;
|
|
16726
16934
|
};
|
|
16727
16935
|
/** Checks if the heading has changed enough to justify a new description */
|
|
@@ -16746,10 +16954,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16746
16954
|
* @param cam The map camera informaiton.
|
|
16747
16955
|
*/
|
|
16748
16956
|
MapViewDescriptor.prototype._getLocDesc = function (cam, lang, style) {
|
|
16749
|
-
return __awaiter$
|
|
16957
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
16750
16958
|
var info_1, cPx_1, intersects_1, intersectingPolygon, intersectingType_1, i, cnt, layerInfo, cl_1;
|
|
16751
16959
|
var _this = this;
|
|
16752
|
-
return __generator$
|
|
16960
|
+
return __generator$2(this, function (_a) {
|
|
16753
16961
|
switch (_a.label) {
|
|
16754
16962
|
case 0:
|
|
16755
16963
|
if (!(style !== "blank")) return [3 /*break*/, 3];
|
|
@@ -17533,14 +17741,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17533
17741
|
var trafficOptions = _this.map.getTraffic();
|
|
17534
17742
|
if (trafficOptions.flow !== "none") {
|
|
17535
17743
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + trafficOptions.flow);
|
|
17744
|
+
if (!trafficFlowComponent && ['absolute', 'relative-delay'].includes(trafficOptions.flow)) {
|
|
17745
|
+
// Fallback to relative if deprecated flow type is used
|
|
17746
|
+
trafficFlowComponent = _this.map.layers.getLayerById("traffic_relative");
|
|
17747
|
+
}
|
|
17536
17748
|
if (trafficFlowComponent) {
|
|
17537
|
-
_this.lastFlowMode =
|
|
17749
|
+
_this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
|
|
17538
17750
|
trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
|
|
17539
17751
|
}
|
|
17540
17752
|
}
|
|
17541
17753
|
};
|
|
17542
17754
|
this.removeFromMap = function () {
|
|
17543
|
-
var trafficOptions = _this.map.getTraffic();
|
|
17544
17755
|
if (_this.lastFlowMode != "none") {
|
|
17545
17756
|
var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
|
|
17546
17757
|
if (trafficFlowComponent) {
|
|
@@ -17793,7 +18004,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17793
18004
|
return IncidentPopupFactory;
|
|
17794
18005
|
}());
|
|
17795
18006
|
|
|
17796
|
-
var __awaiter$
|
|
18007
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17797
18008
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17798
18009
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17799
18010
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -17802,7 +18013,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17802
18013
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17803
18014
|
});
|
|
17804
18015
|
};
|
|
17805
|
-
var __generator$
|
|
18016
|
+
var __generator$3 = (window && window.__generator) || function (thisArg, body) {
|
|
17806
18017
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
17807
18018
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
17808
18019
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -17856,10 +18067,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17856
18067
|
_this.map.events.add('moveend', _this.setAccessiblePopups);
|
|
17857
18068
|
};
|
|
17858
18069
|
this.accessiblePopups = [];
|
|
17859
|
-
this.setAccessiblePopups = function () { return __awaiter$
|
|
18070
|
+
this.setAccessiblePopups = function () { return __awaiter$3(_this, void 0, void 0, function () {
|
|
17860
18071
|
var features, localizedStrings, createPopup, insertHiddenBefore, insertHiddenInFront, addHidden;
|
|
17861
18072
|
var _this = this;
|
|
17862
|
-
return __generator$
|
|
18073
|
+
return __generator$3(this, function (_a) {
|
|
17863
18074
|
switch (_a.label) {
|
|
17864
18075
|
case 0:
|
|
17865
18076
|
this.accessiblePopups.forEach(function (popup) { return popup.remove(); });
|
|
@@ -21127,7 +21338,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21127
21338
|
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;
|
|
21128
21339
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21129
21340
|
};
|
|
21130
|
-
var __read$
|
|
21341
|
+
var __read$8 = (window && window.__read) || function (o, n) {
|
|
21131
21342
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
21132
21343
|
if (!m) return o;
|
|
21133
21344
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -21163,7 +21374,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21163
21374
|
];
|
|
21164
21375
|
var allowedAttributionAttributes = __spreadArray$3([
|
|
21165
21376
|
'href'
|
|
21166
|
-
], __read$
|
|
21377
|
+
], __read$8(attributionRuleAttributes));
|
|
21167
21378
|
var AttributionRuleProxy = /** @class */ (function () {
|
|
21168
21379
|
function AttributionRuleProxy(element, attributionChangeCallback) {
|
|
21169
21380
|
var _this = this;
|
|
@@ -21386,7 +21597,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21386
21597
|
};
|
|
21387
21598
|
AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
|
|
21388
21599
|
var _this = this;
|
|
21389
|
-
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$
|
|
21600
|
+
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$8(flat)), __read$8(copyrights)); }, []);
|
|
21390
21601
|
if (copyrights.length == 0) {
|
|
21391
21602
|
// no attribution for a provided tileset/bbox/z
|
|
21392
21603
|
return;
|
|
@@ -21435,7 +21646,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21435
21646
|
return AttributionRuleProxy;
|
|
21436
21647
|
}());
|
|
21437
21648
|
|
|
21438
|
-
var __read$
|
|
21649
|
+
var __read$9 = (window && window.__read) || function (o, n) {
|
|
21439
21650
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
21440
21651
|
if (!m) return o;
|
|
21441
21652
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -21489,7 +21700,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21489
21700
|
var style = map.getStyle();
|
|
21490
21701
|
return Object.entries(style.sources)
|
|
21491
21702
|
.filter(function (_a) {
|
|
21492
|
-
var _b = __read$
|
|
21703
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
21493
21704
|
return style.layers
|
|
21494
21705
|
.filter(function (layer) { return layer && layer['source'] == key; })
|
|
21495
21706
|
.reduce(function (isVisible, layer) {
|
|
@@ -21497,7 +21708,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21497
21708
|
return !isLayerHidden || isVisible;
|
|
21498
21709
|
}, false);
|
|
21499
21710
|
}).map(function (_a) {
|
|
21500
|
-
var _b = __read$
|
|
21711
|
+
var _b = __read$9(_a, 1), key = _b[0];
|
|
21501
21712
|
return map.getSource(key);
|
|
21502
21713
|
});
|
|
21503
21714
|
};
|
|
@@ -21508,8 +21719,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21508
21719
|
resolve(source);
|
|
21509
21720
|
}
|
|
21510
21721
|
else {
|
|
21511
|
-
// force source loading as same resolved source in different style will get cached and won't emit events
|
|
21512
|
-
source.load();
|
|
21513
21722
|
source.on('data', function sourceDataListener(event) {
|
|
21514
21723
|
if (event.sourceDataType == 'metadata') {
|
|
21515
21724
|
source.off('data', sourceDataListener);
|
|
@@ -21572,10 +21781,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21572
21781
|
}, function () { return document.createElement('span'); });
|
|
21573
21782
|
});
|
|
21574
21783
|
var registeredRuleSet = new Set(Object.values(registeredRules));
|
|
21575
|
-
var redundantRules = new Set(__spreadArray$4([], __read$
|
|
21576
|
-
var redundantElements = new Set(__spreadArray$4([], __read$
|
|
21784
|
+
var redundantRules = new Set(__spreadArray$4([], __read$9(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
|
|
21785
|
+
var redundantElements = new Set(__spreadArray$4([], __read$9(redundantRules)).map(function (rule) { return rule.getElement(); }));
|
|
21577
21786
|
// eject redundant rules associated elements altogether
|
|
21578
|
-
__spreadArray$4([], __read$
|
|
21787
|
+
__spreadArray$4([], __read$9(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
|
|
21579
21788
|
.forEach(function (elem) { return elem.parentElement.removeChild(elem); });
|
|
21580
21789
|
_this.rules = Object.values(registeredRules);
|
|
21581
21790
|
var attributionsToApply = attributions
|
|
@@ -21611,7 +21820,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21611
21820
|
var visibleTextNodes = function (elem) {
|
|
21612
21821
|
return Array.from(elem.style.display != 'none' ? elem.children : [])
|
|
21613
21822
|
.map(function (elem) { return visibleTextNodes(elem); })
|
|
21614
|
-
.reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$
|
|
21823
|
+
.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; }));
|
|
21615
21824
|
};
|
|
21616
21825
|
var newRenderContext = _this.virtualContext.cloneNode(true);
|
|
21617
21826
|
var visibleNodes = visibleTextNodes(newRenderContext);
|
|
@@ -21626,7 +21835,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21626
21835
|
// }
|
|
21627
21836
|
// });
|
|
21628
21837
|
// strip all predefined keywords
|
|
21629
|
-
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$
|
|
21838
|
+
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$9(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
|
|
21630
21839
|
// strip year from each node
|
|
21631
21840
|
// visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
|
|
21632
21841
|
// deduplicate attribution text
|
|
@@ -24591,7 +24800,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24591
24800
|
};
|
|
24592
24801
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
24593
24802
|
};
|
|
24594
|
-
var __read$
|
|
24803
|
+
var __read$a = (window && window.__read) || function (o, n) {
|
|
24595
24804
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
24596
24805
|
if (!m) return o;
|
|
24597
24806
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -24789,7 +24998,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24789
24998
|
var callbacks = new Dictionary(this.mapCallbackHandler.getEventCallbacks(eventType, layer));
|
|
24790
24999
|
if (callbacks) {
|
|
24791
25000
|
callbacks.forEach(function (_a, callback) {
|
|
24792
|
-
var _b = __read$
|
|
25001
|
+
var _b = __read$a(_a, 2), _ = _b[0], once = _b[1];
|
|
24793
25002
|
// Invoking a listener this way circumvents the fire once logic in the modified callback.
|
|
24794
25003
|
// So we check if the callback was added as a fire once and if so remove it here.
|
|
24795
25004
|
if (once) {
|
|
@@ -24897,7 +25106,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24897
25106
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
24898
25107
|
callbackDict.forEach(function (_a) {
|
|
24899
25108
|
var e_6, _b;
|
|
24900
|
-
var _c = __read$
|
|
25109
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
24901
25110
|
try {
|
|
24902
25111
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
24903
25112
|
var mbLayerId = _e.value;
|
|
@@ -24930,7 +25139,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
24930
25139
|
eventDict.forEach(function (callbackDict, eventType) {
|
|
24931
25140
|
callbackDict.forEach(function (_a) {
|
|
24932
25141
|
var e_7, _b;
|
|
24933
|
-
var _c = __read$
|
|
25142
|
+
var _c = __read$a(_a, 1), modifiedCallback = _c[0];
|
|
24934
25143
|
try {
|
|
24935
25144
|
for (var _d = __values$a(layer._getLayerIds()), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
24936
25145
|
var mbLayerId = _e.value;
|
|
@@ -25329,7 +25538,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
25329
25538
|
};
|
|
25330
25539
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
25331
25540
|
};
|
|
25332
|
-
var __read$
|
|
25541
|
+
var __read$b = (window && window.__read) || function (o, n) {
|
|
25333
25542
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
25334
25543
|
if (!m) return o;
|
|
25335
25544
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -25781,7 +25990,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
25781
25990
|
// If a specified layer hasn't been added to the map throw an error.
|
|
25782
25991
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
25783
25992
|
if (index > -1) {
|
|
25784
|
-
layerIds.push.apply(layerIds, __spreadArray$5([], __read$
|
|
25993
|
+
layerIds.push.apply(layerIds, __spreadArray$5([], __read$b(this_1.layerIndex[index]._getLayerIds()
|
|
25785
25994
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
25786
25995
|
}
|
|
25787
25996
|
else {
|
|
@@ -26524,7 +26733,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26524
26733
|
};
|
|
26525
26734
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
26526
26735
|
};
|
|
26527
|
-
var __read$
|
|
26736
|
+
var __read$c = (window && window.__read) || function (o, n) {
|
|
26528
26737
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
26529
26738
|
if (!m) return o;
|
|
26530
26739
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -26615,7 +26824,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26615
26824
|
}
|
|
26616
26825
|
finally { if (e_1) throw e_1.error; }
|
|
26617
26826
|
}
|
|
26618
|
-
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$
|
|
26827
|
+
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valuesList)));
|
|
26619
26828
|
};
|
|
26620
26829
|
return CameraBoundsOptions;
|
|
26621
26830
|
}(Options));
|
|
@@ -27088,7 +27297,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27088
27297
|
};
|
|
27089
27298
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
27090
27299
|
};
|
|
27091
|
-
var __read$
|
|
27300
|
+
var __read$d = (window && window.__read) || function (o, n) {
|
|
27092
27301
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27093
27302
|
if (!m) return o;
|
|
27094
27303
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -27263,7 +27472,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27263
27472
|
finally { if (e_1) throw e_1.error; }
|
|
27264
27473
|
}
|
|
27265
27474
|
// Then execute the standard merge behavior.
|
|
27266
|
-
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$
|
|
27475
|
+
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
|
|
27267
27476
|
};
|
|
27268
27477
|
return StyleOptions;
|
|
27269
27478
|
}(Options));
|
|
@@ -27305,7 +27514,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27305
27514
|
};
|
|
27306
27515
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
27307
27516
|
};
|
|
27308
|
-
var __read$
|
|
27517
|
+
var __read$e = (window && window.__read) || function (o, n) {
|
|
27309
27518
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27310
27519
|
if (!m) return o;
|
|
27311
27520
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -27556,10 +27765,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27556
27765
|
// won't change default behavior in Options as usually that's what desired
|
|
27557
27766
|
// instead capture it here and reassign.
|
|
27558
27767
|
var currentTransforms = this._transformers;
|
|
27559
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$
|
|
27768
|
+
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 || [])); }, []) : [];
|
|
27560
27769
|
// Then execute the standard merge behavior.
|
|
27561
27770
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
27562
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$
|
|
27771
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$e(valueList)));
|
|
27563
27772
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
27564
27773
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
27565
27774
|
}
|
|
@@ -27571,7 +27780,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27571
27780
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
27572
27781
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
27573
27782
|
}
|
|
27574
|
-
this._transformers = __spreadArray$8(__spreadArray$8([], __read$
|
|
27783
|
+
this._transformers = __spreadArray$8(__spreadArray$8([], __read$e(currentTransforms || [])), __read$e(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
27575
27784
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
27576
27785
|
this._transformers.push(this.transformRequest);
|
|
27577
27786
|
}
|
|
@@ -27767,7 +27976,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27767
27976
|
};
|
|
27768
27977
|
return __assign$8.apply(this, arguments);
|
|
27769
27978
|
};
|
|
27770
|
-
var __awaiter$
|
|
27979
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27771
27980
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27772
27981
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
27773
27982
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -27776,7 +27985,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27776
27985
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27777
27986
|
});
|
|
27778
27987
|
};
|
|
27779
|
-
var __generator$
|
|
27988
|
+
var __generator$4 = (window && window.__generator) || function (thisArg, body) {
|
|
27780
27989
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
27781
27990
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27782
27991
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -27803,7 +28012,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27803
28012
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
27804
28013
|
}
|
|
27805
28014
|
};
|
|
27806
|
-
var __read$
|
|
28015
|
+
var __read$f = (window && window.__read) || function (o, n) {
|
|
27807
28016
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
27808
28017
|
if (!m) return o;
|
|
27809
28018
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -27870,9 +28079,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27870
28079
|
_this._progressiveLoadingState.mapStyle = currentMapStyle;
|
|
27871
28080
|
// Select deferrable layers
|
|
27872
28081
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
27873
|
-
var _b = __read$
|
|
28082
|
+
var _b = __read$f(_a, 2), groupName = _b[0], layers = _b[1];
|
|
27874
28083
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
27875
|
-
return __spreadArray$9(__spreadArray$9([], __read$
|
|
28084
|
+
return __spreadArray$9(__spreadArray$9([], __read$f(deferred)), __read$f(layers.filter(function (layer) {
|
|
27876
28085
|
var _a;
|
|
27877
28086
|
// Exclude custom layers
|
|
27878
28087
|
if (layer.type === 'custom')
|
|
@@ -27953,9 +28162,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27953
28162
|
|| definitions.configurations[0];
|
|
27954
28163
|
}
|
|
27955
28164
|
};
|
|
27956
|
-
this._lookUpAsync = function (options) { return __awaiter$
|
|
28165
|
+
this._lookUpAsync = function (options) { return __awaiter$4(_this, void 0, void 0, function () {
|
|
27957
28166
|
var definitions, result;
|
|
27958
|
-
return __generator$
|
|
28167
|
+
return __generator$4(this, function (_a) {
|
|
27959
28168
|
switch (_a.label) {
|
|
27960
28169
|
case 0: return [4 /*yield*/, this.definitions()];
|
|
27961
28170
|
case 1:
|
|
@@ -28141,8 +28350,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28141
28350
|
return style.theme.toLowerCase();
|
|
28142
28351
|
};
|
|
28143
28352
|
StyleManager.prototype.getThemeAsync = function (styleOptions) {
|
|
28144
|
-
return __awaiter$
|
|
28145
|
-
return __generator$
|
|
28353
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
28354
|
+
return __generator$4(this, function (_a) {
|
|
28146
28355
|
switch (_a.label) {
|
|
28147
28356
|
case 0: return [4 /*yield*/, this._lookUpAsync(styleOptions)];
|
|
28148
28357
|
case 1: return [2 /*return*/, (_a.sent()).theme];
|
|
@@ -28232,9 +28441,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28232
28441
|
setLayerVisibility(nextLayer, styleOptions.showBuildingModels ? 'visible' : 'none');
|
|
28233
28442
|
}
|
|
28234
28443
|
// Set visibility of traffic layers depending on traffic settings.
|
|
28235
|
-
if (trafficOptions.flow !== 'none' &&
|
|
28236
|
-
layerGroup === "traffic_" + trafficOptions.flow
|
|
28237
|
-
|
|
28444
|
+
if (trafficOptions.flow !== 'none' && nextLayer.type == 'line' &&
|
|
28445
|
+
(layerGroup === "traffic_" + trafficOptions.flow ||
|
|
28446
|
+
// Check if deprecated flow types are used and the layer is a bing-traffic layer.
|
|
28447
|
+
// Needed for backwards compatibility in Bing styles to support deprecated flow types.
|
|
28448
|
+
(['absolute', 'relative-delay'].includes(trafficOptions.flow) && nextLayer['source'] === "bing-traffic"))) {
|
|
28238
28449
|
setLayerVisibility(nextLayer, 'visible');
|
|
28239
28450
|
}
|
|
28240
28451
|
// Set visibility of labels
|
|
@@ -28263,7 +28474,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28263
28474
|
// A FundamentalMapLayer (grouped layer) representation of the next style must be built.
|
|
28264
28475
|
var previousLayers = this.map.layers.getLayers();
|
|
28265
28476
|
var nextLayers = Object.entries(layerGroupLayers).map(function (_a) {
|
|
28266
|
-
var _b = __read$
|
|
28477
|
+
var _b = __read$f(_a, 2), layerGroupName = _b[0], layerGroupMapboxLayers = _b[1];
|
|
28267
28478
|
return _this._buildFundamentalLayerFrom(layerGroupMapboxLayers, layerGroupName);
|
|
28268
28479
|
});
|
|
28269
28480
|
// Update FundamentalMapLayers in LayerManager
|
|
@@ -28362,10 +28573,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28362
28573
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
28363
28574
|
var _a, _b;
|
|
28364
28575
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
28365
|
-
return __awaiter$
|
|
28576
|
+
return __awaiter$4(this, void 0, void 0, function () {
|
|
28366
28577
|
var requestParams, fetchOptions;
|
|
28367
28578
|
var _c;
|
|
28368
|
-
return __generator$
|
|
28579
|
+
return __generator$4(this, function (_d) {
|
|
28369
28580
|
switch (_d.label) {
|
|
28370
28581
|
case 0:
|
|
28371
28582
|
requestParams = {
|
|
@@ -28428,6 +28639,123 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28428
28639
|
*/
|
|
28429
28640
|
var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
|
|
28430
28641
|
|
|
28642
|
+
var __values$j = (window && window.__values) || function(o) {
|
|
28643
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
28644
|
+
if (m) return m.call(o);
|
|
28645
|
+
if (o && typeof o.length === "number") return {
|
|
28646
|
+
next: function () {
|
|
28647
|
+
if (o && i >= o.length) o = void 0;
|
|
28648
|
+
return { value: o && o[i++], done: !o };
|
|
28649
|
+
}
|
|
28650
|
+
};
|
|
28651
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
28652
|
+
};
|
|
28653
|
+
/**
|
|
28654
|
+
* @internal
|
|
28655
|
+
* A manager for the map control's hidden indicators.
|
|
28656
|
+
* Exposed through the `indicators` property of the `atlas.Map` class.
|
|
28657
|
+
* Cannot be instantiated by the user.
|
|
28658
|
+
*/
|
|
28659
|
+
var AccessibleIndicatorManager = /** @class */ (function () {
|
|
28660
|
+
/**
|
|
28661
|
+
* Constructs the indicator manager to be exposed only through the `indicators` property of the `Map` class.
|
|
28662
|
+
* @param map The map whose indicators are being managed by this.
|
|
28663
|
+
* @internal
|
|
28664
|
+
*/
|
|
28665
|
+
function AccessibleIndicatorManager(map) {
|
|
28666
|
+
this.map = map;
|
|
28667
|
+
this.indicators = new Set();
|
|
28668
|
+
}
|
|
28669
|
+
/**
|
|
28670
|
+
* Adds an indicator to the map
|
|
28671
|
+
* @param indicator The indicator(s) to add.
|
|
28672
|
+
*/
|
|
28673
|
+
AccessibleIndicatorManager.prototype.add = function (indicator) {
|
|
28674
|
+
var e_1, _a;
|
|
28675
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
28676
|
+
try {
|
|
28677
|
+
for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
|
|
28678
|
+
var i = indicator_1_1.value;
|
|
28679
|
+
if (!this.indicators.has(i)) {
|
|
28680
|
+
this.indicators.add(i);
|
|
28681
|
+
i.attach(this.map);
|
|
28682
|
+
}
|
|
28683
|
+
}
|
|
28684
|
+
}
|
|
28685
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
28686
|
+
finally {
|
|
28687
|
+
try {
|
|
28688
|
+
if (indicator_1_1 && !indicator_1_1.done && (_a = indicator_1.return)) _a.call(indicator_1);
|
|
28689
|
+
}
|
|
28690
|
+
finally { if (e_1) throw e_1.error; }
|
|
28691
|
+
}
|
|
28692
|
+
};
|
|
28693
|
+
/**
|
|
28694
|
+
* Removes all indicators from the map.
|
|
28695
|
+
*/
|
|
28696
|
+
AccessibleIndicatorManager.prototype.clear = function () {
|
|
28697
|
+
var _this = this;
|
|
28698
|
+
this.indicators.forEach(function (indicator) {
|
|
28699
|
+
_this.indicators.delete(indicator);
|
|
28700
|
+
indicator.remove();
|
|
28701
|
+
});
|
|
28702
|
+
};
|
|
28703
|
+
/**
|
|
28704
|
+
* Removes an indicator from the map
|
|
28705
|
+
* @param indicator The indicator(s) to remove.
|
|
28706
|
+
*/
|
|
28707
|
+
AccessibleIndicatorManager.prototype.remove = function (indicator) {
|
|
28708
|
+
var e_2, _a;
|
|
28709
|
+
indicator = Array.isArray(indicator) ? indicator : [indicator];
|
|
28710
|
+
try {
|
|
28711
|
+
for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
|
|
28712
|
+
var i = indicator_2_1.value;
|
|
28713
|
+
if (this.indicators.has(i)) {
|
|
28714
|
+
this.indicators.delete(i);
|
|
28715
|
+
i.remove();
|
|
28716
|
+
}
|
|
28717
|
+
}
|
|
28718
|
+
}
|
|
28719
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
28720
|
+
finally {
|
|
28721
|
+
try {
|
|
28722
|
+
if (indicator_2_1 && !indicator_2_1.done && (_a = indicator_2.return)) _a.call(indicator_2);
|
|
28723
|
+
}
|
|
28724
|
+
finally { if (e_2) throw e_2.error; }
|
|
28725
|
+
}
|
|
28726
|
+
};
|
|
28727
|
+
/**
|
|
28728
|
+
* Returns the indicators currently attached to the map.
|
|
28729
|
+
*/
|
|
28730
|
+
AccessibleIndicatorManager.prototype.getIndicators = function () {
|
|
28731
|
+
return Array.from(this.indicators);
|
|
28732
|
+
};
|
|
28733
|
+
/**
|
|
28734
|
+
* Returns the div element that should contain all the indicator containers.
|
|
28735
|
+
* Creates it if it doesn't already exist.
|
|
28736
|
+
* @internal
|
|
28737
|
+
*/
|
|
28738
|
+
AccessibleIndicatorManager.prototype._getCollectionDiv = function () {
|
|
28739
|
+
var collection = this.map.getMapContainer()
|
|
28740
|
+
.querySelector("." + AccessibleIndicatorManager.Css.collection);
|
|
28741
|
+
if (!collection) {
|
|
28742
|
+
// If the collection div doesn't exist create it.
|
|
28743
|
+
collection = document.createElement("div");
|
|
28744
|
+
collection.setAttribute("aria-label", "map data");
|
|
28745
|
+
// Set the container role to listbox, and the descents' role to option, so the reader will read the listbox as a list.
|
|
28746
|
+
// For example, NVDA will read "data point, 1 of 1" when the indicator is focused.
|
|
28747
|
+
collection.setAttribute("role", "listbox");
|
|
28748
|
+
collection.classList.add(AccessibleIndicatorManager.Css.collection);
|
|
28749
|
+
this.map.getMapContainer().appendChild(collection);
|
|
28750
|
+
}
|
|
28751
|
+
return collection;
|
|
28752
|
+
};
|
|
28753
|
+
AccessibleIndicatorManager.Css = {
|
|
28754
|
+
collection: "accessible-indicator-collection-container"
|
|
28755
|
+
};
|
|
28756
|
+
return AccessibleIndicatorManager;
|
|
28757
|
+
}());
|
|
28758
|
+
|
|
28431
28759
|
var __extends$19 = (window && window.__extends) || (function () {
|
|
28432
28760
|
var extendStatics = function (d, b) {
|
|
28433
28761
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -28454,7 +28782,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28454
28782
|
};
|
|
28455
28783
|
return __assign$9.apply(this, arguments);
|
|
28456
28784
|
};
|
|
28457
|
-
var __awaiter$
|
|
28785
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
28458
28786
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28459
28787
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28460
28788
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
@@ -28463,7 +28791,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28463
28791
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28464
28792
|
});
|
|
28465
28793
|
};
|
|
28466
|
-
var __generator$
|
|
28794
|
+
var __generator$5 = (window && window.__generator) || function (thisArg, body) {
|
|
28467
28795
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28468
28796
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28469
28797
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
@@ -28490,7 +28818,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28490
28818
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
28491
28819
|
}
|
|
28492
28820
|
};
|
|
28493
|
-
var __read$
|
|
28821
|
+
var __read$g = (window && window.__read) || function (o, n) {
|
|
28494
28822
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
28495
28823
|
if (!m) return o;
|
|
28496
28824
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -28511,7 +28839,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28511
28839
|
to[j] = from[i];
|
|
28512
28840
|
return to;
|
|
28513
28841
|
};
|
|
28514
|
-
var __values$
|
|
28842
|
+
var __values$k = (window && window.__values) || function(o) {
|
|
28515
28843
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
28516
28844
|
if (m) return m.call(o);
|
|
28517
28845
|
if (o && typeof o.length === "number") return {
|
|
@@ -28621,6 +28949,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28621
28949
|
_this.markers = new HtmlMarkerManager(_this);
|
|
28622
28950
|
_this.sources = new SourceManager(_this);
|
|
28623
28951
|
_this.popups = new PopupManager(_this);
|
|
28952
|
+
_this.indicators = new AccessibleIndicatorManager(_this);
|
|
28624
28953
|
// Add CSS classes and set attributes for DOM elements.
|
|
28625
28954
|
_this.map.getContainer().classList.add(Map.Css.container);
|
|
28626
28955
|
_this.map.getCanvasContainer().classList.add(Map.Css.canvasContainer);
|
|
@@ -28632,9 +28961,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28632
28961
|
showLogo: _this.styleOptions.showLogo,
|
|
28633
28962
|
customAttribution: _this.styleOptions.customAttribution
|
|
28634
28963
|
});
|
|
28635
|
-
_this.controls.add(_this.copyrightControl, {
|
|
28636
|
-
position: exports.ControlPosition.NonFixed
|
|
28637
|
-
});
|
|
28638
28964
|
// Initialize state of map
|
|
28639
28965
|
// --> Initialize the authentication manager
|
|
28640
28966
|
var authManInit = _this.authentication ?
|
|
@@ -28661,14 +28987,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28661
28987
|
_this._setAutoResize(_this.styleOptions.autoResize);
|
|
28662
28988
|
_this.map.showTileBoundaries = _this.styleOptions.showTileBoundaries;
|
|
28663
28989
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
28664
|
-
|
|
28665
|
-
|
|
28666
|
-
|
|
28990
|
+
authManInit
|
|
28991
|
+
.then(function () { return _this.styles.initStyleset(); })
|
|
28992
|
+
.then(function (definitions) {
|
|
28667
28993
|
// Check that the map hasn't been removed for any reason.
|
|
28668
28994
|
// If so no need to finish styling the map.
|
|
28669
28995
|
if (_this.removed) {
|
|
28670
28996
|
return;
|
|
28671
28997
|
}
|
|
28998
|
+
// Add controls after initStyleset to prevent redundant initStyleset calls
|
|
28999
|
+
_this.controls.add(_this.copyrightControl, {
|
|
29000
|
+
position: exports.ControlPosition.NonFixed
|
|
29001
|
+
});
|
|
28672
29002
|
if (_this.authentication && !_this.authentication.getToken()) {
|
|
28673
29003
|
throw new Error("AuthenticationManager finished initializing, but no token is available");
|
|
28674
29004
|
}
|
|
@@ -28764,6 +29094,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28764
29094
|
else {
|
|
28765
29095
|
this.accessibleMapDelegate.removeFromMap();
|
|
28766
29096
|
}
|
|
29097
|
+
if (this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration) {
|
|
29098
|
+
this.styles.initPromise = null;
|
|
29099
|
+
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
29100
|
+
this.setStyle({});
|
|
29101
|
+
}
|
|
28767
29102
|
};
|
|
28768
29103
|
/**
|
|
28769
29104
|
* Adds request transformer
|
|
@@ -29313,7 +29648,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29313
29648
|
urls = layer.getOptions().subdomains || [];
|
|
29314
29649
|
}
|
|
29315
29650
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
29316
|
-
urls.push.apply(urls, __spreadArray$a([], __read$
|
|
29651
|
+
urls.push.apply(urls, __spreadArray$a([], __read$g(tileSources)));
|
|
29317
29652
|
layer._setOptionsNoUpdate({
|
|
29318
29653
|
subdomains: urls
|
|
29319
29654
|
});
|
|
@@ -29335,7 +29670,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29335
29670
|
Map.prototype.removeLayers = function (layerNames) {
|
|
29336
29671
|
var e_1, _a;
|
|
29337
29672
|
try {
|
|
29338
|
-
for (var layerNames_1 = __values$
|
|
29673
|
+
for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
|
|
29339
29674
|
var layerName = layerNames_1_1.value;
|
|
29340
29675
|
// Previously calling removeLayers for layers that didn't exist in the map just did nothing.
|
|
29341
29676
|
// Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
|
|
@@ -29477,6 +29812,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29477
29812
|
this.layers.clear();
|
|
29478
29813
|
this.sources.clear();
|
|
29479
29814
|
this.markers.clear();
|
|
29815
|
+
this.indicators.clear();
|
|
29480
29816
|
};
|
|
29481
29817
|
/**
|
|
29482
29818
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
@@ -29529,7 +29865,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29529
29865
|
var e_2, _a;
|
|
29530
29866
|
var positions = [];
|
|
29531
29867
|
try {
|
|
29532
|
-
for (var pixels_1 = __values$
|
|
29868
|
+
for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
|
|
29533
29869
|
var pixel = pixels_1_1.value;
|
|
29534
29870
|
var lngLat = this.map.unproject(pixel);
|
|
29535
29871
|
positions.push(new Position(lngLat.lng, lngLat.lat));
|
|
@@ -29552,7 +29888,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29552
29888
|
var e_3, _a;
|
|
29553
29889
|
var pixels = [];
|
|
29554
29890
|
try {
|
|
29555
|
-
for (var positions_1 = __values$
|
|
29891
|
+
for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
|
|
29556
29892
|
var position = positions_1_1.value;
|
|
29557
29893
|
var point = this.map.project(position);
|
|
29558
29894
|
pixels.push(new Pixel(point.x, point.y));
|
|
@@ -29600,8 +29936,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29600
29936
|
*/
|
|
29601
29937
|
Map.prototype._rebuildStyle = function (diff) {
|
|
29602
29938
|
if (diff === void 0) { diff = true; }
|
|
29603
|
-
return __awaiter$
|
|
29604
|
-
return __generator$
|
|
29939
|
+
return __awaiter$5(this, void 0, void 0, function () {
|
|
29940
|
+
return __generator$5(this, function (_a) {
|
|
29605
29941
|
this.styles.setStyle(this.styleOptions, diff);
|
|
29606
29942
|
this.imageSprite._restoreImages();
|
|
29607
29943
|
return [2 /*return*/];
|
|
@@ -29817,7 +30153,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29817
30153
|
return Map;
|
|
29818
30154
|
}(EventEmitter));
|
|
29819
30155
|
|
|
29820
|
-
var __read$
|
|
30156
|
+
var __read$h = (window && window.__read) || function (o, n) {
|
|
29821
30157
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
29822
30158
|
if (!m) return o;
|
|
29823
30159
|
var i = m.call(o), r, ar = [], e;
|
|
@@ -29979,7 +30315,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29979
30315
|
lineLength = 50;
|
|
29980
30316
|
}
|
|
29981
30317
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
29982
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$
|
|
30318
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$h((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
29983
30319
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
29984
30320
|
if (w < width) {
|
|
29985
30321
|
width = w;
|