azure-maps-control 2.2.3 → 2.2.4
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 +65 -47
- package/dist/atlas-core-bare.js +220 -73
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +65 -47
- package/dist/atlas-core.js +220 -73
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.css +4 -28
- package/dist/atlas.js +220 -73
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +4 -0
package/dist/atlas-core-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.4";
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -306,27 +306,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
306
306
|
var tooltipContent = document.createElement("span");
|
|
307
307
|
tooltipContent.innerText = name;
|
|
308
308
|
tooltipContent.classList.add('tooltiptext');
|
|
309
|
-
// mimics default edge tooltip theming
|
|
310
|
-
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
311
|
-
tooltipContent.classList.add('dark');
|
|
312
|
-
}
|
|
313
|
-
var themeQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
314
|
-
var onThemeChange = function (e) {
|
|
315
|
-
var isDark = e.matches;
|
|
316
|
-
if (isDark && !tooltipContent.classList.contains('dark')) {
|
|
317
|
-
tooltipContent.classList.add('dark');
|
|
318
|
-
}
|
|
319
|
-
else if (!isDark && tooltipContent.classList.contains('dark')) {
|
|
320
|
-
tooltipContent.classList.remove('dark');
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
// compensate for browsers where MediaQueryList is not derived from EventTarget (pre iOS13 Safari)
|
|
324
|
-
if (typeof themeQuery.addEventListener === 'function') {
|
|
325
|
-
themeQuery.addEventListener('change', function (e) { return onThemeChange(e); });
|
|
326
|
-
}
|
|
327
|
-
else if (typeof themeQuery.addListener === 'function') {
|
|
328
|
-
themeQuery.addListener(function (e) { return onThemeChange(e); });
|
|
329
|
-
}
|
|
330
309
|
if (navigator.userAgent.indexOf('Edg') != -1) {
|
|
331
310
|
tooltipContent.classList.add('edge');
|
|
332
311
|
}
|
|
@@ -4514,6 +4493,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
4514
4493
|
}
|
|
4515
4494
|
});
|
|
4516
4495
|
container.addEventListener("focusout", function (event) {
|
|
4496
|
+
if (event.target === currStyleButton) {
|
|
4497
|
+
// on focusout from reveal button -> reset the tabIndex on the styleOpsGrid elements that could have been set to -1 on esc key press
|
|
4498
|
+
Array.from(styleOpsGrid.children).forEach(function (e) { return e.removeAttribute('tabIndex'); });
|
|
4499
|
+
}
|
|
4517
4500
|
if (!(event.relatedTarget instanceof Node && container.contains(event.relatedTarget))) {
|
|
4518
4501
|
_this.hasFocus = false;
|
|
4519
4502
|
if (!_this.hasMouse) {
|
|
@@ -4528,6 +4511,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
4528
4511
|
if (event.keyCode === 27) {
|
|
4529
4512
|
event.stopPropagation();
|
|
4530
4513
|
currStyleButton.focus();
|
|
4514
|
+
Array.from(styleOpsGrid.children).forEach(function (e) { return e.setAttribute('tabIndex', "-1"); });
|
|
4531
4515
|
if (container.classList.contains(StyleControl.Css.inUse)) {
|
|
4532
4516
|
container.classList.remove(StyleControl.Css.inUse);
|
|
4533
4517
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
@@ -16109,11 +16093,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16109
16093
|
// Translations for oceans: https://en.wikipedia.org/wiki/List_of_alternative_names_for_oceans
|
|
16110
16094
|
this._preloadedCache.add(lang);
|
|
16111
16095
|
var oceanConfig = {
|
|
16112
|
-
source: [
|
|
16096
|
+
source: [],
|
|
16113
16097
|
labelType: "water",
|
|
16114
16098
|
minZoom: 0,
|
|
16115
16099
|
radius: 3950000,
|
|
16116
|
-
polygonSources: [
|
|
16100
|
+
polygonSources: [] // doesn't affect the cache key
|
|
16117
16101
|
};
|
|
16118
16102
|
var shortLang = lang;
|
|
16119
16103
|
var index = shortLang.indexOf("-");
|
|
@@ -16209,6 +16193,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16209
16193
|
}
|
|
16210
16194
|
return ar;
|
|
16211
16195
|
};
|
|
16196
|
+
var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
|
|
16197
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
16198
|
+
to[j] = from[i];
|
|
16199
|
+
return to;
|
|
16200
|
+
};
|
|
16212
16201
|
/**
|
|
16213
16202
|
* This class analyizes the current view of a map and provides a description for use by accessibilty tools.
|
|
16214
16203
|
* TODO: Use services when in GeoPol regions. (Kasmir) or when user region sensitive.
|
|
@@ -16267,7 +16256,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16267
16256
|
* Vector Tile source layers: https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile
|
|
16268
16257
|
*/
|
|
16269
16258
|
// Configuration for label extraction.
|
|
16270
|
-
this.
|
|
16259
|
+
this._labelConfig = [
|
|
16271
16260
|
// Water labels
|
|
16272
16261
|
{
|
|
16273
16262
|
source: ["Ocean label", "Ocean name"],
|
|
@@ -16401,10 +16390,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16401
16390
|
polygonSources: ["Reservation"]
|
|
16402
16391
|
}
|
|
16403
16392
|
];
|
|
16404
|
-
// Name of all polygon layers in which we want to do an intersection test with.
|
|
16405
|
-
this._polygonStyleLayer = ["National or state park", "National park", "Reservation", "Airport",
|
|
16406
|
-
"Runway", "Stadium", "University", "Zoo", "Shopping", "Hospital", "Amusement park", "Ocean", "Sea",
|
|
16407
|
-
"Ocean or sea"];
|
|
16408
16393
|
// Name of all label types to cache.
|
|
16409
16394
|
this._labelCache = new Set(["city", "state", "country", "water", "majorPoi"]);
|
|
16410
16395
|
// Name of all road source layers.
|
|
@@ -16668,6 +16653,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16668
16653
|
_this._updateCam(true);
|
|
16669
16654
|
// Find the id of the vector tile source being used.
|
|
16670
16655
|
_this._baseVectorTileSourceId = MapViewDescriptor._baseVectorTileSourceIds.find(function (id) { return _this._map.sources.getById(id); });
|
|
16656
|
+
// Set the label config based on the vector tile source.
|
|
16657
|
+
if (_this._baseVectorTileSourceId === "bing-mvt") {
|
|
16658
|
+
_this._labelConfig = MapViewDescriptor._labelConfigBing;
|
|
16659
|
+
_this._roadLayers = MapViewDescriptor._roadLayersBing;
|
|
16660
|
+
}
|
|
16661
|
+
// Derive polygon layers from the label config.
|
|
16662
|
+
_this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
|
|
16663
|
+
if (cur.polygonSources) {
|
|
16664
|
+
acc.push.apply(acc, __spreadArray$2([], __read$6(cur.polygonSources)));
|
|
16665
|
+
}
|
|
16666
|
+
return acc;
|
|
16667
|
+
}, []);
|
|
16671
16668
|
// Add event listeners directly to mapbox because we will be using custom event data.
|
|
16672
16669
|
// We don't automatically forward all properties of a mapbox event, so the custom data would be lost.
|
|
16673
16670
|
var baseMap = _this._map._getMap();
|
|
@@ -16777,8 +16774,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16777
16774
|
}
|
|
16778
16775
|
intersectingType_1 = null;
|
|
16779
16776
|
// Loop through each label config and try and retireve details about the map view.
|
|
16780
|
-
for (i = 0, cnt = this.
|
|
16781
|
-
layerInfo = this.
|
|
16777
|
+
for (i = 0, cnt = this._labelConfig.length; i < cnt; i++) {
|
|
16778
|
+
layerInfo = this._labelConfig[i];
|
|
16782
16779
|
if (cam.zoom >= layerInfo.minZoom) {
|
|
16783
16780
|
// If the layer info has polygons defined, do an intersection test for matching.
|
|
16784
16781
|
if (layerInfo.polygonSources) {
|
|
@@ -16878,7 +16875,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16878
16875
|
// Loop through the label sources.
|
|
16879
16876
|
for (var i = 0, len = layerInfo.source.length; i < len; i++) {
|
|
16880
16877
|
var params = {
|
|
16881
|
-
sourceLayer: layerInfo.source[i]
|
|
16878
|
+
sourceLayer: layerInfo.source[i],
|
|
16879
|
+
filter: ["has", "name"]
|
|
16882
16880
|
};
|
|
16883
16881
|
var labels = this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId, params);
|
|
16884
16882
|
var closest = null;
|
|
@@ -16955,21 +16953,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16955
16953
|
}
|
|
16956
16954
|
if (closestRoad) {
|
|
16957
16955
|
// Capture state and country codes from the closest road to ensure we have the most accurate values.
|
|
16958
|
-
|
|
16956
|
+
// Note: bing tiles do not have country_code and country_subdivision in road features.
|
|
16957
|
+
if (!info.country && closestRoad.properties.country_code) {
|
|
16959
16958
|
info.country = closestRoad.properties.country_code;
|
|
16960
16959
|
info.countryDis = 0;
|
|
16961
16960
|
MapViewDescriptor._labelCache.cache(info.country, {
|
|
16962
|
-
source: [
|
|
16961
|
+
source: [],
|
|
16963
16962
|
labelType: "country",
|
|
16964
16963
|
radius: 5000,
|
|
16965
16964
|
minZoom: 0
|
|
16966
16965
|
}, cPoint.geometry.coordinates, lang);
|
|
16967
16966
|
}
|
|
16968
|
-
if (!info.state) {
|
|
16967
|
+
if (!info.state && closestRoad.properties.country_subdivision) {
|
|
16969
16968
|
info.state = closestRoad.properties.country_subdivision;
|
|
16970
16969
|
info.stateDis = 0;
|
|
16971
16970
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
16972
|
-
source: [
|
|
16971
|
+
source: [],
|
|
16973
16972
|
labelType: "state",
|
|
16974
16973
|
radius: 5000,
|
|
16975
16974
|
minZoom: 4
|
|
@@ -17224,7 +17223,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17224
17223
|
if (a.country) {
|
|
17225
17224
|
info.country = a.country;
|
|
17226
17225
|
MapViewDescriptor._labelCache.cache(info.country, {
|
|
17227
|
-
source: [
|
|
17226
|
+
source: [],
|
|
17228
17227
|
labelType: "country",
|
|
17229
17228
|
radius: 5000,
|
|
17230
17229
|
minZoom: 0
|
|
@@ -17233,7 +17232,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17233
17232
|
if (a.countrySubdivision) {
|
|
17234
17233
|
info.state = a.countrySubdivision;
|
|
17235
17234
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
17236
|
-
source: [
|
|
17235
|
+
source: [],
|
|
17237
17236
|
labelType: "state",
|
|
17238
17237
|
radius: 5000,
|
|
17239
17238
|
minZoom: 4
|
|
@@ -17242,7 +17241,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17242
17241
|
if (a.municipality) {
|
|
17243
17242
|
info.city = a.municipality;
|
|
17244
17243
|
MapViewDescriptor._labelCache.cache(info.state, {
|
|
17245
|
-
source: [
|
|
17244
|
+
source: [],
|
|
17246
17245
|
labelType: "city",
|
|
17247
17246
|
radius: 1000,
|
|
17248
17247
|
minZoom: 10
|
|
@@ -17277,6 +17276,116 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17277
17276
|
};
|
|
17278
17277
|
// Ids of vector tile sources for different style APIs.
|
|
17279
17278
|
MapViewDescriptor._baseVectorTileSourceIds = ["microsoft.base", "vectorTiles", "bing-mvt"];
|
|
17279
|
+
// Configuration for label extraction of Bing tiles.
|
|
17280
|
+
MapViewDescriptor._labelConfigBing = [
|
|
17281
|
+
// Water labels
|
|
17282
|
+
{
|
|
17283
|
+
source: ["water_feature"],
|
|
17284
|
+
labelType: "water",
|
|
17285
|
+
minZoom: 0,
|
|
17286
|
+
radius: 3950000,
|
|
17287
|
+
polygonSources: ["generic_water_fill"]
|
|
17288
|
+
},
|
|
17289
|
+
{
|
|
17290
|
+
source: ["water_feature"],
|
|
17291
|
+
labelType: "water",
|
|
17292
|
+
minZoom: 3,
|
|
17293
|
+
radius: 1000000,
|
|
17294
|
+
polygonSources: ["generic_water_fill"]
|
|
17295
|
+
},
|
|
17296
|
+
// Country labels
|
|
17297
|
+
{
|
|
17298
|
+
source: ["country_region"],
|
|
17299
|
+
labelType: "country",
|
|
17300
|
+
minZoom: 0,
|
|
17301
|
+
maxZoom: 5,
|
|
17302
|
+
radius: 300000
|
|
17303
|
+
},
|
|
17304
|
+
// State labels
|
|
17305
|
+
{
|
|
17306
|
+
source: ["admin_division1"],
|
|
17307
|
+
labelType: "state",
|
|
17308
|
+
minZoom: 4,
|
|
17309
|
+
maxZoom: 7,
|
|
17310
|
+
radius: 300000
|
|
17311
|
+
},
|
|
17312
|
+
// City labels
|
|
17313
|
+
{
|
|
17314
|
+
source: ["populated_place"],
|
|
17315
|
+
labelType: "city",
|
|
17316
|
+
minZoom: 8,
|
|
17317
|
+
radius: 40000
|
|
17318
|
+
},
|
|
17319
|
+
// Neighbourhood labels
|
|
17320
|
+
{
|
|
17321
|
+
source: ["neighborhood"],
|
|
17322
|
+
labelType: "neighbourhood",
|
|
17323
|
+
minZoom: 12,
|
|
17324
|
+
radius: 6000
|
|
17325
|
+
},
|
|
17326
|
+
// POI labels
|
|
17327
|
+
{
|
|
17328
|
+
source: ["amusement_park"],
|
|
17329
|
+
labelType: "poi",
|
|
17330
|
+
minZoom: 14,
|
|
17331
|
+
radius: 2000,
|
|
17332
|
+
polygonSources: ["amusement_park_fill"]
|
|
17333
|
+
},
|
|
17334
|
+
{
|
|
17335
|
+
source: ["hospital"],
|
|
17336
|
+
labelType: "poi",
|
|
17337
|
+
minZoom: 14,
|
|
17338
|
+
radius: 1000,
|
|
17339
|
+
polygonSources: ["hospital_fill"]
|
|
17340
|
+
},
|
|
17341
|
+
{
|
|
17342
|
+
source: ["shopping_center"],
|
|
17343
|
+
labelType: "poi",
|
|
17344
|
+
minZoom: 14,
|
|
17345
|
+
radius: 1000,
|
|
17346
|
+
polygonSources: ["shopping_center_fill"]
|
|
17347
|
+
},
|
|
17348
|
+
{
|
|
17349
|
+
source: ["stadium"],
|
|
17350
|
+
labelType: "poi",
|
|
17351
|
+
minZoom: 14,
|
|
17352
|
+
radius: 1000,
|
|
17353
|
+
polygonSources: ["stadium_fill"]
|
|
17354
|
+
},
|
|
17355
|
+
{
|
|
17356
|
+
source: ["higher_education_facility", "school"],
|
|
17357
|
+
labelType: "poi",
|
|
17358
|
+
minZoom: 14,
|
|
17359
|
+
radius: 1000,
|
|
17360
|
+
polygonSources: ["higher_education_facility_fill", "school_fill"]
|
|
17361
|
+
},
|
|
17362
|
+
{
|
|
17363
|
+
source: ["zoo"],
|
|
17364
|
+
labelType: "poi",
|
|
17365
|
+
minZoom: 14,
|
|
17366
|
+
radius: 1000,
|
|
17367
|
+
polygonSources: ["zoo_fill"]
|
|
17368
|
+
},
|
|
17369
|
+
// Major Poi labels
|
|
17370
|
+
{
|
|
17371
|
+
source: ["airport", "airport_terminal"],
|
|
17372
|
+
labelType: "majorPoi",
|
|
17373
|
+
minZoom: 11,
|
|
17374
|
+
radius: 3000,
|
|
17375
|
+
polygonSources: ["airport_terminal_fill", "airport_fill-merged7", "airport_runway_fill"]
|
|
17376
|
+
},
|
|
17377
|
+
{
|
|
17378
|
+
source: ["reserve"],
|
|
17379
|
+
labelType: "majorPoi",
|
|
17380
|
+
minZoom: 7,
|
|
17381
|
+
radius: 15000,
|
|
17382
|
+
polygonSources: ["generic_reserve_fill", "land_cover_forest_fill"]
|
|
17383
|
+
}
|
|
17384
|
+
];
|
|
17385
|
+
// Name of all road source layers of Bing tiles.
|
|
17386
|
+
MapViewDescriptor._roadLayersBing = new Set([
|
|
17387
|
+
"road"
|
|
17388
|
+
]);
|
|
17280
17389
|
return MapViewDescriptor;
|
|
17281
17390
|
}());
|
|
17282
17391
|
|
|
@@ -21034,7 +21143,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21034
21143
|
}
|
|
21035
21144
|
return ar;
|
|
21036
21145
|
};
|
|
21037
|
-
var __spreadArray$
|
|
21146
|
+
var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
|
|
21038
21147
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
21039
21148
|
to[j] = from[i];
|
|
21040
21149
|
return to;
|
|
@@ -21052,7 +21161,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21052
21161
|
'data-azure-maps-attribution-order',
|
|
21053
21162
|
'data-azure-maps-attribution-dynamic'
|
|
21054
21163
|
];
|
|
21055
|
-
var allowedAttributionAttributes = __spreadArray$
|
|
21164
|
+
var allowedAttributionAttributes = __spreadArray$3([
|
|
21056
21165
|
'href'
|
|
21057
21166
|
], __read$7(attributionRuleAttributes));
|
|
21058
21167
|
var AttributionRuleProxy = /** @class */ (function () {
|
|
@@ -21277,7 +21386,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21277
21386
|
};
|
|
21278
21387
|
AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
|
|
21279
21388
|
var _this = this;
|
|
21280
|
-
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$
|
|
21389
|
+
var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$7(flat)), __read$7(copyrights)); }, []);
|
|
21281
21390
|
if (copyrights.length == 0) {
|
|
21282
21391
|
// no attribution for a provided tileset/bbox/z
|
|
21283
21392
|
return;
|
|
@@ -21342,7 +21451,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21342
21451
|
}
|
|
21343
21452
|
return ar;
|
|
21344
21453
|
};
|
|
21345
|
-
var __spreadArray$
|
|
21454
|
+
var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
|
|
21346
21455
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
21347
21456
|
to[j] = from[i];
|
|
21348
21457
|
return to;
|
|
@@ -21463,10 +21572,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21463
21572
|
}, function () { return document.createElement('span'); });
|
|
21464
21573
|
});
|
|
21465
21574
|
var registeredRuleSet = new Set(Object.values(registeredRules));
|
|
21466
|
-
var redundantRules = new Set(__spreadArray$
|
|
21467
|
-
var redundantElements = new Set(__spreadArray$
|
|
21575
|
+
var redundantRules = new Set(__spreadArray$4([], __read$8(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
|
|
21576
|
+
var redundantElements = new Set(__spreadArray$4([], __read$8(redundantRules)).map(function (rule) { return rule.getElement(); }));
|
|
21468
21577
|
// eject redundant rules associated elements altogether
|
|
21469
|
-
__spreadArray$
|
|
21578
|
+
__spreadArray$4([], __read$8(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
|
|
21470
21579
|
.forEach(function (elem) { return elem.parentElement.removeChild(elem); });
|
|
21471
21580
|
_this.rules = Object.values(registeredRules);
|
|
21472
21581
|
var attributionsToApply = attributions
|
|
@@ -21502,7 +21611,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21502
21611
|
var visibleTextNodes = function (elem) {
|
|
21503
21612
|
return Array.from(elem.style.display != 'none' ? elem.children : [])
|
|
21504
21613
|
.map(function (elem) { return visibleTextNodes(elem); })
|
|
21505
|
-
.reduce(function (flattened, nodes) { return __spreadArray$
|
|
21614
|
+
.reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$8(flattened)), __read$8(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
|
|
21506
21615
|
};
|
|
21507
21616
|
var newRenderContext = _this.virtualContext.cloneNode(true);
|
|
21508
21617
|
var visibleNodes = visibleTextNodes(newRenderContext);
|
|
@@ -21517,7 +21626,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21517
21626
|
// }
|
|
21518
21627
|
// });
|
|
21519
21628
|
// strip all predefined keywords
|
|
21520
|
-
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$
|
|
21629
|
+
visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$8(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
|
|
21521
21630
|
// strip year from each node
|
|
21522
21631
|
// visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
|
|
21523
21632
|
// deduplicate attribution text
|
|
@@ -23743,6 +23852,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
23743
23852
|
}
|
|
23744
23853
|
return this.initPromise;
|
|
23745
23854
|
};
|
|
23855
|
+
/**
|
|
23856
|
+
* Cleans up any resources used by the authentication manager.
|
|
23857
|
+
*/
|
|
23858
|
+
AuthenticationManager.prototype.dispose = function () {
|
|
23859
|
+
if (this.tokenTimeOutHandle) {
|
|
23860
|
+
clearTimeout(this.tokenTimeOutHandle);
|
|
23861
|
+
this.tokenTimeOutHandle = null;
|
|
23862
|
+
}
|
|
23863
|
+
};
|
|
23746
23864
|
/**
|
|
23747
23865
|
* Gets the default auth context to be shared between maps without one specified to them.
|
|
23748
23866
|
*/
|
|
@@ -25227,7 +25345,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
25227
25345
|
}
|
|
25228
25346
|
return ar;
|
|
25229
25347
|
};
|
|
25230
|
-
var __spreadArray$
|
|
25348
|
+
var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
|
|
25231
25349
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
25232
25350
|
to[j] = from[i];
|
|
25233
25351
|
return to;
|
|
@@ -25663,7 +25781,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
25663
25781
|
// If a specified layer hasn't been added to the map throw an error.
|
|
25664
25782
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
25665
25783
|
if (index > -1) {
|
|
25666
|
-
layerIds.push.apply(layerIds, __spreadArray$
|
|
25784
|
+
layerIds.push.apply(layerIds, __spreadArray$5([], __read$a(this_1.layerIndex[index]._getLayerIds()
|
|
25667
25785
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
25668
25786
|
}
|
|
25669
25787
|
else {
|
|
@@ -26422,7 +26540,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26422
26540
|
}
|
|
26423
26541
|
return ar;
|
|
26424
26542
|
};
|
|
26425
|
-
var __spreadArray$
|
|
26543
|
+
var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
|
|
26426
26544
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
26427
26545
|
to[j] = from[i];
|
|
26428
26546
|
return to;
|
|
@@ -26497,7 +26615,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26497
26615
|
}
|
|
26498
26616
|
finally { if (e_1) throw e_1.error; }
|
|
26499
26617
|
}
|
|
26500
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
26618
|
+
return _super.prototype.merge.apply(this, __spreadArray$6([], __read$b(valuesList)));
|
|
26501
26619
|
};
|
|
26502
26620
|
return CameraBoundsOptions;
|
|
26503
26621
|
}(Options));
|
|
@@ -26986,7 +27104,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
26986
27104
|
}
|
|
26987
27105
|
return ar;
|
|
26988
27106
|
};
|
|
26989
|
-
var __spreadArray$
|
|
27107
|
+
var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
|
|
26990
27108
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
26991
27109
|
to[j] = from[i];
|
|
26992
27110
|
return to;
|
|
@@ -27145,7 +27263,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27145
27263
|
finally { if (e_1) throw e_1.error; }
|
|
27146
27264
|
}
|
|
27147
27265
|
// Then execute the standard merge behavior.
|
|
27148
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
27266
|
+
return _super.prototype.merge.apply(this, __spreadArray$7([], __read$c(valueList)));
|
|
27149
27267
|
};
|
|
27150
27268
|
return StyleOptions;
|
|
27151
27269
|
}(Options));
|
|
@@ -27203,7 +27321,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27203
27321
|
}
|
|
27204
27322
|
return ar;
|
|
27205
27323
|
};
|
|
27206
|
-
var __spreadArray$
|
|
27324
|
+
var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
|
|
27207
27325
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
27208
27326
|
to[j] = from[i];
|
|
27209
27327
|
return to;
|
|
@@ -27438,10 +27556,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27438
27556
|
// won't change default behavior in Options as usually that's what desired
|
|
27439
27557
|
// instead capture it here and reassign.
|
|
27440
27558
|
var currentTransforms = this._transformers;
|
|
27441
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$
|
|
27559
|
+
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$d(flattened)), __read$d(value._transformers || [])); }, []) : [];
|
|
27442
27560
|
// Then execute the standard merge behavior.
|
|
27443
27561
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
27444
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$
|
|
27562
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$d(valueList)));
|
|
27445
27563
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
27446
27564
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
27447
27565
|
}
|
|
@@ -27453,7 +27571,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27453
27571
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
27454
27572
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
27455
27573
|
}
|
|
27456
|
-
this._transformers = __spreadArray$
|
|
27574
|
+
this._transformers = __spreadArray$8(__spreadArray$8([], __read$d(currentTransforms || [])), __read$d(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
27457
27575
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
27458
27576
|
this._transformers.push(this.transformRequest);
|
|
27459
27577
|
}
|
|
@@ -27701,7 +27819,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27701
27819
|
}
|
|
27702
27820
|
return ar;
|
|
27703
27821
|
};
|
|
27704
|
-
var __spreadArray$
|
|
27822
|
+
var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
|
|
27705
27823
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
27706
27824
|
to[j] = from[i];
|
|
27707
27825
|
return to;
|
|
@@ -27754,7 +27872,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27754
27872
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
27755
27873
|
var _b = __read$e(_a, 2), groupName = _b[0], layers = _b[1];
|
|
27756
27874
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
27757
|
-
return __spreadArray$
|
|
27875
|
+
return __spreadArray$9(__spreadArray$9([], __read$e(deferred)), __read$e(layers.filter(function (layer) {
|
|
27758
27876
|
var _a;
|
|
27759
27877
|
// Exclude custom layers
|
|
27760
27878
|
if (layer.type === 'custom')
|
|
@@ -27946,7 +28064,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
27946
28064
|
domain: _this.serviceOptions.staticAssetsDomain,
|
|
27947
28065
|
path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
|
|
27948
28066
|
queryParams: {
|
|
27949
|
-
|
|
28067
|
+
// Use the style version from the API response if it's available,
|
|
28068
|
+
// otherwise fallback to the version specified in the serviceOptions.
|
|
28069
|
+
// This is needed for flight testing the 2023-01-01 style version.
|
|
28070
|
+
styleVersion: definitions.version !== undefined && definitions.version !== null
|
|
28071
|
+
? definitions.version
|
|
28072
|
+
: _this.serviceOptions.styleDefinitionsVersion
|
|
27950
28073
|
// thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
|
|
27951
28074
|
//language: styleOptions.language
|
|
27952
28075
|
},
|
|
@@ -28237,27 +28360,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28237
28360
|
* Fetches a json resource at the specified domain and path.
|
|
28238
28361
|
*/
|
|
28239
28362
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
28240
|
-
var _a;
|
|
28363
|
+
var _a, _b;
|
|
28241
28364
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
28242
28365
|
return __awaiter$3(this, void 0, void 0, function () {
|
|
28243
28366
|
var requestParams, fetchOptions;
|
|
28244
|
-
var
|
|
28245
|
-
return __generator$3(this, function (
|
|
28246
|
-
switch (
|
|
28367
|
+
var _c;
|
|
28368
|
+
return __generator$3(this, function (_d) {
|
|
28369
|
+
switch (_d.label) {
|
|
28247
28370
|
case 0:
|
|
28248
28371
|
requestParams = {
|
|
28249
28372
|
url: new Url({
|
|
28250
28373
|
protocol: "https",
|
|
28251
28374
|
domain: domain,
|
|
28252
28375
|
path: path,
|
|
28253
|
-
queryParams: __assign$8((
|
|
28376
|
+
queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
|
|
28377
|
+
// Generate a hash code to avoid cache conflict
|
|
28378
|
+
// TODO: Remove this once style version 2023-01-01 is publicly available
|
|
28379
|
+
_c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
|
|
28254
28380
|
}).toString()
|
|
28255
28381
|
};
|
|
28256
28382
|
if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
|
|
28257
28383
|
// If a transformRequest(...) was specified use it.
|
|
28258
28384
|
requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
|
|
28259
28385
|
}
|
|
28260
|
-
(
|
|
28386
|
+
(_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
|
|
28261
28387
|
fetchOptions = {
|
|
28262
28388
|
method: "GET",
|
|
28263
28389
|
mode: "cors",
|
|
@@ -28274,11 +28400,26 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28274
28400
|
throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
|
|
28275
28401
|
}
|
|
28276
28402
|
})];
|
|
28277
|
-
case 1: return [2 /*return*/,
|
|
28403
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
28278
28404
|
}
|
|
28279
28405
|
});
|
|
28280
28406
|
});
|
|
28281
28407
|
};
|
|
28408
|
+
/**
|
|
28409
|
+
* A basic helper function to generate a hash from an input string.
|
|
28410
|
+
*/
|
|
28411
|
+
StyleManager._hashCode = function (str) {
|
|
28412
|
+
if (str === void 0) { str = ""; }
|
|
28413
|
+
var chr, hash = 0;
|
|
28414
|
+
if (!str)
|
|
28415
|
+
return hash;
|
|
28416
|
+
for (var i = 0; i < str.length; i++) {
|
|
28417
|
+
chr = str.charCodeAt(i);
|
|
28418
|
+
hash = (hash << 5) - hash + chr;
|
|
28419
|
+
hash |= 0; // Convert to 32bit integer
|
|
28420
|
+
}
|
|
28421
|
+
return hash;
|
|
28422
|
+
};
|
|
28282
28423
|
return StyleManager;
|
|
28283
28424
|
}());
|
|
28284
28425
|
|
|
@@ -28365,7 +28506,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28365
28506
|
}
|
|
28366
28507
|
return ar;
|
|
28367
28508
|
};
|
|
28368
|
-
var __spreadArray$
|
|
28509
|
+
var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
|
|
28369
28510
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
28370
28511
|
to[j] = from[i];
|
|
28371
28512
|
return to;
|
|
@@ -28552,7 +28693,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28552
28693
|
_this.events.invoke("error", errorData);
|
|
28553
28694
|
});
|
|
28554
28695
|
// --> Set initial camera state of map
|
|
28555
|
-
_this.setCamera(__assign$9(__assign$9({
|
|
28696
|
+
_this.setCamera(__assign$9(__assign$9({
|
|
28697
|
+
// Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
|
|
28698
|
+
minZoom: 1 }, options), { type: "jump", duration: 0 }));
|
|
28556
28699
|
// Add delegates to map
|
|
28557
28700
|
{
|
|
28558
28701
|
_this.incidentDelegate = new IncidentServiceDelegate(_this);
|
|
@@ -29170,7 +29313,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29170
29313
|
urls = layer.getOptions().subdomains || [];
|
|
29171
29314
|
}
|
|
29172
29315
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
29173
|
-
urls.push.apply(urls, __spreadArray$
|
|
29316
|
+
urls.push.apply(urls, __spreadArray$a([], __read$f(tileSources)));
|
|
29174
29317
|
layer._setOptionsNoUpdate({
|
|
29175
29318
|
subdomains: urls
|
|
29176
29319
|
});
|
|
@@ -29339,9 +29482,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29339
29482
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
29340
29483
|
*/
|
|
29341
29484
|
Map.prototype.dispose = function () {
|
|
29485
|
+
var _a;
|
|
29342
29486
|
this.clear();
|
|
29343
29487
|
this.map.remove();
|
|
29488
|
+
(_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
29344
29489
|
this.removed = true;
|
|
29490
|
+
// Remove event listeners
|
|
29491
|
+
window.removeEventListener("resize", this._windowResizeCallback);
|
|
29345
29492
|
while (this.getMapContainer().firstChild) {
|
|
29346
29493
|
var currChild = this.getMapContainer().firstChild;
|
|
29347
29494
|
this.getMapContainer().removeChild(currChild);
|
|
@@ -29686,7 +29833,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29686
29833
|
}
|
|
29687
29834
|
return ar;
|
|
29688
29835
|
};
|
|
29689
|
-
var __spreadArray$
|
|
29836
|
+
var __spreadArray$b = (window && window.__spreadArray) || function (to, from) {
|
|
29690
29837
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
29691
29838
|
to[j] = from[i];
|
|
29692
29839
|
return to;
|
|
@@ -29832,7 +29979,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
29832
29979
|
lineLength = 50;
|
|
29833
29980
|
}
|
|
29834
29981
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
29835
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$
|
|
29982
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$g((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
29836
29983
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
29837
29984
|
if (w < width) {
|
|
29838
29985
|
width = w;
|