azure-maps-control 2.2.6 → 2.2.7
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 +131 -46
- package/dist/atlas-core-bare.js +131 -46
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +131 -46
- package/dist/atlas-core.js +131 -46
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas.js +131 -46
- package/dist/atlas.min.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +13 -0
package/dist/atlas.js
CHANGED
|
@@ -43619,7 +43619,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43619
43619
|
return Url;
|
|
43620
43620
|
}());
|
|
43621
43621
|
|
|
43622
|
-
var version = "2.2.
|
|
43622
|
+
var version = "2.2.7";
|
|
43623
43623
|
|
|
43624
43624
|
/**
|
|
43625
43625
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -43999,7 +43999,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
43999
43999
|
* Build the outermost container for the control, applies styling including any listeners for auto styling.
|
|
44000
44000
|
*/
|
|
44001
44001
|
ControlBase.prototype.buildContainer = function (map, style, ariaLabel, tagName) {
|
|
44002
|
-
var _this = this;
|
|
44003
44002
|
this._map = map;
|
|
44004
44003
|
this._container = document.createElement(tagName || "div");
|
|
44005
44004
|
this._container.classList.add("azure-maps-control-container");
|
|
@@ -44008,11 +44007,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
44008
44007
|
}
|
|
44009
44008
|
// Set the style or add the auto listener.
|
|
44010
44009
|
if (style.toLowerCase() === exports.ControlStyle.auto) {
|
|
44011
|
-
this._map
|
|
44012
|
-
|
|
44013
|
-
|
|
44014
|
-
}
|
|
44015
|
-
});
|
|
44010
|
+
if (this._map) {
|
|
44011
|
+
this._map.events.add("stylechanged", this._onStyleChange);
|
|
44012
|
+
}
|
|
44016
44013
|
}
|
|
44017
44014
|
else {
|
|
44018
44015
|
this._container.classList.add(style);
|
|
@@ -47772,6 +47769,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47772
47769
|
_this.hasFocus = false;
|
|
47773
47770
|
_this.styleButtons = new Dictionary();
|
|
47774
47771
|
_this.styleIcons = new Dictionary();
|
|
47772
|
+
// we need to rely on this to avoid potentially redundant thumbnail requests and .blob calls
|
|
47773
|
+
_this.thumbnailCache = {
|
|
47774
|
+
assumedConfiguration: undefined,
|
|
47775
|
+
response: new Dictionary(),
|
|
47776
|
+
blob: new Dictionary()
|
|
47777
|
+
};
|
|
47775
47778
|
/**
|
|
47776
47779
|
* Callback handler for the style changing.
|
|
47777
47780
|
*/
|
|
@@ -47785,6 +47788,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47785
47788
|
if (!_this.styleOpsGrid) {
|
|
47786
47789
|
return;
|
|
47787
47790
|
}
|
|
47791
|
+
// do not recreate the styleOpsGrid if it is initialized and configuration object reference has not changed
|
|
47792
|
+
if (_this.styleOpsGrid.children.length > 0 && _this.thumbnailCache.assumedConfiguration === definitions) {
|
|
47793
|
+
return;
|
|
47794
|
+
}
|
|
47795
|
+
_this.thumbnailCache.assumedConfiguration = definitions;
|
|
47788
47796
|
Array.from(_this.styleOpsGrid.children).forEach(function (element) { return element.remove(); });
|
|
47789
47797
|
_this.styleButtons.clear();
|
|
47790
47798
|
_this.populateOpsGridFromDefinitions(definitions);
|
|
@@ -47890,6 +47898,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47890
47898
|
_super.prototype.onRemove.call(this);
|
|
47891
47899
|
this.styleOpsGrid = null;
|
|
47892
47900
|
this.styleButtons.clear();
|
|
47901
|
+
this.thumbnailCache.response.clear();
|
|
47902
|
+
this.thumbnailCache.blob.clear();
|
|
47903
|
+
this.thumbnailCache.assumedConfiguration = undefined;
|
|
47893
47904
|
this.map.events.remove("stylechanged", this.onStyleChange);
|
|
47894
47905
|
this.map.events.remove("mapconfigurationchanged", this.onMapConfigurationChange);
|
|
47895
47906
|
};
|
|
@@ -47949,7 +47960,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
47949
47960
|
styleOptionButton.setAttribute("type", "button");
|
|
47950
47961
|
var styleIconImage = new Image();
|
|
47951
47962
|
fetchIconPromise
|
|
47952
|
-
.then(function (response) {
|
|
47963
|
+
.then(function (response) {
|
|
47964
|
+
if (_this.thumbnailCache.blob.has(response.url)) {
|
|
47965
|
+
return _this.thumbnailCache.blob.get(response.url);
|
|
47966
|
+
}
|
|
47967
|
+
else {
|
|
47968
|
+
// we need the response.clone() to allow reading over body multiple times since response objects are cached
|
|
47969
|
+
// and can be reused across multiple invocations
|
|
47970
|
+
var blobPromise = response.clone().blob();
|
|
47971
|
+
_this.thumbnailCache.blob.set(response.url, blobPromise);
|
|
47972
|
+
return blobPromise;
|
|
47973
|
+
}
|
|
47974
|
+
})
|
|
47953
47975
|
.then(function (blob) {
|
|
47954
47976
|
var iconUrl = URL.createObjectURL(blob);
|
|
47955
47977
|
styleIconImage.src = iconUrl;
|
|
@@ -48057,7 +48079,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
48057
48079
|
if (mapServiceOptions.transformRequest) {
|
|
48058
48080
|
merge_1(requestParams, mapServiceOptions.transformRequest(requestParams.url, "Thumbnail"));
|
|
48059
48081
|
}
|
|
48060
|
-
var fetchThumbnailPromise
|
|
48082
|
+
var fetchThumbnailPromise;
|
|
48083
|
+
if (_this.thumbnailCache.response.has(requestParams.url)) {
|
|
48084
|
+
fetchThumbnailPromise = Promise.resolve(_this.thumbnailCache.response.get(requestParams.url));
|
|
48085
|
+
}
|
|
48086
|
+
else {
|
|
48087
|
+
fetchThumbnailPromise = fetch(requestParams.url, { headers: requestParams.headers });
|
|
48088
|
+
_this.thumbnailCache.response.set(requestParams.url, fetchThumbnailPromise);
|
|
48089
|
+
}
|
|
48061
48090
|
// Add button for each style
|
|
48062
48091
|
var styleOptionButton = _this.buildSelectStyleBtn(style.name, definitions, fetchThumbnailPromise);
|
|
48063
48092
|
_this.styleOpsGrid.appendChild(styleOptionButton);
|
|
@@ -53335,7 +53364,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
53335
53364
|
};
|
|
53336
53365
|
ZoomControl.prototype.updateZoomButtonsState = function () {
|
|
53337
53366
|
var zoomInDisabled = this.map.getCamera().zoom >= this.map._getMap().getMaxZoom();
|
|
53338
|
-
// small values need special handling, since depending on the height of the map view
|
|
53367
|
+
// small values need special handling, since depending on the height of the map view
|
|
53339
53368
|
// the actual zoom we can zoom out to can be above or below 0 when the entire map fits the height into the view
|
|
53340
53369
|
// use web mercator bounds to check if entire latitude range is visible
|
|
53341
53370
|
var reachedLatitudeBoundaries = BoundingBox.getSouth(this.map.getCamera().bounds) <= -WEBMERCATOR_MAXLAT
|
|
@@ -53347,7 +53376,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
53347
53376
|
}
|
|
53348
53377
|
if (this.zoomOutButton && this.zoomOutButton.disabled != zoomOutDisabled) {
|
|
53349
53378
|
this.zoomOutButton.disabled = zoomOutDisabled;
|
|
53350
|
-
this.
|
|
53379
|
+
this.zoomOutButton.setAttribute("aria-label", zoomInDisabled ? "Zoom Out disabled" : "Zoom Out");
|
|
53351
53380
|
}
|
|
53352
53381
|
};
|
|
53353
53382
|
ZoomControl.prototype.constructZoomInButton = function (map) {
|
|
@@ -54616,44 +54645,58 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54616
54645
|
var _this = _super.call(this, id) || this;
|
|
54617
54646
|
_this.accessibleIndicator = [];
|
|
54618
54647
|
_this.setAccessibleIndicator = function () { return __awaiter$1(_this, void 0, void 0, function () {
|
|
54619
|
-
var
|
|
54648
|
+
var renderedShapes, createIndicator, insertHiddenBefore, insertHiddenInFront, attach;
|
|
54620
54649
|
var _this = this;
|
|
54621
54650
|
return __generator$1(this, function (_a) {
|
|
54622
54651
|
this.accessibleIndicator.forEach(function (indicator) { return indicator.remove(); });
|
|
54623
54652
|
this.accessibleIndicator = [];
|
|
54624
|
-
|
|
54625
|
-
createIndicator = function (
|
|
54626
|
-
var
|
|
54627
|
-
var
|
|
54653
|
+
renderedShapes = this.map.layers.getRenderedShapes(this.map.getCamera().bounds, this);
|
|
54654
|
+
createIndicator = function (renderedShapes, idx) {
|
|
54655
|
+
var curRenderedShape = renderedShapes[idx];
|
|
54656
|
+
var bubbleFeature = curRenderedShape instanceof Shape ? curRenderedShape.toJson() : curRenderedShape;
|
|
54657
|
+
var indicator = new AccessibleIndicator({ positionInSet: idx + 1, setSize: renderedShapes.length });
|
|
54628
54658
|
var element = indicator.getElement();
|
|
54629
|
-
var _a = __read$3(_this.map.positionsToPixels([bubbleFeature.
|
|
54659
|
+
var _a = __read$3(_this.map.positionsToPixels([_this.getFirstCoordinate(bubbleFeature.geometry.coordinates)]), 1), pixel = _a[0];
|
|
54630
54660
|
element.addEventListener('focusin', function (event) {
|
|
54631
|
-
_this.accessibleIndicator.filter(function (
|
|
54661
|
+
_this.accessibleIndicator.filter(function (i) { return i !== indicator; }).forEach(function (indicator) { return indicator.remove(); });
|
|
54632
54662
|
// insert previous and next popups
|
|
54633
54663
|
if (idx - 1 >= 0) {
|
|
54634
|
-
insertHiddenBefore(indicator, createIndicator(
|
|
54664
|
+
insertHiddenBefore(indicator, createIndicator(renderedShapes, idx - 1));
|
|
54665
|
+
}
|
|
54666
|
+
if (idx + 1 < renderedShapes.length) {
|
|
54667
|
+
attach(createIndicator(renderedShapes, idx + 1));
|
|
54635
54668
|
}
|
|
54636
|
-
if
|
|
54637
|
-
|
|
54669
|
+
// if we are on boundaries: add the first / last indicator
|
|
54670
|
+
// to maintain indicators on full page navigation cycle
|
|
54671
|
+
if (idx >= 2 && idx == renderedShapes.length - 1) {
|
|
54672
|
+
insertHiddenInFront(createIndicator(renderedShapes, 0));
|
|
54673
|
+
}
|
|
54674
|
+
if (idx == 0 && renderedShapes.length >= 2) {
|
|
54675
|
+
attach(createIndicator(renderedShapes, renderedShapes.length - 1));
|
|
54676
|
+
}
|
|
54677
|
+
// NOTE: a11y only works for AZM shapes for now. (.id and _azureMapsShapeId required)
|
|
54678
|
+
if (bubbleFeature.id !== undefined) {
|
|
54679
|
+
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.id], '#000000', _this.options.strokeColor]);
|
|
54638
54680
|
}
|
|
54639
|
-
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.data.id], '#000000', _this.options.strokeColor]);
|
|
54640
54681
|
var focusEvent = {
|
|
54641
54682
|
target: element,
|
|
54642
54683
|
type: 'focusin',
|
|
54643
54684
|
map: _this.map,
|
|
54644
|
-
shape:
|
|
54685
|
+
shape: curRenderedShape,
|
|
54645
54686
|
originalEvent: event,
|
|
54646
54687
|
pixel: pixel
|
|
54647
54688
|
};
|
|
54648
54689
|
_this._invokeEvent('focusin', focusEvent);
|
|
54649
54690
|
});
|
|
54650
54691
|
element.addEventListener('focusout', function (event) {
|
|
54651
|
-
|
|
54692
|
+
if (bubbleFeature.id !== undefined) {
|
|
54693
|
+
_this.map._getMap().setPaintProperty(_this.id, 'circle-stroke-color', ['case', ['==', ['get', '_azureMapsShapeId'], bubbleFeature.id], _this.options.strokeColor, _this.options.strokeColor]);
|
|
54694
|
+
}
|
|
54652
54695
|
var focusEvent = {
|
|
54653
54696
|
target: element,
|
|
54654
54697
|
type: 'focusout',
|
|
54655
54698
|
map: _this.map,
|
|
54656
|
-
shape:
|
|
54699
|
+
shape: curRenderedShape,
|
|
54657
54700
|
originalEvent: event,
|
|
54658
54701
|
pixel: pixel
|
|
54659
54702
|
};
|
|
@@ -54668,14 +54711,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54668
54711
|
var baseElement = base.getElement();
|
|
54669
54712
|
baseElement.parentElement.insertBefore(elementToSwapIn, baseElement);
|
|
54670
54713
|
};
|
|
54714
|
+
insertHiddenInFront = function (toInsert) {
|
|
54715
|
+
toInsert.attach(_this.map);
|
|
54716
|
+
var elementToSwapIn = toInsert.getElement();
|
|
54717
|
+
var parent = elementToSwapIn.parentElement;
|
|
54718
|
+
parent.insertBefore(elementToSwapIn, parent.firstElementChild);
|
|
54719
|
+
};
|
|
54671
54720
|
attach = function (popup) {
|
|
54672
54721
|
popup.attach(_this.map);
|
|
54673
54722
|
};
|
|
54674
|
-
if (
|
|
54675
|
-
attach(createIndicator(
|
|
54723
|
+
if (renderedShapes.length > 0) {
|
|
54724
|
+
attach(createIndicator(renderedShapes, 0));
|
|
54676
54725
|
}
|
|
54677
|
-
if (
|
|
54678
|
-
attach(createIndicator(
|
|
54726
|
+
if (renderedShapes.length > 1) {
|
|
54727
|
+
attach(createIndicator(renderedShapes, renderedShapes.length - 1));
|
|
54679
54728
|
}
|
|
54680
54729
|
return [2 /*return*/];
|
|
54681
54730
|
});
|
|
@@ -54735,11 +54784,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54735
54784
|
}
|
|
54736
54785
|
};
|
|
54737
54786
|
BubbleLayer.prototype.onRemove = function () {
|
|
54738
|
-
_super.prototype.onRemove.call(this);
|
|
54739
54787
|
if (this.options.createIndicators) {
|
|
54740
54788
|
this.map.events.remove('idle', this.setAccessibleIndicator);
|
|
54741
54789
|
this.map.events.remove('moveend', this.setAccessibleIndicator);
|
|
54742
54790
|
}
|
|
54791
|
+
_super.prototype.onRemove.call(this);
|
|
54743
54792
|
};
|
|
54744
54793
|
/**
|
|
54745
54794
|
* @internal
|
|
@@ -54792,6 +54841,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
54792
54841
|
ids.add(this.options.source);
|
|
54793
54842
|
return ids;
|
|
54794
54843
|
};
|
|
54844
|
+
/**
|
|
54845
|
+
* The coordinates can be nested, so we need to get the first coordinate.
|
|
54846
|
+
* @param coordinates The property from the Geometry. Can be Position, Position[], Position[][], etc.
|
|
54847
|
+
* @returns
|
|
54848
|
+
*/
|
|
54849
|
+
BubbleLayer.prototype.getFirstCoordinate = function (coordinates) {
|
|
54850
|
+
if (!Array.isArray(coordinates[0])) {
|
|
54851
|
+
return coordinates;
|
|
54852
|
+
}
|
|
54853
|
+
return this.getFirstCoordinate(coordinates[0]);
|
|
54854
|
+
};
|
|
54795
54855
|
return BubbleLayer;
|
|
54796
54856
|
}(Layer));
|
|
54797
54857
|
|
|
@@ -78544,7 +78604,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
78544
78604
|
this._removeListener(eventType, target, callback);
|
|
78545
78605
|
}
|
|
78546
78606
|
else {
|
|
78547
|
-
target._removeEventListener(eventType, callback);
|
|
78607
|
+
target === null || target === void 0 ? void 0 : target._removeEventListener(eventType, callback);
|
|
78548
78608
|
}
|
|
78549
78609
|
}
|
|
78550
78610
|
}
|
|
@@ -79354,9 +79414,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
79354
79414
|
LayerManager.prototype.clear = function () {
|
|
79355
79415
|
for (var layerIndexIndex = this.layerIndex.length - 1; layerIndexIndex >= 0; layerIndexIndex--) {
|
|
79356
79416
|
var tempLayer = this.layerIndex[layerIndexIndex];
|
|
79357
|
-
|
|
79358
|
-
|
|
79359
|
-
|
|
79417
|
+
if (tempLayer) {
|
|
79418
|
+
this._removeMapboxLayers(tempLayer, true);
|
|
79419
|
+
this.layerIndex.splice(layerIndexIndex, 1);
|
|
79420
|
+
tempLayer.onRemove();
|
|
79421
|
+
}
|
|
79360
79422
|
}
|
|
79361
79423
|
this.userLayers = [];
|
|
79362
79424
|
};
|
|
@@ -81763,7 +81825,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81763
81825
|
return baseName in styleNamesMap ? styleNamesMap[baseName] : baseName;
|
|
81764
81826
|
};
|
|
81765
81827
|
if (!this.serviceOptions.mapConfiguration) {
|
|
81766
|
-
|
|
81828
|
+
var ensureAuthentication = this.map.authentication ? this.map.authentication.initialize() : Promise.resolve();
|
|
81829
|
+
newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.staticAssetsDomain, constants.stylePath + "/" + constants.styleResourcePath, "StyleDefinitions", { version: _this.serviceOptions.styleDefinitionsVersion }).then(function (definitions) { return ({
|
|
81767
81830
|
version: isNaN(definitions.version) ? 0 : parseFloat(definitions.version),
|
|
81768
81831
|
defaultConfiguration: definitions.defaultStyle,
|
|
81769
81832
|
configurations: definitions.styles
|
|
@@ -81802,12 +81865,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81802
81865
|
protocol: "https"
|
|
81803
81866
|
}).toString(),
|
|
81804
81867
|
}); })
|
|
81805
|
-
}); }));
|
|
81868
|
+
}); }); }));
|
|
81806
81869
|
}
|
|
81807
81870
|
else if (typeof this.serviceOptions.mapConfiguration === 'string') {
|
|
81808
|
-
|
|
81871
|
+
var ensureAuthentication = this.map.authentication ? this.map.authentication.initialize() : Promise.resolve();
|
|
81872
|
+
newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.domain, constants.styleResourcePath + "/mapconfigurations/metadata/" + _this.serviceOptions.mapConfiguration, "StyleDefinitions"
|
|
81809
81873
|
// reassign properties from legacy mapConfiguration to new structure if needed
|
|
81810
|
-
).then(function (definitions) { return (__assign$8(__assign$8({}, definitions), { defaultConfiguration: definitions.defaultConfiguration || definitions['defaultStyle'], configurations: definitions.configurations || definitions['styles'] })); }));
|
|
81874
|
+
).then(function (definitions) { return (__assign$8(__assign$8({}, definitions), { defaultConfiguration: definitions.defaultConfiguration || definitions['defaultStyle'], configurations: definitions.configurations || definitions['styles'] })); }); }));
|
|
81811
81875
|
}
|
|
81812
81876
|
else {
|
|
81813
81877
|
newPromise = HijackablePromise.resolve(this.serviceOptions.mapConfiguration);
|
|
@@ -81931,6 +81995,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
81931
81995
|
*/
|
|
81932
81996
|
StyleManager.prototype._stylePatch = function (previousStyle, nextStyle, preserveLayer, updatePaintProperty, updateLayoutProperty, updateFilter) {
|
|
81933
81997
|
var _this = this;
|
|
81998
|
+
// Skip the style patch if the map has been disposed.
|
|
81999
|
+
if (this.map.isDisposed)
|
|
82000
|
+
return;
|
|
81934
82001
|
// Layers in the next style with default properties that do not align with current StyleOptions
|
|
81935
82002
|
// should be modified before they are applied to the map.
|
|
81936
82003
|
var styleOptions = this.map.getStyle();
|
|
@@ -82038,7 +82105,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82038
82105
|
before = (beforeCandidates.length > 0) ? beforeCandidates[0] : undefined;
|
|
82039
82106
|
}
|
|
82040
82107
|
preserveLayer(userLayer.layer.getId(), before === null || before === void 0 ? void 0 : before.id);
|
|
82041
|
-
_this.map.layers.move(userLayer.layer, userLayer.before);
|
|
82108
|
+
_this.map.layers.move(userLayer.layer.getId(), userLayer.before);
|
|
82042
82109
|
});
|
|
82043
82110
|
this.map.sources._syncSources(nextStyle.sources);
|
|
82044
82111
|
// If there was a previous styledata change event attached, remove it.
|
|
@@ -82481,6 +82548,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82481
82548
|
showLogo: _this.styleOptions.showLogo,
|
|
82482
82549
|
customAttribution: _this.styleOptions.customAttribution
|
|
82483
82550
|
});
|
|
82551
|
+
_this.controls.add(_this.copyrightControl, {
|
|
82552
|
+
position: exports.ControlPosition.NonFixed
|
|
82553
|
+
});
|
|
82484
82554
|
// Initialize state of map
|
|
82485
82555
|
// --> Initialize the authentication manager
|
|
82486
82556
|
var authManInit = _this.authentication ?
|
|
@@ -82508,17 +82578,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82508
82578
|
_this.map.showTileBoundaries = _this.styleOptions.showTileBoundaries;
|
|
82509
82579
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
82510
82580
|
authManInit
|
|
82511
|
-
|
|
82581
|
+
// reuses this.styles.initPromise if initStyleset is already called
|
|
82582
|
+
.then(function () { return _this.styles.definitions(); })
|
|
82512
82583
|
.then(function (definitions) {
|
|
82513
82584
|
// Check that the map hasn't been removed for any reason.
|
|
82514
82585
|
// If so no need to finish styling the map.
|
|
82515
82586
|
if (_this.removed) {
|
|
82516
82587
|
return;
|
|
82517
82588
|
}
|
|
82518
|
-
// Add controls after initStyleset to prevent redundant initStyleset calls
|
|
82519
|
-
_this.controls.add(_this.copyrightControl, {
|
|
82520
|
-
position: exports.ControlPosition.NonFixed
|
|
82521
|
-
});
|
|
82522
82589
|
if (_this.authentication && !_this.authentication.getToken()) {
|
|
82523
82590
|
throw new Error("AuthenticationManager finished initializing, but no token is available");
|
|
82524
82591
|
}
|
|
@@ -82578,6 +82645,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82578
82645
|
}
|
|
82579
82646
|
return _this;
|
|
82580
82647
|
}
|
|
82648
|
+
Object.defineProperty(Map.prototype, "isDisposed", {
|
|
82649
|
+
/**
|
|
82650
|
+
* Returns true if the map has been disposed.
|
|
82651
|
+
*/
|
|
82652
|
+
get: function () {
|
|
82653
|
+
return this.removed;
|
|
82654
|
+
},
|
|
82655
|
+
enumerable: false,
|
|
82656
|
+
configurable: true
|
|
82657
|
+
});
|
|
82581
82658
|
/**
|
|
82582
82659
|
* Returns the HTMLCanvasElement that the map is drawn to.
|
|
82583
82660
|
*/
|
|
@@ -82614,9 +82691,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
82614
82691
|
else {
|
|
82615
82692
|
this.accessibleMapDelegate.removeFromMap();
|
|
82616
82693
|
}
|
|
82617
|
-
|
|
82694
|
+
var shouldReloadStyle = this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration
|
|
82695
|
+
|| this.styles.serviceOptions.staticAssetsDomain !== this.serviceOptions.staticAssetsDomain
|
|
82696
|
+
|| this.styles.serviceOptions.styleDefinitionsVersion !== this.serviceOptions.styleDefinitionsVersion
|
|
82697
|
+
|| this.styles.serviceOptions.domain !== this.serviceOptions.domain
|
|
82698
|
+
|| this.styles.serviceOptions.styleAPIVersion !== this.serviceOptions.styleAPIVersion;
|
|
82699
|
+
// NOTE: only perform a reload when the style dependent properties are changed
|
|
82700
|
+
//|| this.styles.serviceOptions.validateStyle !== this.serviceOptions.validateStyle
|
|
82701
|
+
//|| this.styles.serviceOptions.transformRequest !== this.serviceOptions.transformRequest
|
|
82702
|
+
this.styles.serviceOptions = this.serviceOptions;
|
|
82703
|
+
if (shouldReloadStyle) {
|
|
82618
82704
|
this.styles.initPromise = null;
|
|
82619
|
-
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
82620
82705
|
this.setStyle({});
|
|
82621
82706
|
}
|
|
82622
82707
|
};
|