azure-maps-control 3.5.0 → 3.6.0
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-min.js +1 -1
- package/dist/atlas-core-bare-snr.js +57 -21
- package/dist/atlas-core-bare.js +57 -21
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +57 -21
- package/dist/atlas-core.js +57 -21
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas-esm.js +57 -21
- package/dist/atlas-esm.min.js +1 -1
- package/dist/atlas.css +1 -3
- package/dist/atlas.js +57 -21
- package/dist/atlas.min.css +1 -1
- package/dist/atlas.min.js +1 -1
- package/package.json +5 -5
- package/thirdpartynotices.txt +0 -0
- package/typings/index.d.ts +61 -8
package/dist/atlas.css
CHANGED
|
@@ -949,12 +949,10 @@
|
|
|
949
949
|
.atlas-map .atlas-control-container .sub-container,
|
|
950
950
|
.atlas-map .azure-maps-control-container > .style-options.icons {
|
|
951
951
|
display: flex;
|
|
952
|
+
flex-wrap: wrap;
|
|
952
953
|
flex-direction: row;
|
|
953
954
|
position: relative;
|
|
954
955
|
}
|
|
955
|
-
.atlas-map .azure-maps-control-container > .style-options.icons {
|
|
956
|
-
flex-wrap: wrap;
|
|
957
|
-
}
|
|
958
956
|
.atlas-map .top-left.subcontrol-container {
|
|
959
957
|
position: absolute;
|
|
960
958
|
top: 0;
|
package/dist/atlas.js
CHANGED
|
@@ -52094,6 +52094,10 @@ uniform ${precision} ${type} u_${name};
|
|
|
52094
52094
|
* @param locale The requested culture code.
|
|
52095
52095
|
*/
|
|
52096
52096
|
Localizer.getCode = function (locale) {
|
|
52097
|
+
// If locale is set to 'auto', use the browser's configured language.
|
|
52098
|
+
if (locale.localeCompare("auto", undefined, { sensitivity: "base" }) === 0) {
|
|
52099
|
+
locale = navigator.language;
|
|
52100
|
+
}
|
|
52097
52101
|
var code = CultureCode.parse(locale);
|
|
52098
52102
|
// If the requested culture code includes a sensitive region simply return the original code.
|
|
52099
52103
|
// This is to hopefully reduce the risk or providing bad content to users in a sensitive region.
|
|
@@ -52217,7 +52221,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
52217
52221
|
return UserAgent;
|
|
52218
52222
|
}());
|
|
52219
52223
|
|
|
52220
|
-
var version$3 = "3.
|
|
52224
|
+
var version$3 = "3.6.0";
|
|
52221
52225
|
|
|
52222
52226
|
/**
|
|
52223
52227
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -52831,10 +52835,9 @@ uniform ${precision} ${type} u_${name};
|
|
|
52831
52835
|
* language is explicitly specified when using those parts of the API.
|
|
52832
52836
|
* If a Map is initialized with the language explicitly defined and
|
|
52833
52837
|
* setLanguage hasn't previously been called it will automatically be called by the Map constructor.
|
|
52834
|
-
* @param language The new default language.
|
|
52838
|
+
* @param language The new default language. If set to "auto", the browser's configured language will be used.
|
|
52835
52839
|
*/
|
|
52836
52840
|
function setLanguage(language) {
|
|
52837
|
-
// Find the best fit supported language.
|
|
52838
52841
|
defaultLanguage = Localizer.getCode(language);
|
|
52839
52842
|
hasSetLanguage = true;
|
|
52840
52843
|
}
|
|
@@ -53594,12 +53597,10 @@ uniform ${precision} ${type} u_${name};
|
|
|
53594
53597
|
var expandGrid = function (expanded) {
|
|
53595
53598
|
if (expanded) {
|
|
53596
53599
|
container.classList.add("in-use");
|
|
53597
|
-
grid.setAttribute("aria-hidden", "false");
|
|
53598
53600
|
grid.classList.remove("hidden-accessible-element");
|
|
53599
53601
|
}
|
|
53600
53602
|
else {
|
|
53601
53603
|
container.classList.remove("in-use");
|
|
53602
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53603
53604
|
grid.classList.add("hidden-accessible-element");
|
|
53604
53605
|
}
|
|
53605
53606
|
};
|
|
@@ -53666,7 +53667,6 @@ uniform ${precision} ${type} u_${name};
|
|
|
53666
53667
|
var grid = document.createElement("div");
|
|
53667
53668
|
grid.classList.add("sub-container");
|
|
53668
53669
|
grid.classList.add("hidden-accessible-element");
|
|
53669
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53670
53670
|
var rotationRightButton = this.constructRightRotationButton(map);
|
|
53671
53671
|
var rotationLeftButton = this.constructLeftRotationButton(map);
|
|
53672
53672
|
var tooltipLeft = buildAccessibleTooltip("Rotate Left");
|
|
@@ -53872,12 +53872,10 @@ uniform ${precision} ${type} u_${name};
|
|
|
53872
53872
|
var expandGrid = function (expanded) {
|
|
53873
53873
|
if (expanded) {
|
|
53874
53874
|
container.classList.add("in-use");
|
|
53875
|
-
grid.setAttribute("aria-hidden", "false");
|
|
53876
53875
|
grid.classList.remove("hidden-accessible-element");
|
|
53877
53876
|
}
|
|
53878
53877
|
else {
|
|
53879
53878
|
container.classList.remove("in-use");
|
|
53880
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53881
53879
|
grid.classList.add("hidden-accessible-element");
|
|
53882
53880
|
}
|
|
53883
53881
|
};
|
|
@@ -53962,7 +53960,6 @@ uniform ${precision} ${type} u_${name};
|
|
|
53962
53960
|
var grid = document.createElement("div");
|
|
53963
53961
|
grid.classList.add("sub-container");
|
|
53964
53962
|
grid.classList.add("hidden-accessible-element");
|
|
53965
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53966
53963
|
this.pitchIncrementButton = this.constructPitchIncrementButton(map);
|
|
53967
53964
|
this.pitchDecrementButton = this.constructPitchDecrementButton(map);
|
|
53968
53965
|
var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
|
|
@@ -57779,12 +57776,10 @@ uniform ${precision} ${type} u_${name};
|
|
|
57779
57776
|
var expandGrid = function (expanded) {
|
|
57780
57777
|
if (expanded) {
|
|
57781
57778
|
container.classList.add(StyleControl.Css.inUse);
|
|
57782
|
-
styleOpsGrid.setAttribute("aria-hidden", "false");
|
|
57783
57779
|
styleOpsGrid.classList.remove("hidden-accessible-element");
|
|
57784
57780
|
}
|
|
57785
57781
|
else {
|
|
57786
57782
|
container.classList.remove(StyleControl.Css.inUse);
|
|
57787
|
-
styleOpsGrid.setAttribute("aria-hidden", "true");
|
|
57788
57783
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
57789
57784
|
}
|
|
57790
57785
|
};
|
|
@@ -58010,7 +58005,6 @@ uniform ${precision} ${type} u_${name};
|
|
|
58010
58005
|
}
|
|
58011
58006
|
styleOpsGrid.setAttribute("aria-label", "Style Options");
|
|
58012
58007
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
58013
|
-
styleOpsGrid.setAttribute("aria-hidden", "true");
|
|
58014
58008
|
// Once the map's style definition is initialized create a map between style names and icons.
|
|
58015
58009
|
// If a style is one of those to be shown by the style picker also create it's element.
|
|
58016
58010
|
this.map.styles.definitions().then(function (definitions) { return __awaiter$7(_this, void 0, void 0, function () {
|
|
@@ -65817,7 +65811,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
65817
65811
|
*/
|
|
65818
65812
|
ImageLayer.prototype.setOptions = function (options) {
|
|
65819
65813
|
var newOptions = new ImageLayerOptions().merge(this.options, cloneDeepWith$1(options, ImageLayerOptions._cloneCustomizer));
|
|
65820
|
-
var
|
|
65814
|
+
var reloadImage = (typeof options.url === "string" && options.url !== this.getOptions().url);
|
|
65821
65815
|
var coordChanged = (typeof options.coordinates !== "undefined" && options.coordinates !== this.getOptions().coordinates);
|
|
65822
65816
|
if (this.map) {
|
|
65823
65817
|
this._updateBaseProperties(newOptions, this.options);
|
|
@@ -65827,16 +65821,17 @@ uniform ${precision} ${type} u_${name};
|
|
|
65827
65821
|
this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
|
|
65828
65822
|
this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
|
|
65829
65823
|
this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
|
|
65830
|
-
//
|
|
65831
|
-
// update "as any" to "as maplibregl.ImageSource" after the typing file is updated
|
|
65824
|
+
// Get the image source
|
|
65832
65825
|
var source = this.map._getMap().getSource(this._getSourceId());
|
|
65833
|
-
if
|
|
65826
|
+
// Check if the source exists and if we need to reload the image or if coordinates have changed
|
|
65827
|
+
if (source && (reloadImage || coordChanged)) {
|
|
65828
|
+
// Update the image with the new options
|
|
65834
65829
|
source.updateImage(newOptions);
|
|
65835
65830
|
}
|
|
65836
65831
|
}
|
|
65837
65832
|
this.options = newOptions;
|
|
65838
65833
|
// Modified to update transform if image url or coordinates change
|
|
65839
|
-
if (
|
|
65834
|
+
if (reloadImage) {
|
|
65840
65835
|
this.reloadImage();
|
|
65841
65836
|
}
|
|
65842
65837
|
else if (coordChanged) {
|
|
@@ -68368,6 +68363,7 @@ uniform ${precision} ${type} u_${name};
|
|
|
68368
68363
|
ele.addEventListener("click", this.close);
|
|
68369
68364
|
ele.classList.add(Popup.Css.close);
|
|
68370
68365
|
ele.setAttribute("aria-label", "close");
|
|
68366
|
+
ele.setAttribute("type", "button");
|
|
68371
68367
|
ele.setAttribute("tabindex", "0");
|
|
68372
68368
|
ele.innerHTML = "×";
|
|
68373
68369
|
return ele;
|
|
@@ -114021,6 +114017,12 @@ uniform ${precision} ${type} u_${name};
|
|
|
114021
114017
|
* @deprecated use `view` instead.
|
|
114022
114018
|
*/
|
|
114023
114019
|
_this.userRegion = _this.view;
|
|
114020
|
+
/**
|
|
114021
|
+
* Override the default styles for the map elements.
|
|
114022
|
+
* Default `undefined`
|
|
114023
|
+
* @default undefined
|
|
114024
|
+
*/
|
|
114025
|
+
_this.styleOverrides = undefined;
|
|
114024
114026
|
/**
|
|
114025
114027
|
* allows substituting a default MapControl's style transformer with custom one
|
|
114026
114028
|
* Default style transformer is meant to update the incoming fetched style to desired state, as well as to synchronize the SDK state with style state
|
|
@@ -114158,10 +114160,10 @@ uniform ${precision} ${type} u_${name};
|
|
|
114158
114160
|
/**
|
|
114159
114161
|
* Disable telemetry collection
|
|
114160
114162
|
* This option may only be set when initializing the map.
|
|
114161
|
-
* default:
|
|
114162
|
-
* @default
|
|
114163
|
+
* default: true
|
|
114164
|
+
* @default true
|
|
114163
114165
|
*/
|
|
114164
|
-
_this.disableTelemetry =
|
|
114166
|
+
_this.disableTelemetry = true;
|
|
114165
114167
|
/**
|
|
114166
114168
|
* Disable telemetry collection
|
|
114167
114169
|
* This option may only be set when initializing the map.
|
|
@@ -114654,6 +114656,16 @@ uniform ${precision} ${type} u_${name};
|
|
|
114654
114656
|
};
|
|
114655
114657
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
114656
114658
|
};
|
|
114659
|
+
/**
|
|
114660
|
+
* Mapping of styleOverrides options to style parameter values.
|
|
114661
|
+
*/
|
|
114662
|
+
var styleOverridesMapping = {
|
|
114663
|
+
countryRegion: "cr|bv:0",
|
|
114664
|
+
adminDistrict: "ad|bv:0",
|
|
114665
|
+
adminDistrict2: "ds|bv:0",
|
|
114666
|
+
buildingFootprint: "bld|v:0_adr|lv:0",
|
|
114667
|
+
roadDetails: "g|rasterDetailsVisible:0"
|
|
114668
|
+
};
|
|
114657
114669
|
/**
|
|
114658
114670
|
* @private
|
|
114659
114671
|
*/
|
|
@@ -115164,7 +115176,31 @@ uniform ${precision} ${type} u_${name};
|
|
|
115164
115176
|
return targetStyleWithUserLayers;
|
|
115165
115177
|
};
|
|
115166
115178
|
}
|
|
115167
|
-
|
|
115179
|
+
var styleUrl = targetDefinition.url;
|
|
115180
|
+
if (styleUrl && (styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)) {
|
|
115181
|
+
// Append the st parameter in the url with the mapped value.
|
|
115182
|
+
// We loop through the styleOverrides and join the corresponding st parameter with "_".
|
|
115183
|
+
var url = new URL(styleUrl);
|
|
115184
|
+
var params = new URLSearchParams(url.search);
|
|
115185
|
+
var stParams = Object.entries(styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)
|
|
115186
|
+
.filter(function (_a) {
|
|
115187
|
+
var _b = __read$2(_a, 2), key = _b[0], value = _b[1];
|
|
115188
|
+
return key in styleOverridesMapping &&
|
|
115189
|
+
( // bv stands for borderVisible
|
|
115190
|
+
(styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.borderVisible) === false) ||
|
|
115191
|
+
(!styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.visible) === false));
|
|
115192
|
+
})
|
|
115193
|
+
.map(function (_a) {
|
|
115194
|
+
var _b = __read$2(_a, 2), key = _b[0]; _b[1];
|
|
115195
|
+
return styleOverridesMapping[key];
|
|
115196
|
+
});
|
|
115197
|
+
if (stParams.length > 0) {
|
|
115198
|
+
params.set("st", stParams.join("_"));
|
|
115199
|
+
url.search = params.toString();
|
|
115200
|
+
styleUrl = url.toString();
|
|
115201
|
+
}
|
|
115202
|
+
}
|
|
115203
|
+
this.map._getMap().setStyle(styleUrl || targetDefinition.style, {
|
|
115168
115204
|
diff: diff,
|
|
115169
115205
|
validate: this.serviceOptions.validateStyle,
|
|
115170
115206
|
transformStyle: transformStyleFunc
|