azure-maps-control 2.3.1 → 2.3.3
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 +60 -13
- package/dist/atlas-core-bare.js +63 -13
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +60 -13
- package/dist/atlas-core.js +63 -13
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.js +63 -13
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
|
@@ -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.3.
|
|
268
|
+
var version = "2.3.3";
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -10052,7 +10052,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10052
10052
|
zoomInButton.setAttribute("alt", "Zoom In");
|
|
10053
10053
|
zoomInButton.setAttribute("type", "button");
|
|
10054
10054
|
zoomInButton.addEventListener("click", function () {
|
|
10055
|
+
var _a;
|
|
10055
10056
|
map.setCamera({
|
|
10057
|
+
maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
|
|
10056
10058
|
zoom: map.getCamera().zoom + _this.options.zoomDelta,
|
|
10057
10059
|
duration: ZoomControl.ZOOM_DURATION_MS,
|
|
10058
10060
|
type: "ease",
|
|
@@ -10069,7 +10071,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10069
10071
|
zoomOutButton.setAttribute("alt", "Zoom Out");
|
|
10070
10072
|
zoomOutButton.setAttribute("type", "button");
|
|
10071
10073
|
zoomOutButton.addEventListener("click", function () {
|
|
10074
|
+
var _a;
|
|
10072
10075
|
map.setCamera({
|
|
10076
|
+
maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
|
|
10073
10077
|
zoom: map.getCamera().zoom - _this.options.zoomDelta,
|
|
10074
10078
|
duration: ZoomControl.ZOOM_DURATION_MS,
|
|
10075
10079
|
type: "ease",
|
|
@@ -13184,6 +13188,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13184
13188
|
* @default "auto"
|
|
13185
13189
|
*/
|
|
13186
13190
|
_this.pitchAlignment = "auto";
|
|
13191
|
+
/**
|
|
13192
|
+
* Radial offset of text, in the direction of the symbol's anchor. Useful in combination
|
|
13193
|
+
* with `variableAnchor`, which defaults to using the two-dimensional `offset` if present.
|
|
13194
|
+
* Default: `undefined`
|
|
13195
|
+
* @default undefined
|
|
13196
|
+
*/
|
|
13197
|
+
_this.radialOffset = undefined;
|
|
13187
13198
|
/**
|
|
13188
13199
|
* The amount to rotate the text clockwise in degrees.
|
|
13189
13200
|
* Default `0`
|
|
@@ -13203,6 +13214,25 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13203
13214
|
* @default "auto"
|
|
13204
13215
|
*/
|
|
13205
13216
|
_this.rotationAlignment = "auto";
|
|
13217
|
+
/**
|
|
13218
|
+
* List of potential anchor locations, to increase the chance of placing high-priority
|
|
13219
|
+
* labels on the map. The renderer will attempt to place the label at each location,
|
|
13220
|
+
* in order, before moving onto the next label. Use `justify: "auto"` to choose text
|
|
13221
|
+
* justification based on anchor position. To apply an offset use the `radialOffset` or
|
|
13222
|
+
* two-dimensional `offset` options.
|
|
13223
|
+
* <p>`"center"`: The center of the icon is placed closest to the anchor.</p>
|
|
13224
|
+
* <p>`"left"`: The left side of the icon is placed closest to the anchor.</p>
|
|
13225
|
+
* <p>`"right"`: The right side of the icon is placed closest to the anchor.</p>
|
|
13226
|
+
* <p>`"top"`: The top of the icon is placed closest to the anchor.</p>
|
|
13227
|
+
* <p>`"bottom"`: The bottom of the icon is placed closest to the anchor.</p>
|
|
13228
|
+
* <p>`"top-left"`: The top left corner of the icon is placed closest to the anchor.</p>
|
|
13229
|
+
* <p>`"top-right"`: The top right corner of the icon is placed closest to the anchor.</p>
|
|
13230
|
+
* <p>`"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.</p>
|
|
13231
|
+
* <p>`"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.</p>
|
|
13232
|
+
* Default: `undefined`
|
|
13233
|
+
* @default undefined
|
|
13234
|
+
*/
|
|
13235
|
+
_this.variableAnchor = undefined;
|
|
13206
13236
|
/**
|
|
13207
13237
|
* The size of the font in pixels.
|
|
13208
13238
|
* Must be a number greater or equal to 0.
|
|
@@ -13301,6 +13331,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13301
13331
|
* @default "point"
|
|
13302
13332
|
*/
|
|
13303
13333
|
_this.placement = "point";
|
|
13334
|
+
/**
|
|
13335
|
+
* Sorts features in ascending order based on this value. Features with
|
|
13336
|
+
* lower sort keys are drawn and placed first.
|
|
13337
|
+
* Default `undefined`.
|
|
13338
|
+
* @default undefined
|
|
13339
|
+
*/
|
|
13340
|
+
_this.sortKey = undefined;
|
|
13304
13341
|
/**
|
|
13305
13342
|
* Determines whether overlapping symbols in the same layer are rendered in the order
|
|
13306
13343
|
* that they appear in the data source, or by their y position relative to the viewport.
|
|
@@ -16405,6 +16442,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
16405
16442
|
function AccessibleMapDelegate(map) {
|
|
16406
16443
|
var _this = this;
|
|
16407
16444
|
this.addToMap = function () {
|
|
16445
|
+
if (_this.mapViewDesc != null) {
|
|
16446
|
+
// AccessibleMapDelegate is already initialized and added to the map.
|
|
16447
|
+
return;
|
|
16448
|
+
}
|
|
16408
16449
|
_this.initializeMapLiveStateInfo();
|
|
16409
16450
|
_this.initializeMapStyleInfo();
|
|
16410
16451
|
_this.createMapKeyBindingInfo();
|
|
@@ -20656,6 +20697,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20656
20697
|
});
|
|
20657
20698
|
// Make the deferred layers visible once the map instance is fully loaded.
|
|
20658
20699
|
_this._progressiveLoadingState.pendingVisibilityChange = function () {
|
|
20700
|
+
var _a;
|
|
20659
20701
|
// Release the callback.
|
|
20660
20702
|
_this._progressiveLoadingState.pendingVisibilityChange = null;
|
|
20661
20703
|
// Bail out the callback once map style has changed.
|
|
@@ -20669,6 +20711,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20669
20711
|
layer.layout.visibility = 'visible';
|
|
20670
20712
|
map.setLayoutProperty(layer.id, 'visibility', 'visible');
|
|
20671
20713
|
});
|
|
20714
|
+
// Reload attribution after the deferred layers are visible.
|
|
20715
|
+
(_a = _this.map.copyrightDelegate) === null || _a === void 0 ? void 0 : _a.reloadAttribution();
|
|
20672
20716
|
};
|
|
20673
20717
|
_this.map.events.addOnce('load', _this._progressiveLoadingState.pendingVisibilityChange);
|
|
20674
20718
|
};
|
|
@@ -20784,7 +20828,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20784
20828
|
};
|
|
20785
20829
|
if (!this.serviceOptions.mapConfiguration) {
|
|
20786
20830
|
var ensureAuthentication = this.map.authentication ? this.map.authentication.initialize() : Promise.resolve();
|
|
20787
|
-
newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.staticAssetsDomain, constants.stylePath + "/" + constants.styleResourcePath, "StyleDefinitions", {
|
|
20831
|
+
newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.staticAssetsDomain, constants.stylePath + "/" + constants.styleResourcePath, "StyleDefinitions", {
|
|
20832
|
+
version: _this.serviceOptions.styleDefinitionsVersion,
|
|
20833
|
+
// add MapControlVersion to make sure we have different local cache between map control versions
|
|
20834
|
+
mcv: version.replace(/\./g, ''),
|
|
20835
|
+
}).then(function (definitions) { return ({
|
|
20788
20836
|
version: isNaN(definitions.version) ? 0 : parseFloat(definitions.version),
|
|
20789
20837
|
defaultConfiguration: definitions.defaultStyle,
|
|
20790
20838
|
configurations: definitions.styles
|
|
@@ -20816,9 +20864,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
20816
20864
|
// This is needed for flight testing the 2023-01-01 style version.
|
|
20817
20865
|
styleVersion: definitions.version !== undefined && definitions.version !== null
|
|
20818
20866
|
? definitions.version
|
|
20819
|
-
: _this.serviceOptions.styleDefinitionsVersion
|
|
20867
|
+
: _this.serviceOptions.styleDefinitionsVersion,
|
|
20820
20868
|
// thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
|
|
20821
20869
|
//language: styleOptions.language
|
|
20870
|
+
// add MapControlVersion to make sure we have different local cache between map control versions
|
|
20871
|
+
mcv: version.replace(/\./g, '')
|
|
20822
20872
|
},
|
|
20823
20873
|
protocol: "https"
|
|
20824
20874
|
}).toString(),
|
|
@@ -21141,30 +21191,27 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21141
21191
|
* Fetches a json resource at the specified domain and path.
|
|
21142
21192
|
*/
|
|
21143
21193
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
21144
|
-
var _a
|
|
21194
|
+
var _a;
|
|
21145
21195
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
21146
21196
|
return __awaiter$3(this, void 0, void 0, function () {
|
|
21147
21197
|
var requestParams, fetchOptions;
|
|
21148
|
-
var
|
|
21149
|
-
return __generator$3(this, function (
|
|
21150
|
-
switch (
|
|
21198
|
+
var _b;
|
|
21199
|
+
return __generator$3(this, function (_c) {
|
|
21200
|
+
switch (_c.label) {
|
|
21151
21201
|
case 0:
|
|
21152
21202
|
requestParams = {
|
|
21153
21203
|
url: new Url({
|
|
21154
21204
|
protocol: "https",
|
|
21155
21205
|
domain: domain,
|
|
21156
21206
|
path: path,
|
|
21157
|
-
queryParams: __assign$8((
|
|
21158
|
-
// Generate a hash code to avoid cache conflict
|
|
21159
|
-
// TODO: Remove this once style version 2023-01-01 is publicly available
|
|
21160
|
-
_c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
|
|
21207
|
+
queryParams: __assign$8((_b = {}, _b[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion, _b), customQueryParams)
|
|
21161
21208
|
}).toString()
|
|
21162
21209
|
};
|
|
21163
21210
|
if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
|
|
21164
21211
|
// If a transformRequest(...) was specified use it.
|
|
21165
21212
|
requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
|
|
21166
21213
|
}
|
|
21167
|
-
(
|
|
21214
|
+
(_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
|
|
21168
21215
|
fetchOptions = {
|
|
21169
21216
|
method: "GET",
|
|
21170
21217
|
mode: "cors",
|
|
@@ -21181,7 +21228,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21181
21228
|
throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
|
|
21182
21229
|
}
|
|
21183
21230
|
})];
|
|
21184
|
-
case 1: return [2 /*return*/,
|
|
21231
|
+
case 1: return [2 /*return*/, _c.sent()];
|
|
21185
21232
|
}
|
|
21186
21233
|
});
|
|
21187
21234
|
});
|
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.3.
|
|
268
|
+
var version = "2.3.3";
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
271
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -10052,7 +10052,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10052
10052
|
zoomInButton.setAttribute("alt", "Zoom In");
|
|
10053
10053
|
zoomInButton.setAttribute("type", "button");
|
|
10054
10054
|
zoomInButton.addEventListener("click", function () {
|
|
10055
|
+
var _a;
|
|
10055
10056
|
map.setCamera({
|
|
10057
|
+
maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
|
|
10056
10058
|
zoom: map.getCamera().zoom + _this.options.zoomDelta,
|
|
10057
10059
|
duration: ZoomControl.ZOOM_DURATION_MS,
|
|
10058
10060
|
type: "ease",
|
|
@@ -10069,7 +10071,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
10069
10071
|
zoomOutButton.setAttribute("alt", "Zoom Out");
|
|
10070
10072
|
zoomOutButton.setAttribute("type", "button");
|
|
10071
10073
|
zoomOutButton.addEventListener("click", function () {
|
|
10074
|
+
var _a;
|
|
10072
10075
|
map.setCamera({
|
|
10076
|
+
maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
|
|
10073
10077
|
zoom: map.getCamera().zoom - _this.options.zoomDelta,
|
|
10074
10078
|
duration: ZoomControl.ZOOM_DURATION_MS,
|
|
10075
10079
|
type: "ease",
|
|
@@ -13184,6 +13188,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13184
13188
|
* @default "auto"
|
|
13185
13189
|
*/
|
|
13186
13190
|
_this.pitchAlignment = "auto";
|
|
13191
|
+
/**
|
|
13192
|
+
* Radial offset of text, in the direction of the symbol's anchor. Useful in combination
|
|
13193
|
+
* with `variableAnchor`, which defaults to using the two-dimensional `offset` if present.
|
|
13194
|
+
* Default: `undefined`
|
|
13195
|
+
* @default undefined
|
|
13196
|
+
*/
|
|
13197
|
+
_this.radialOffset = undefined;
|
|
13187
13198
|
/**
|
|
13188
13199
|
* The amount to rotate the text clockwise in degrees.
|
|
13189
13200
|
* Default `0`
|
|
@@ -13203,6 +13214,25 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13203
13214
|
* @default "auto"
|
|
13204
13215
|
*/
|
|
13205
13216
|
_this.rotationAlignment = "auto";
|
|
13217
|
+
/**
|
|
13218
|
+
* List of potential anchor locations, to increase the chance of placing high-priority
|
|
13219
|
+
* labels on the map. The renderer will attempt to place the label at each location,
|
|
13220
|
+
* in order, before moving onto the next label. Use `justify: "auto"` to choose text
|
|
13221
|
+
* justification based on anchor position. To apply an offset use the `radialOffset` or
|
|
13222
|
+
* two-dimensional `offset` options.
|
|
13223
|
+
* <p>`"center"`: The center of the icon is placed closest to the anchor.</p>
|
|
13224
|
+
* <p>`"left"`: The left side of the icon is placed closest to the anchor.</p>
|
|
13225
|
+
* <p>`"right"`: The right side of the icon is placed closest to the anchor.</p>
|
|
13226
|
+
* <p>`"top"`: The top of the icon is placed closest to the anchor.</p>
|
|
13227
|
+
* <p>`"bottom"`: The bottom of the icon is placed closest to the anchor.</p>
|
|
13228
|
+
* <p>`"top-left"`: The top left corner of the icon is placed closest to the anchor.</p>
|
|
13229
|
+
* <p>`"top-right"`: The top right corner of the icon is placed closest to the anchor.</p>
|
|
13230
|
+
* <p>`"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.</p>
|
|
13231
|
+
* <p>`"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.</p>
|
|
13232
|
+
* Default: `undefined`
|
|
13233
|
+
* @default undefined
|
|
13234
|
+
*/
|
|
13235
|
+
_this.variableAnchor = undefined;
|
|
13206
13236
|
/**
|
|
13207
13237
|
* The size of the font in pixels.
|
|
13208
13238
|
* Must be a number greater or equal to 0.
|
|
@@ -13301,6 +13331,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
13301
13331
|
* @default "point"
|
|
13302
13332
|
*/
|
|
13303
13333
|
_this.placement = "point";
|
|
13334
|
+
/**
|
|
13335
|
+
* Sorts features in ascending order based on this value. Features with
|
|
13336
|
+
* lower sort keys are drawn and placed first.
|
|
13337
|
+
* Default `undefined`.
|
|
13338
|
+
* @default undefined
|
|
13339
|
+
*/
|
|
13340
|
+
_this.sortKey = undefined;
|
|
13304
13341
|
/**
|
|
13305
13342
|
* Determines whether overlapping symbols in the same layer are rendered in the order
|
|
13306
13343
|
* that they appear in the data source, or by their y position relative to the viewport.
|
|
@@ -17800,6 +17837,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
17800
17837
|
function AccessibleMapDelegate(map) {
|
|
17801
17838
|
var _this = this;
|
|
17802
17839
|
this.addToMap = function () {
|
|
17840
|
+
if (_this.mapViewDesc != null) {
|
|
17841
|
+
// AccessibleMapDelegate is already initialized and added to the map.
|
|
17842
|
+
return;
|
|
17843
|
+
}
|
|
17803
17844
|
_this.initializeMapLiveStateInfo();
|
|
17804
17845
|
_this.initializeMapStyleInfo();
|
|
17805
17846
|
_this.createMapKeyBindingInfo();
|
|
@@ -21935,6 +21976,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
21935
21976
|
_this.reloadAttribution();
|
|
21936
21977
|
});
|
|
21937
21978
|
};
|
|
21979
|
+
/**
|
|
21980
|
+
* @internal
|
|
21981
|
+
*/
|
|
21938
21982
|
this.reloadAttribution = function () {
|
|
21939
21983
|
var sources = _this.getMapStyleVisibleSources();
|
|
21940
21984
|
// keep track of all rules as well as registered to determine redundant rules that won't get applied.
|
|
@@ -28375,6 +28419,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28375
28419
|
});
|
|
28376
28420
|
// Make the deferred layers visible once the map instance is fully loaded.
|
|
28377
28421
|
_this._progressiveLoadingState.pendingVisibilityChange = function () {
|
|
28422
|
+
var _a;
|
|
28378
28423
|
// Release the callback.
|
|
28379
28424
|
_this._progressiveLoadingState.pendingVisibilityChange = null;
|
|
28380
28425
|
// Bail out the callback once map style has changed.
|
|
@@ -28388,6 +28433,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28388
28433
|
layer.layout.visibility = 'visible';
|
|
28389
28434
|
map.setLayoutProperty(layer.id, 'visibility', 'visible');
|
|
28390
28435
|
});
|
|
28436
|
+
// Reload attribution after the deferred layers are visible.
|
|
28437
|
+
(_a = _this.map.copyrightDelegate) === null || _a === void 0 ? void 0 : _a.reloadAttribution();
|
|
28391
28438
|
};
|
|
28392
28439
|
_this.map.events.addOnce('load', _this._progressiveLoadingState.pendingVisibilityChange);
|
|
28393
28440
|
};
|
|
@@ -28503,7 +28550,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28503
28550
|
};
|
|
28504
28551
|
if (!this.serviceOptions.mapConfiguration) {
|
|
28505
28552
|
var ensureAuthentication = this.map.authentication ? this.map.authentication.initialize() : Promise.resolve();
|
|
28506
|
-
newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.staticAssetsDomain, constants.stylePath + "/" + constants.styleResourcePath, "StyleDefinitions", {
|
|
28553
|
+
newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.staticAssetsDomain, constants.stylePath + "/" + constants.styleResourcePath, "StyleDefinitions", {
|
|
28554
|
+
version: _this.serviceOptions.styleDefinitionsVersion,
|
|
28555
|
+
// add MapControlVersion to make sure we have different local cache between map control versions
|
|
28556
|
+
mcv: version.replace(/\./g, ''),
|
|
28557
|
+
}).then(function (definitions) { return ({
|
|
28507
28558
|
version: isNaN(definitions.version) ? 0 : parseFloat(definitions.version),
|
|
28508
28559
|
defaultConfiguration: definitions.defaultStyle,
|
|
28509
28560
|
configurations: definitions.styles
|
|
@@ -28535,9 +28586,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28535
28586
|
// This is needed for flight testing the 2023-01-01 style version.
|
|
28536
28587
|
styleVersion: definitions.version !== undefined && definitions.version !== null
|
|
28537
28588
|
? definitions.version
|
|
28538
|
-
: _this.serviceOptions.styleDefinitionsVersion
|
|
28589
|
+
: _this.serviceOptions.styleDefinitionsVersion,
|
|
28539
28590
|
// thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
|
|
28540
28591
|
//language: styleOptions.language
|
|
28592
|
+
// add MapControlVersion to make sure we have different local cache between map control versions
|
|
28593
|
+
mcv: version.replace(/\./g, '')
|
|
28541
28594
|
},
|
|
28542
28595
|
protocol: "https"
|
|
28543
28596
|
}).toString(),
|
|
@@ -28860,30 +28913,27 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28860
28913
|
* Fetches a json resource at the specified domain and path.
|
|
28861
28914
|
*/
|
|
28862
28915
|
StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
|
|
28863
|
-
var _a
|
|
28916
|
+
var _a;
|
|
28864
28917
|
if (customQueryParams === void 0) { customQueryParams = {}; }
|
|
28865
28918
|
return __awaiter$4(this, void 0, void 0, function () {
|
|
28866
28919
|
var requestParams, fetchOptions;
|
|
28867
|
-
var
|
|
28868
|
-
return __generator$4(this, function (
|
|
28869
|
-
switch (
|
|
28920
|
+
var _b;
|
|
28921
|
+
return __generator$4(this, function (_c) {
|
|
28922
|
+
switch (_c.label) {
|
|
28870
28923
|
case 0:
|
|
28871
28924
|
requestParams = {
|
|
28872
28925
|
url: new Url({
|
|
28873
28926
|
protocol: "https",
|
|
28874
28927
|
domain: domain,
|
|
28875
28928
|
path: path,
|
|
28876
|
-
queryParams: __assign$8((
|
|
28877
|
-
// Generate a hash code to avoid cache conflict
|
|
28878
|
-
// TODO: Remove this once style version 2023-01-01 is publicly available
|
|
28879
|
-
_c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
|
|
28929
|
+
queryParams: __assign$8((_b = {}, _b[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion, _b), customQueryParams)
|
|
28880
28930
|
}).toString()
|
|
28881
28931
|
};
|
|
28882
28932
|
if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
|
|
28883
28933
|
// If a transformRequest(...) was specified use it.
|
|
28884
28934
|
requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
|
|
28885
28935
|
}
|
|
28886
|
-
(
|
|
28936
|
+
(_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
|
|
28887
28937
|
fetchOptions = {
|
|
28888
28938
|
method: "GET",
|
|
28889
28939
|
mode: "cors",
|
|
@@ -28900,7 +28950,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
28900
28950
|
throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
|
|
28901
28951
|
}
|
|
28902
28952
|
})];
|
|
28903
|
-
case 1: return [2 /*return*/,
|
|
28953
|
+
case 1: return [2 /*return*/, _c.sent()];
|
|
28904
28954
|
}
|
|
28905
28955
|
});
|
|
28906
28956
|
});
|