azure-maps-control 3.5.0 → 3.6.1
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 +60 -26
- package/dist/atlas-core-bare.js +60 -26
- package/dist/atlas-core-bare.min.js +1 -1
- package/dist/atlas-core-snr.js +60 -26
- package/dist/atlas-core.js +60 -26
- package/dist/atlas-core.min.js +1 -1
- package/dist/atlas-esm.js +60 -26
- package/dist/atlas-esm.min.js +1 -1
- package/dist/atlas.css +1 -3
- package/dist/atlas.js +60 -26
- 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-esm.js
CHANGED
|
@@ -52088,6 +52088,10 @@ var Localizer = /** @class */ (function () {
|
|
|
52088
52088
|
* @param locale The requested culture code.
|
|
52089
52089
|
*/
|
|
52090
52090
|
Localizer.getCode = function (locale) {
|
|
52091
|
+
// If locale is set to 'auto', use the browser's configured language.
|
|
52092
|
+
if (locale.localeCompare("auto", undefined, { sensitivity: "base" }) === 0) {
|
|
52093
|
+
locale = navigator.language;
|
|
52094
|
+
}
|
|
52091
52095
|
var code = CultureCode.parse(locale);
|
|
52092
52096
|
// If the requested culture code includes a sensitive region simply return the original code.
|
|
52093
52097
|
// This is to hopefully reduce the risk or providing bad content to users in a sensitive region.
|
|
@@ -52211,7 +52215,7 @@ var UserAgent = /** @class */ (function () {
|
|
|
52211
52215
|
return UserAgent;
|
|
52212
52216
|
}());
|
|
52213
52217
|
|
|
52214
|
-
var version$3 = "3.
|
|
52218
|
+
var version$3 = "3.6.1";
|
|
52215
52219
|
|
|
52216
52220
|
/**
|
|
52217
52221
|
* A helper class that provides methods for getting various forms of the map controls current version.
|
|
@@ -52825,10 +52829,9 @@ function setMaxParallelImageRequests(maxParallelImageRequests) {
|
|
|
52825
52829
|
* language is explicitly specified when using those parts of the API.
|
|
52826
52830
|
* If a Map is initialized with the language explicitly defined and
|
|
52827
52831
|
* setLanguage hasn't previously been called it will automatically be called by the Map constructor.
|
|
52828
|
-
* @param language The new default language.
|
|
52832
|
+
* @param language The new default language. If set to "auto", the browser's configured language will be used.
|
|
52829
52833
|
*/
|
|
52830
52834
|
function setLanguage(language) {
|
|
52831
|
-
// Find the best fit supported language.
|
|
52832
52835
|
defaultLanguage = Localizer.getCode(language);
|
|
52833
52836
|
hasSetLanguage = true;
|
|
52834
52837
|
}
|
|
@@ -53588,12 +53591,10 @@ var CompassControl = /** @class */ (function (_super) {
|
|
|
53588
53591
|
var expandGrid = function (expanded) {
|
|
53589
53592
|
if (expanded) {
|
|
53590
53593
|
container.classList.add("in-use");
|
|
53591
|
-
grid.setAttribute("aria-hidden", "false");
|
|
53592
53594
|
grid.classList.remove("hidden-accessible-element");
|
|
53593
53595
|
}
|
|
53594
53596
|
else {
|
|
53595
53597
|
container.classList.remove("in-use");
|
|
53596
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53597
53598
|
grid.classList.add("hidden-accessible-element");
|
|
53598
53599
|
}
|
|
53599
53600
|
};
|
|
@@ -53660,7 +53661,6 @@ var CompassControl = /** @class */ (function (_super) {
|
|
|
53660
53661
|
var grid = document.createElement("div");
|
|
53661
53662
|
grid.classList.add("sub-container");
|
|
53662
53663
|
grid.classList.add("hidden-accessible-element");
|
|
53663
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53664
53664
|
var rotationRightButton = this.constructRightRotationButton(map);
|
|
53665
53665
|
var rotationLeftButton = this.constructLeftRotationButton(map);
|
|
53666
53666
|
var tooltipLeft = buildAccessibleTooltip("Rotate Left");
|
|
@@ -53866,12 +53866,10 @@ var PitchControl = /** @class */ (function (_super) {
|
|
|
53866
53866
|
var expandGrid = function (expanded) {
|
|
53867
53867
|
if (expanded) {
|
|
53868
53868
|
container.classList.add("in-use");
|
|
53869
|
-
grid.setAttribute("aria-hidden", "false");
|
|
53870
53869
|
grid.classList.remove("hidden-accessible-element");
|
|
53871
53870
|
}
|
|
53872
53871
|
else {
|
|
53873
53872
|
container.classList.remove("in-use");
|
|
53874
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53875
53873
|
grid.classList.add("hidden-accessible-element");
|
|
53876
53874
|
}
|
|
53877
53875
|
};
|
|
@@ -53956,7 +53954,6 @@ var PitchControl = /** @class */ (function (_super) {
|
|
|
53956
53954
|
var grid = document.createElement("div");
|
|
53957
53955
|
grid.classList.add("sub-container");
|
|
53958
53956
|
grid.classList.add("hidden-accessible-element");
|
|
53959
|
-
grid.setAttribute("aria-hidden", "true");
|
|
53960
53957
|
this.pitchIncrementButton = this.constructPitchIncrementButton(map);
|
|
53961
53958
|
this.pitchDecrementButton = this.constructPitchDecrementButton(map);
|
|
53962
53959
|
var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
|
|
@@ -57773,12 +57770,10 @@ var StyleControl = /** @class */ (function (_super) {
|
|
|
57773
57770
|
var expandGrid = function (expanded) {
|
|
57774
57771
|
if (expanded) {
|
|
57775
57772
|
container.classList.add(StyleControl.Css.inUse);
|
|
57776
|
-
styleOpsGrid.setAttribute("aria-hidden", "false");
|
|
57777
57773
|
styleOpsGrid.classList.remove("hidden-accessible-element");
|
|
57778
57774
|
}
|
|
57779
57775
|
else {
|
|
57780
57776
|
container.classList.remove(StyleControl.Css.inUse);
|
|
57781
|
-
styleOpsGrid.setAttribute("aria-hidden", "true");
|
|
57782
57777
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
57783
57778
|
}
|
|
57784
57779
|
};
|
|
@@ -58004,7 +57999,6 @@ var StyleControl = /** @class */ (function (_super) {
|
|
|
58004
57999
|
}
|
|
58005
58000
|
styleOpsGrid.setAttribute("aria-label", "Style Options");
|
|
58006
58001
|
styleOpsGrid.classList.add("hidden-accessible-element");
|
|
58007
|
-
styleOpsGrid.setAttribute("aria-hidden", "true");
|
|
58008
58002
|
// Once the map's style definition is initialized create a map between style names and icons.
|
|
58009
58003
|
// If a style is one of those to be shown by the style picker also create it's element.
|
|
58010
58004
|
this.map.styles.definitions().then(function (definitions) { return __awaiter$7(_this, void 0, void 0, function () {
|
|
@@ -63253,9 +63247,7 @@ var ZoomControl = /** @class */ (function (_super) {
|
|
|
63253
63247
|
zoomInButton.setAttribute("alt", "Zoom In");
|
|
63254
63248
|
zoomInButton.setAttribute("type", "button");
|
|
63255
63249
|
zoomInButton.addEventListener("click", function () {
|
|
63256
|
-
var _a;
|
|
63257
63250
|
map.setCamera({
|
|
63258
|
-
maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
|
|
63259
63251
|
zoom: map.getCamera().zoom + _this.options.zoomDelta,
|
|
63260
63252
|
duration: ZoomControl.ZOOM_DURATION_MS,
|
|
63261
63253
|
type: "ease",
|
|
@@ -63272,9 +63264,7 @@ var ZoomControl = /** @class */ (function (_super) {
|
|
|
63272
63264
|
zoomOutButton.setAttribute("alt", "Zoom Out");
|
|
63273
63265
|
zoomOutButton.setAttribute("type", "button");
|
|
63274
63266
|
zoomOutButton.addEventListener("click", function () {
|
|
63275
|
-
var _a;
|
|
63276
63267
|
map.setCamera({
|
|
63277
|
-
maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
|
|
63278
63268
|
zoom: map.getCamera().zoom - _this.options.zoomDelta,
|
|
63279
63269
|
duration: ZoomControl.ZOOM_DURATION_MS,
|
|
63280
63270
|
type: "ease",
|
|
@@ -65811,7 +65801,7 @@ var ImageLayer = /** @class */ (function (_super) {
|
|
|
65811
65801
|
*/
|
|
65812
65802
|
ImageLayer.prototype.setOptions = function (options) {
|
|
65813
65803
|
var newOptions = new ImageLayerOptions().merge(this.options, cloneDeepWith$1(options, ImageLayerOptions._cloneCustomizer));
|
|
65814
|
-
var
|
|
65804
|
+
var reloadImage = (typeof options.url === "string" && options.url !== this.getOptions().url);
|
|
65815
65805
|
var coordChanged = (typeof options.coordinates !== "undefined" && options.coordinates !== this.getOptions().coordinates);
|
|
65816
65806
|
if (this.map) {
|
|
65817
65807
|
this._updateBaseProperties(newOptions, this.options);
|
|
@@ -65821,16 +65811,17 @@ var ImageLayer = /** @class */ (function (_super) {
|
|
|
65821
65811
|
this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
|
|
65822
65812
|
this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
|
|
65823
65813
|
this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
|
|
65824
|
-
//
|
|
65825
|
-
// update "as any" to "as maplibregl.ImageSource" after the typing file is updated
|
|
65814
|
+
// Get the image source
|
|
65826
65815
|
var source = this.map._getMap().getSource(this._getSourceId());
|
|
65827
|
-
if
|
|
65816
|
+
// Check if the source exists and if we need to reload the image or if coordinates have changed
|
|
65817
|
+
if (source && (reloadImage || coordChanged)) {
|
|
65818
|
+
// Update the image with the new options
|
|
65828
65819
|
source.updateImage(newOptions);
|
|
65829
65820
|
}
|
|
65830
65821
|
}
|
|
65831
65822
|
this.options = newOptions;
|
|
65832
65823
|
// Modified to update transform if image url or coordinates change
|
|
65833
|
-
if (
|
|
65824
|
+
if (reloadImage) {
|
|
65834
65825
|
this.reloadImage();
|
|
65835
65826
|
}
|
|
65836
65827
|
else if (coordChanged) {
|
|
@@ -68362,6 +68353,7 @@ var Popup = /** @class */ (function (_super) {
|
|
|
68362
68353
|
ele.addEventListener("click", this.close);
|
|
68363
68354
|
ele.classList.add(Popup.Css.close);
|
|
68364
68355
|
ele.setAttribute("aria-label", "close");
|
|
68356
|
+
ele.setAttribute("type", "button");
|
|
68365
68357
|
ele.setAttribute("tabindex", "0");
|
|
68366
68358
|
ele.innerHTML = "×";
|
|
68367
68359
|
return ele;
|
|
@@ -114015,6 +114007,12 @@ var StyleOptions = /** @class */ (function (_super) {
|
|
|
114015
114007
|
* @deprecated use `view` instead.
|
|
114016
114008
|
*/
|
|
114017
114009
|
_this.userRegion = _this.view;
|
|
114010
|
+
/**
|
|
114011
|
+
* Override the default styles for the map elements.
|
|
114012
|
+
* Default `undefined`
|
|
114013
|
+
* @default undefined
|
|
114014
|
+
*/
|
|
114015
|
+
_this.styleOverrides = undefined;
|
|
114018
114016
|
/**
|
|
114019
114017
|
* allows substituting a default MapControl's style transformer with custom one
|
|
114020
114018
|
* 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
|
|
@@ -114152,10 +114150,10 @@ var ServiceOptions = /** @class */ (function (_super) {
|
|
|
114152
114150
|
/**
|
|
114153
114151
|
* Disable telemetry collection
|
|
114154
114152
|
* This option may only be set when initializing the map.
|
|
114155
|
-
* default:
|
|
114156
|
-
* @default
|
|
114153
|
+
* default: true
|
|
114154
|
+
* @default true
|
|
114157
114155
|
*/
|
|
114158
|
-
_this.disableTelemetry =
|
|
114156
|
+
_this.disableTelemetry = true;
|
|
114159
114157
|
/**
|
|
114160
114158
|
* Disable telemetry collection
|
|
114161
114159
|
* This option may only be set when initializing the map.
|
|
@@ -114648,6 +114646,16 @@ var __values$2 = (window && window.__values) || function(o) {
|
|
|
114648
114646
|
};
|
|
114649
114647
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
114650
114648
|
};
|
|
114649
|
+
/**
|
|
114650
|
+
* Mapping of styleOverrides options to style parameter values.
|
|
114651
|
+
*/
|
|
114652
|
+
var styleOverridesMapping = {
|
|
114653
|
+
countryRegion: "cr|bv:0",
|
|
114654
|
+
adminDistrict: "ad|bv:0",
|
|
114655
|
+
adminDistrict2: "ds|bv:0",
|
|
114656
|
+
buildingFootprint: "bld|v:0_adr|lv:0",
|
|
114657
|
+
roadDetails: "g|rasterDetailsVisible:0"
|
|
114658
|
+
};
|
|
114651
114659
|
/**
|
|
114652
114660
|
* @private
|
|
114653
114661
|
*/
|
|
@@ -115158,7 +115166,31 @@ var StyleManager = /** @class */ (function () {
|
|
|
115158
115166
|
return targetStyleWithUserLayers;
|
|
115159
115167
|
};
|
|
115160
115168
|
}
|
|
115161
|
-
|
|
115169
|
+
var styleUrl = targetDefinition.url;
|
|
115170
|
+
if (styleUrl && (styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)) {
|
|
115171
|
+
// Append the st parameter in the url with the mapped value.
|
|
115172
|
+
// We loop through the styleOverrides and join the corresponding st parameter with "_".
|
|
115173
|
+
var url = new URL(styleUrl);
|
|
115174
|
+
var params = new URLSearchParams(url.search);
|
|
115175
|
+
var stParams = Object.entries(styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)
|
|
115176
|
+
.filter(function (_a) {
|
|
115177
|
+
var _b = __read$2(_a, 2), key = _b[0], value = _b[1];
|
|
115178
|
+
return key in styleOverridesMapping &&
|
|
115179
|
+
( // bv stands for borderVisible
|
|
115180
|
+
(styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.borderVisible) === false) ||
|
|
115181
|
+
(!styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.visible) === false));
|
|
115182
|
+
})
|
|
115183
|
+
.map(function (_a) {
|
|
115184
|
+
var _b = __read$2(_a, 2), key = _b[0]; _b[1];
|
|
115185
|
+
return styleOverridesMapping[key];
|
|
115186
|
+
});
|
|
115187
|
+
if (stParams.length > 0) {
|
|
115188
|
+
params.set("st", stParams.join("_"));
|
|
115189
|
+
url.search = params.toString();
|
|
115190
|
+
styleUrl = url.toString();
|
|
115191
|
+
}
|
|
115192
|
+
}
|
|
115193
|
+
this.map._getMap().setStyle(styleUrl || targetDefinition.style, {
|
|
115162
115194
|
diff: diff,
|
|
115163
115195
|
validate: this.serviceOptions.validateStyle,
|
|
115164
115196
|
transformStyle: transformStyleFunc
|
|
@@ -115956,6 +115988,7 @@ var Map$1 = /** @class */ (function (_super) {
|
|
|
115956
115988
|
* Returns the camera's current properties.
|
|
115957
115989
|
*/
|
|
115958
115990
|
Map.prototype.getCamera = function () {
|
|
115991
|
+
var _a;
|
|
115959
115992
|
var southWest = this.map.getBounds().getSouthWest().toArray();
|
|
115960
115993
|
var northEast = this.map.getBounds().getNorthEast().toArray();
|
|
115961
115994
|
var cameraOptions = {
|
|
@@ -115965,7 +115998,8 @@ var Map$1 = /** @class */ (function (_super) {
|
|
|
115965
115998
|
pitch: this.map.getPitch(),
|
|
115966
115999
|
bounds: new BoundingBox(southWest, northEast),
|
|
115967
116000
|
minZoom: this.map.getMinZoom(),
|
|
115968
|
-
maxZoom: this.map.getMaxZoom()
|
|
116001
|
+
maxZoom: this.map.getMaxZoom(),
|
|
116002
|
+
maxBounds: (_a = this.map.getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
|
|
115969
116003
|
};
|
|
115970
116004
|
return cameraOptions;
|
|
115971
116005
|
};
|