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-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.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
|
|
|
@@ -60644,7 +60704,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
60644
60704
|
this._removeListener(eventType, target, callback);
|
|
60645
60705
|
}
|
|
60646
60706
|
else {
|
|
60647
|
-
target._removeEventListener(eventType, callback);
|
|
60707
|
+
target === null || target === void 0 ? void 0 : target._removeEventListener(eventType, callback);
|
|
60648
60708
|
}
|
|
60649
60709
|
}
|
|
60650
60710
|
}
|
|
@@ -61454,9 +61514,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
61454
61514
|
LayerManager.prototype.clear = function () {
|
|
61455
61515
|
for (var layerIndexIndex = this.layerIndex.length - 1; layerIndexIndex >= 0; layerIndexIndex--) {
|
|
61456
61516
|
var tempLayer = this.layerIndex[layerIndexIndex];
|
|
61457
|
-
|
|
61458
|
-
|
|
61459
|
-
|
|
61517
|
+
if (tempLayer) {
|
|
61518
|
+
this._removeMapboxLayers(tempLayer, true);
|
|
61519
|
+
this.layerIndex.splice(layerIndexIndex, 1);
|
|
61520
|
+
tempLayer.onRemove();
|
|
61521
|
+
}
|
|
61460
61522
|
}
|
|
61461
61523
|
this.userLayers = [];
|
|
61462
61524
|
};
|
|
@@ -63863,7 +63925,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63863
63925
|
return baseName in styleNamesMap ? styleNamesMap[baseName] : baseName;
|
|
63864
63926
|
};
|
|
63865
63927
|
if (!this.serviceOptions.mapConfiguration) {
|
|
63866
|
-
|
|
63928
|
+
var ensureAuthentication = this.map.authentication ? this.map.authentication.initialize() : Promise.resolve();
|
|
63929
|
+
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 ({
|
|
63867
63930
|
version: isNaN(definitions.version) ? 0 : parseFloat(definitions.version),
|
|
63868
63931
|
defaultConfiguration: definitions.defaultStyle,
|
|
63869
63932
|
configurations: definitions.styles
|
|
@@ -63902,12 +63965,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
63902
63965
|
protocol: "https"
|
|
63903
63966
|
}).toString(),
|
|
63904
63967
|
}); })
|
|
63905
|
-
}); }));
|
|
63968
|
+
}); }); }));
|
|
63906
63969
|
}
|
|
63907
63970
|
else if (typeof this.serviceOptions.mapConfiguration === 'string') {
|
|
63908
|
-
|
|
63971
|
+
var ensureAuthentication = this.map.authentication ? this.map.authentication.initialize() : Promise.resolve();
|
|
63972
|
+
newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.domain, constants.styleResourcePath + "/mapconfigurations/metadata/" + _this.serviceOptions.mapConfiguration, "StyleDefinitions"
|
|
63909
63973
|
// reassign properties from legacy mapConfiguration to new structure if needed
|
|
63910
|
-
).then(function (definitions) { return (__assign$8(__assign$8({}, definitions), { defaultConfiguration: definitions.defaultConfiguration || definitions['defaultStyle'], configurations: definitions.configurations || definitions['styles'] })); }));
|
|
63974
|
+
).then(function (definitions) { return (__assign$8(__assign$8({}, definitions), { defaultConfiguration: definitions.defaultConfiguration || definitions['defaultStyle'], configurations: definitions.configurations || definitions['styles'] })); }); }));
|
|
63911
63975
|
}
|
|
63912
63976
|
else {
|
|
63913
63977
|
newPromise = HijackablePromise.resolve(this.serviceOptions.mapConfiguration);
|
|
@@ -64031,6 +64095,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64031
64095
|
*/
|
|
64032
64096
|
StyleManager.prototype._stylePatch = function (previousStyle, nextStyle, preserveLayer, updatePaintProperty, updateLayoutProperty, updateFilter) {
|
|
64033
64097
|
var _this = this;
|
|
64098
|
+
// Skip the style patch if the map has been disposed.
|
|
64099
|
+
if (this.map.isDisposed)
|
|
64100
|
+
return;
|
|
64034
64101
|
// Layers in the next style with default properties that do not align with current StyleOptions
|
|
64035
64102
|
// should be modified before they are applied to the map.
|
|
64036
64103
|
var styleOptions = this.map.getStyle();
|
|
@@ -64138,7 +64205,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64138
64205
|
before = (beforeCandidates.length > 0) ? beforeCandidates[0] : undefined;
|
|
64139
64206
|
}
|
|
64140
64207
|
preserveLayer(userLayer.layer.getId(), before === null || before === void 0 ? void 0 : before.id);
|
|
64141
|
-
_this.map.layers.move(userLayer.layer, userLayer.before);
|
|
64208
|
+
_this.map.layers.move(userLayer.layer.getId(), userLayer.before);
|
|
64142
64209
|
});
|
|
64143
64210
|
this.map.sources._syncSources(nextStyle.sources);
|
|
64144
64211
|
// If there was a previous styledata change event attached, remove it.
|
|
@@ -64574,6 +64641,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64574
64641
|
showLogo: _this.styleOptions.showLogo,
|
|
64575
64642
|
customAttribution: _this.styleOptions.customAttribution
|
|
64576
64643
|
});
|
|
64644
|
+
_this.controls.add(_this.copyrightControl, {
|
|
64645
|
+
position: exports.ControlPosition.NonFixed
|
|
64646
|
+
});
|
|
64577
64647
|
// Initialize state of map
|
|
64578
64648
|
// --> Initialize the authentication manager
|
|
64579
64649
|
var authManInit = _this.authentication ?
|
|
@@ -64601,17 +64671,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64601
64671
|
_this.map.showTileBoundaries = _this.styleOptions.showTileBoundaries;
|
|
64602
64672
|
_this.localizedStringsPromise = Localizer.getStrings(_this.styleOptions.language);
|
|
64603
64673
|
authManInit
|
|
64604
|
-
|
|
64674
|
+
// reuses this.styles.initPromise if initStyleset is already called
|
|
64675
|
+
.then(function () { return _this.styles.definitions(); })
|
|
64605
64676
|
.then(function (definitions) {
|
|
64606
64677
|
// Check that the map hasn't been removed for any reason.
|
|
64607
64678
|
// If so no need to finish styling the map.
|
|
64608
64679
|
if (_this.removed) {
|
|
64609
64680
|
return;
|
|
64610
64681
|
}
|
|
64611
|
-
// Add controls after initStyleset to prevent redundant initStyleset calls
|
|
64612
|
-
_this.controls.add(_this.copyrightControl, {
|
|
64613
|
-
position: exports.ControlPosition.NonFixed
|
|
64614
|
-
});
|
|
64615
64682
|
if (_this.authentication && !_this.authentication.getToken()) {
|
|
64616
64683
|
throw new Error("AuthenticationManager finished initializing, but no token is available");
|
|
64617
64684
|
}
|
|
@@ -64669,6 +64736,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64669
64736
|
}
|
|
64670
64737
|
return _this;
|
|
64671
64738
|
}
|
|
64739
|
+
Object.defineProperty(Map.prototype, "isDisposed", {
|
|
64740
|
+
/**
|
|
64741
|
+
* Returns true if the map has been disposed.
|
|
64742
|
+
*/
|
|
64743
|
+
get: function () {
|
|
64744
|
+
return this.removed;
|
|
64745
|
+
},
|
|
64746
|
+
enumerable: false,
|
|
64747
|
+
configurable: true
|
|
64748
|
+
});
|
|
64672
64749
|
/**
|
|
64673
64750
|
* Returns the HTMLCanvasElement that the map is drawn to.
|
|
64674
64751
|
*/
|
|
@@ -64705,9 +64782,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
|
|
|
64705
64782
|
else {
|
|
64706
64783
|
this.accessibleMapDelegate.removeFromMap();
|
|
64707
64784
|
}
|
|
64708
|
-
|
|
64785
|
+
var shouldReloadStyle = this.styles.serviceOptions.mapConfiguration !== this.serviceOptions.mapConfiguration
|
|
64786
|
+
|| this.styles.serviceOptions.staticAssetsDomain !== this.serviceOptions.staticAssetsDomain
|
|
64787
|
+
|| this.styles.serviceOptions.styleDefinitionsVersion !== this.serviceOptions.styleDefinitionsVersion
|
|
64788
|
+
|| this.styles.serviceOptions.domain !== this.serviceOptions.domain
|
|
64789
|
+
|| this.styles.serviceOptions.styleAPIVersion !== this.serviceOptions.styleAPIVersion;
|
|
64790
|
+
// NOTE: only perform a reload when the style dependent properties are changed
|
|
64791
|
+
//|| this.styles.serviceOptions.validateStyle !== this.serviceOptions.validateStyle
|
|
64792
|
+
//|| this.styles.serviceOptions.transformRequest !== this.serviceOptions.transformRequest
|
|
64793
|
+
this.styles.serviceOptions = this.serviceOptions;
|
|
64794
|
+
if (shouldReloadStyle) {
|
|
64709
64795
|
this.styles.initPromise = null;
|
|
64710
|
-
this.styles.serviceOptions.mapConfiguration = this.serviceOptions.mapConfiguration;
|
|
64711
64796
|
this.setStyle({});
|
|
64712
64797
|
}
|
|
64713
64798
|
};
|