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-snr.js
CHANGED
|
@@ -43619,7 +43619,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43619
43619
|
return Url;
|
|
43620
43620
|
}());
|
|
43621
43621
|
|
|
43622
|
-
var version = "2.2.
|
|
43622
|
+
var version = "2.2.4";
|
|
43623
43623
|
|
|
43624
43624
|
/**
|
|
43625
43625
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -43660,27 +43660,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43660
43660
|
var tooltipContent = document.createElement("span");
|
|
43661
43661
|
tooltipContent.innerText = name;
|
|
43662
43662
|
tooltipContent.classList.add('tooltiptext');
|
|
43663
|
-
// mimics default edge tooltip theming
|
|
43664
|
-
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
43665
|
-
tooltipContent.classList.add('dark');
|
|
43666
|
-
}
|
|
43667
|
-
var themeQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
43668
|
-
var onThemeChange = function (e) {
|
|
43669
|
-
var isDark = e.matches;
|
|
43670
|
-
if (isDark && !tooltipContent.classList.contains('dark')) {
|
|
43671
|
-
tooltipContent.classList.add('dark');
|
|
43672
|
-
}
|
|
43673
|
-
else if (!isDark && tooltipContent.classList.contains('dark')) {
|
|
43674
|
-
tooltipContent.classList.remove('dark');
|
|
43675
|
-
}
|
|
43676
|
-
};
|
|
43677
|
-
// compensate for browsers where MediaQueryList is not derived from EventTarget (pre iOS13 Safari)
|
|
43678
|
-
if (typeof themeQuery.addEventListener === 'function') {
|
|
43679
|
-
themeQuery.addEventListener('change', function (e) { return onThemeChange(e); });
|
|
43680
|
-
}
|
|
43681
|
-
else if (typeof themeQuery.addListener === 'function') {
|
|
43682
|
-
themeQuery.addListener(function (e) { return onThemeChange(e); });
|
|
43683
|
-
}
|
|
43684
43663
|
if (navigator.userAgent.indexOf('Edg') != -1) {
|
|
43685
43664
|
tooltipContent.classList.add('edge');
|
|
43686
43665
|
}
|
|
@@ -47850,6 +47829,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47850
47829
|
}
|
|
47851
47830
|
});
|
|
47852
47831
|
container.addEventListener("focusout", function (event) {
|
|
47832
|
+
if (event.target === currStyleButton) {
|
|
47833
|
+
// on focusout from reveal button -> reset the tabIndex on the styleOpsGrid elements that could have been set to -1 on esc key press
|
|
47834
|
+
Array.from(styleOpsGrid.children).forEach(function (e) { return e.removeAttribute('tabIndex'); });
|
|
47835
|
+
}
|
|
47853
47836
|
if (!(event.relatedTarget instanceof Node && container.contains(event.relatedTarget))) {
|
|
47854
47837
|
_this.hasFocus = false;
|
|
47855
47838
|
if (!_this.hasMouse) {
|
|
@@ -47864,6 +47847,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47864
47847
|
if (event.keyCode === 27) {
|
|
47865
47848
|
event.stopPropagation();
|
|
47866
47849
|
currStyleButton.focus();
|
|
47850
|
+
Array.from(styleOpsGrid.children).forEach(function (e) { return e.setAttribute('tabIndex', "-1"); });
|
|
47867
47851
|
if (container.classList.contains(StyleControl.Css.inUse)) {
|
|
47868
47852
|
container.classList.remove(StyleControl.Css.inUse);
|
|
47869
47853
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
@@ -59340,6 +59324,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
59340
59324
|
}
|
|
59341
59325
|
return ar;
|
|
59342
59326
|
};
|
|
59327
|
+
var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
|
|
59328
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
59329
|
+
to[j] = from[i];
|
|
59330
|
+
return to;
|
|
59331
|
+
};
|
|
59343
59332
|
|
|
59344
59333
|
/**
|
|
59345
59334
|
* @private
|
|
@@ -60971,7 +60960,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60971
60960
|
}
|
|
60972
60961
|
return ar;
|
|
60973
60962
|
};
|
|
60974
|
-
var __spreadArray$
|
|
60963
|
+
var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
|
|
60975
60964
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
60976
60965
|
to[j] = from[i];
|
|
60977
60966
|
return to;
|
|
@@ -61407,7 +61396,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61407
61396
|
// If a specified layer hasn't been added to the map throw an error.
|
|
61408
61397
|
var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
|
|
61409
61398
|
if (index > -1) {
|
|
61410
|
-
layerIds.push.apply(layerIds, __spreadArray$
|
|
61399
|
+
layerIds.push.apply(layerIds, __spreadArray$3([], __read$8(this_1.layerIndex[index]._getLayerIds()
|
|
61411
61400
|
.filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
|
|
61412
61401
|
}
|
|
61413
61402
|
else {
|
|
@@ -62166,7 +62155,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62166
62155
|
}
|
|
62167
62156
|
return ar;
|
|
62168
62157
|
};
|
|
62169
|
-
var __spreadArray$
|
|
62158
|
+
var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
|
|
62170
62159
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
62171
62160
|
to[j] = from[i];
|
|
62172
62161
|
return to;
|
|
@@ -62241,7 +62230,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62241
62230
|
}
|
|
62242
62231
|
finally { if (e_1) throw e_1.error; }
|
|
62243
62232
|
}
|
|
62244
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
62233
|
+
return _super.prototype.merge.apply(this, __spreadArray$4([], __read$9(valuesList)));
|
|
62245
62234
|
};
|
|
62246
62235
|
return CameraBoundsOptions;
|
|
62247
62236
|
}(Options));
|
|
@@ -62730,7 +62719,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62730
62719
|
}
|
|
62731
62720
|
return ar;
|
|
62732
62721
|
};
|
|
62733
|
-
var __spreadArray$
|
|
62722
|
+
var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
|
|
62734
62723
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
62735
62724
|
to[j] = from[i];
|
|
62736
62725
|
return to;
|
|
@@ -62889,7 +62878,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62889
62878
|
finally { if (e_1) throw e_1.error; }
|
|
62890
62879
|
}
|
|
62891
62880
|
// Then execute the standard merge behavior.
|
|
62892
|
-
return _super.prototype.merge.apply(this, __spreadArray$
|
|
62881
|
+
return _super.prototype.merge.apply(this, __spreadArray$5([], __read$a(valueList)));
|
|
62893
62882
|
};
|
|
62894
62883
|
return StyleOptions;
|
|
62895
62884
|
}(Options));
|
|
@@ -62947,7 +62936,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
62947
62936
|
}
|
|
62948
62937
|
return ar;
|
|
62949
62938
|
};
|
|
62950
|
-
var __spreadArray$
|
|
62939
|
+
var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
|
|
62951
62940
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
62952
62941
|
to[j] = from[i];
|
|
62953
62942
|
return to;
|
|
@@ -63182,10 +63171,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63182
63171
|
// won't change default behavior in Options as usually that's what desired
|
|
63183
63172
|
// instead capture it here and reassign.
|
|
63184
63173
|
var currentTransforms = this._transformers;
|
|
63185
|
-
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$
|
|
63174
|
+
var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$6(__spreadArray$6([], __read$b(flattened)), __read$b(value._transformers || [])); }, []) : [];
|
|
63186
63175
|
// Then execute the standard merge behavior.
|
|
63187
63176
|
// If subscription key auth method isn't being used then the subscription key property should be undefined.
|
|
63188
|
-
var merged = _super.prototype.merge.apply(this, __spreadArray$
|
|
63177
|
+
var merged = _super.prototype.merge.apply(this, __spreadArray$6([], __read$b(valueList)));
|
|
63189
63178
|
if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
|
|
63190
63179
|
merged["subscription-key"] = merged.subscriptionKey = undefined;
|
|
63191
63180
|
}
|
|
@@ -63197,7 +63186,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63197
63186
|
if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
|
|
63198
63187
|
merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
|
|
63199
63188
|
}
|
|
63200
|
-
this._transformers = __spreadArray$
|
|
63189
|
+
this._transformers = __spreadArray$6(__spreadArray$6([], __read$b(currentTransforms || [])), __read$b(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
|
|
63201
63190
|
if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
|
|
63202
63191
|
this._transformers.push(this.transformRequest);
|
|
63203
63192
|
}
|
|
@@ -63445,7 +63434,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63445
63434
|
}
|
|
63446
63435
|
return ar;
|
|
63447
63436
|
};
|
|
63448
|
-
var __spreadArray$
|
|
63437
|
+
var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
|
|
63449
63438
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
63450
63439
|
to[j] = from[i];
|
|
63451
63440
|
return to;
|
|
@@ -63498,7 +63487,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63498
63487
|
var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
|
|
63499
63488
|
var _b = __read$c(_a, 2), groupName = _b[0], layers = _b[1];
|
|
63500
63489
|
var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
|
|
63501
|
-
return __spreadArray$
|
|
63490
|
+
return __spreadArray$7(__spreadArray$7([], __read$c(deferred)), __read$c(layers.filter(function (layer) {
|
|
63502
63491
|
var _a;
|
|
63503
63492
|
// Exclude custom layers
|
|
63504
63493
|
if (layer.type === 'custom')
|
|
@@ -63690,7 +63679,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63690
63679
|
domain: _this.serviceOptions.staticAssetsDomain,
|
|
63691
63680
|
path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
|
|
63692
63681
|
queryParams: {
|
|
63693
|
-
|
|
63682
|
+
// Use the style version from the API response if it's available,
|
|
63683
|
+
// otherwise fallback to the version specified in the serviceOptions.
|
|
63684
|
+
// This is needed for flight testing the 2023-01-01 style version.
|
|
63685
|
+
styleVersion: definitions.version !== undefined && definitions.version !== null
|
|
63686
|
+
? definitions.version
|
|
63687
|
+
: _this.serviceOptions.styleDefinitionsVersion
|
|
63694
63688
|
// thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
|
|
63695
63689
|
//language: styleOptions.language
|
|
63696
63690
|
},
|
|
@@ -63981,27 +63975,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63981
63975
|
* Fetches a json resource at the specified domain and path.
|
|
63982
63976
|
*/
|
|
63983
63977
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
63984
|
-
var _a;
|
|
63978
|
+
var _a, _b;
|
|
63985
63979
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
63986
63980
|
return __awaiter$2(this, void 0, void 0, function () {
|
|
63987
63981
|
var requestParams, fetchOptions;
|
|
63988
|
-
var
|
|
63989
|
-
return __generator$2(this, function (
|
|
63990
|
-
switch (
|
|
63982
|
+
var _c;
|
|
63983
|
+
return __generator$2(this, function (_d) {
|
|
63984
|
+
switch (_d.label) {
|
|
63991
63985
|
case 0:
|
|
63992
63986
|
requestParams = {
|
|
63993
63987
|
url: new Url({
|
|
63994
63988
|
protocol: "https",
|
|
63995
63989
|
domain: domain,
|
|
63996
63990
|
path: path,
|
|
63997
|
-
queryParams: __assign$8((
|
|
63991
|
+
queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
|
|
63992
|
+
// Generate a hash code to avoid cache conflict
|
|
63993
|
+
// TODO: Remove this once style version 2023-01-01 is publicly available
|
|
63994
|
+
_c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
|
|
63998
63995
|
}).toString()
|
|
63999
63996
|
};
|
|
64000
63997
|
if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
|
|
64001
63998
|
// If a transformRequest(...) was specified use it.
|
|
64002
63999
|
requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
|
|
64003
64000
|
}
|
|
64004
|
-
(
|
|
64001
|
+
(_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
|
|
64005
64002
|
fetchOptions = {
|
|
64006
64003
|
method: "GET",
|
|
64007
64004
|
mode: "cors",
|
|
@@ -64018,11 +64015,26 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64018
64015
|
throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
|
|
64019
64016
|
}
|
|
64020
64017
|
})];
|
|
64021
|
-
case 1: return [2 /*return*/,
|
|
64018
|
+
case 1: return [2 /*return*/, _d.sent()];
|
|
64022
64019
|
}
|
|
64023
64020
|
});
|
|
64024
64021
|
});
|
|
64025
64022
|
};
|
|
64023
|
+
/**
|
|
64024
|
+
* A basic helper function to generate a hash from an input string.
|
|
64025
|
+
*/
|
|
64026
|
+
StyleManager._hashCode = function (str) {
|
|
64027
|
+
if (str === void 0) { str = ""; }
|
|
64028
|
+
var chr, hash = 0;
|
|
64029
|
+
if (!str)
|
|
64030
|
+
return hash;
|
|
64031
|
+
for (var i = 0; i < str.length; i++) {
|
|
64032
|
+
chr = str.charCodeAt(i);
|
|
64033
|
+
hash = (hash << 5) - hash + chr;
|
|
64034
|
+
hash |= 0; // Convert to 32bit integer
|
|
64035
|
+
}
|
|
64036
|
+
return hash;
|
|
64037
|
+
};
|
|
64026
64038
|
return StyleManager;
|
|
64027
64039
|
}());
|
|
64028
64040
|
|
|
@@ -64109,7 +64121,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64109
64121
|
}
|
|
64110
64122
|
return ar;
|
|
64111
64123
|
};
|
|
64112
|
-
var __spreadArray$
|
|
64124
|
+
var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
|
|
64113
64125
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
64114
64126
|
to[j] = from[i];
|
|
64115
64127
|
return to;
|
|
@@ -64292,7 +64304,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64292
64304
|
_this.events.invoke("error", errorData);
|
|
64293
64305
|
});
|
|
64294
64306
|
// --> Set initial camera state of map
|
|
64295
|
-
_this.setCamera(__assign$9(__assign$9({
|
|
64307
|
+
_this.setCamera(__assign$9(__assign$9({
|
|
64308
|
+
// Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
|
|
64309
|
+
minZoom: 1 }, options), { type: "jump", duration: 0 }));
|
|
64296
64310
|
_this.flowDelegate = new FlowServiceDelegate(_this);
|
|
64297
64311
|
_this.accessibleMapDelegate = new AccessibleMapDelegate(_this);
|
|
64298
64312
|
_this.userInteractionDelegate = new UserInteractionDelegate(_this, options);
|
|
@@ -64908,7 +64922,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64908
64922
|
urls = layer.getOptions().subdomains || [];
|
|
64909
64923
|
}
|
|
64910
64924
|
// Add the tile urls to the layer, but don't update the map yet.
|
|
64911
|
-
urls.push.apply(urls, __spreadArray$
|
|
64925
|
+
urls.push.apply(urls, __spreadArray$8([], __read$d(tileSources)));
|
|
64912
64926
|
layer._setOptionsNoUpdate({
|
|
64913
64927
|
subdomains: urls
|
|
64914
64928
|
});
|
|
@@ -65077,9 +65091,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65077
65091
|
* Clean up the map's resources. Map will not function correctly after calling this method.
|
|
65078
65092
|
*/
|
|
65079
65093
|
Map.prototype.dispose = function () {
|
|
65094
|
+
var _a;
|
|
65080
65095
|
this.clear();
|
|
65081
65096
|
this.map.remove();
|
|
65097
|
+
(_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
65082
65098
|
this.removed = true;
|
|
65099
|
+
// Remove event listeners
|
|
65100
|
+
window.removeEventListener("resize", this._windowResizeCallback);
|
|
65083
65101
|
while (this.getMapContainer().firstChild) {
|
|
65084
65102
|
var currChild = this.getMapContainer().firstChild;
|
|
65085
65103
|
this.getMapContainer().removeChild(currChild);
|
|
@@ -65424,7 +65442,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65424
65442
|
}
|
|
65425
65443
|
return ar;
|
|
65426
65444
|
};
|
|
65427
|
-
var __spreadArray$
|
|
65445
|
+
var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
|
|
65428
65446
|
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
65429
65447
|
to[j] = from[i];
|
|
65430
65448
|
return to;
|
|
@@ -65570,7 +65588,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
65570
65588
|
lineLength = 50;
|
|
65571
65589
|
}
|
|
65572
65590
|
var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
|
|
65573
|
-
longestStringLength = Math.max.apply(Math, __spreadArray$
|
|
65591
|
+
longestStringLength = Math.max.apply(Math, __spreadArray$9([], __read$e((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
|
|
65574
65592
|
var w = Math.ceil(longestStringLength * 3.5);
|
|
65575
65593
|
if (w < width) {
|
|
65576
65594
|
width = w;
|