azure-maps-control 3.1.0 → 3.1.2

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.
@@ -51096,7 +51096,7 @@ uniform ${precision} ${type} u_${name};
51096
51096
  return Url;
51097
51097
  }());
51098
51098
 
51099
- var version = "3.1.0";
51099
+ var version = "3.1.2";
51100
51100
 
51101
51101
  /**
51102
51102
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -64467,6 +64467,12 @@ uniform ${precision} ${type} u_${name};
64467
64467
  * Name of image in sprite to use for drawing image fills. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
64468
64468
  */
64469
64469
  _this.fillPattern = undefined;
64470
+ /**
64471
+ * Whether or not the fill should be antialiased.
64472
+ * Default `true`.
64473
+ * @default true
64474
+ */
64475
+ _this.fillAntialias = true;
64470
64476
  return _this;
64471
64477
  }
64472
64478
  return PolygonLayerOptions;
@@ -64541,6 +64547,7 @@ uniform ${precision} ${type} u_${name};
64541
64547
  this._updatePaintProperty("fill-color", newOptions.fillColor, this.options.fillColor);
64542
64548
  this._updatePaintProperty("fill-opacity", newOptions.fillOpacity, this.options.fillOpacity);
64543
64549
  this._updatePaintProperty("fill-pattern", newOptions.fillPattern, this.options.fillPattern);
64550
+ this._updatePaintProperty("fill-antialias", newOptions.fillAntialias, this.options.fillAntialias);
64544
64551
  }
64545
64552
  this.options = newOptions;
64546
64553
  };
@@ -64558,7 +64565,8 @@ uniform ${precision} ${type} u_${name};
64558
64565
  visibility: this.options.visible ? "visible" : "none"
64559
64566
  },
64560
64567
  paint: {
64561
- "fill-opacity": this.options.fillOpacity
64568
+ "fill-opacity": this.options.fillOpacity,
64569
+ "fill-antialias": this.options.fillAntialias,
64562
64570
  },
64563
64571
  minzoom: this.options.minZoom,
64564
64572
  maxzoom: this.options.maxZoom
@@ -68218,10 +68226,19 @@ uniform ${precision} ${type} u_${name};
68218
68226
  .filter(function (message) { return message; })
68219
68227
  .join("");
68220
68228
  };
68229
+ // Append latitude, longitude and zoom level to feedback link.
68230
+ _this.updateFeedbackLink = function () {
68231
+ var _a;
68232
+ if (_this.feedbackAnchor && _this.map) {
68233
+ var center = (_a = _this.map.getCamera(), _a.center), zoom = _a.zoom;
68234
+ _this.feedbackAnchor.href = "".concat(CopyrightControl.feedbackLink, "&cp=").concat(center[1], "~").concat(center[0], "&lvl=").concat(zoom + 1);
68235
+ }
68236
+ };
68221
68237
  _this.options = new CopyrightControlOptions().merge(options);
68222
68238
  return _this;
68223
68239
  }
68224
68240
  CopyrightControl.prototype.onAdd = function (map) {
68241
+ this.map = map;
68225
68242
  this.container = this.buildContainer(map, exports.ControlStyle.auto);
68226
68243
  this.container.className = "map-copyright";
68227
68244
  this.copyrightDiv = this.buildCopyrightDiv();
@@ -68288,27 +68305,30 @@ uniform ${precision} ${type} u_${name};
68288
68305
  };
68289
68306
  CopyrightControl.prototype.buildFeedbackLink = function () {
68290
68307
  var link = document.createElement("a");
68291
- link.setAttribute("alt", "Give Feedback");
68292
- link.setAttribute("aria-label", "Give Feedback");
68293
- link.href = "https://feedback.azuremaps.com";
68308
+ link.setAttribute("alt", "Provide Map Data Feedback");
68309
+ link.setAttribute("aria-label", "Provide Map Data Feedback");
68310
+ link.href = CopyrightControl.feedbackLink;
68294
68311
  link.target = "_blank";
68295
68312
  link.rel = "noopener";
68296
68313
  link.className = "azure-map-feedback";
68297
68314
  return link;
68298
68315
  };
68299
68316
  CopyrightControl.prototype.addRemoveFeedbackDiv = function (add) {
68317
+ var _a, _b, _c, _d;
68300
68318
  if (add) {
68301
68319
  this.feedbackAnchor = this.buildFeedbackLink();
68302
- this.tooltip = buildAccessibleTooltip("Give Feedback");
68320
+ this.tooltip = buildAccessibleTooltip("Provide Map Data Feedback");
68303
68321
  this.container.appendChild(this.feedbackAnchor);
68304
68322
  this.container.appendChild(this.tooltip);
68305
68323
  positionTooltip(this.tooltip, this.feedbackAnchor);
68324
+ (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.add("moveend", this.updateFeedbackLink);
68306
68325
  }
68307
68326
  else {
68308
68327
  this.feedbackAnchor.remove();
68309
68328
  this.tooltip.remove();
68310
68329
  delete this.tooltip;
68311
68330
  delete this.feedbackAnchor;
68331
+ (_d = (_c = this.map) === null || _c === void 0 ? void 0 : _c.events) === null || _d === void 0 ? void 0 : _d.remove("moveend", this.updateFeedbackLink);
68312
68332
  }
68313
68333
  };
68314
68334
  CopyrightControl.prototype.addRemoveLogo = function (add) {
@@ -68329,6 +68349,7 @@ uniform ${precision} ${type} u_${name};
68329
68349
  delete this.logoAnchor;
68330
68350
  }
68331
68351
  };
68352
+ CopyrightControl.feedbackLink = "https://aka.ms/azuremapsdatafeedback?feedbackep=UrlAzureMapsWebSdk";
68332
68353
  return CopyrightControl;
68333
68354
  }(ControlBase));
68334
68355
 
@@ -72122,10 +72143,10 @@ uniform ${precision} ${type} u_${name};
72122
72143
  */
72123
72144
  _this["enable-accessibility"] = _this.enableAccessibility;
72124
72145
  /**
72125
- * Enable fallback to geocoder for accessibility location, if failed to extract location from vector data.
72146
+ * Enable the fallback to the REST API geocoder for detecting location accessibility if extracting location from vector data fails.
72147
+ * Disabling this option will prevent the generation of geocode API requests but may lead to a lack of location information for screen readers.
72126
72148
  * default: true
72127
72149
  * @default true
72128
- * @internal
72129
72150
  */
72130
72151
  _this.enableAccessibilityLocationFallback = true;
72131
72152
  /**
@@ -51096,7 +51096,7 @@ uniform ${precision} ${type} u_${name};
51096
51096
  return Url;
51097
51097
  }());
51098
51098
 
51099
- var version$2 = "3.1.0";
51099
+ var version$2 = "3.1.2";
51100
51100
 
51101
51101
  /**
51102
51102
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -64467,6 +64467,12 @@ uniform ${precision} ${type} u_${name};
64467
64467
  * Name of image in sprite to use for drawing image fills. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512).
64468
64468
  */
64469
64469
  _this.fillPattern = undefined;
64470
+ /**
64471
+ * Whether or not the fill should be antialiased.
64472
+ * Default `true`.
64473
+ * @default true
64474
+ */
64475
+ _this.fillAntialias = true;
64470
64476
  return _this;
64471
64477
  }
64472
64478
  return PolygonLayerOptions;
@@ -64541,6 +64547,7 @@ uniform ${precision} ${type} u_${name};
64541
64547
  this._updatePaintProperty("fill-color", newOptions.fillColor, this.options.fillColor);
64542
64548
  this._updatePaintProperty("fill-opacity", newOptions.fillOpacity, this.options.fillOpacity);
64543
64549
  this._updatePaintProperty("fill-pattern", newOptions.fillPattern, this.options.fillPattern);
64550
+ this._updatePaintProperty("fill-antialias", newOptions.fillAntialias, this.options.fillAntialias);
64544
64551
  }
64545
64552
  this.options = newOptions;
64546
64553
  };
@@ -64558,7 +64565,8 @@ uniform ${precision} ${type} u_${name};
64558
64565
  visibility: this.options.visible ? "visible" : "none"
64559
64566
  },
64560
64567
  paint: {
64561
- "fill-opacity": this.options.fillOpacity
64568
+ "fill-opacity": this.options.fillOpacity,
64569
+ "fill-antialias": this.options.fillAntialias,
64562
64570
  },
64563
64571
  minzoom: this.options.minZoom,
64564
64572
  maxzoom: this.options.maxZoom
@@ -68218,10 +68226,19 @@ uniform ${precision} ${type} u_${name};
68218
68226
  .filter(function (message) { return message; })
68219
68227
  .join("");
68220
68228
  };
68229
+ // Append latitude, longitude and zoom level to feedback link.
68230
+ _this.updateFeedbackLink = function () {
68231
+ var _a;
68232
+ if (_this.feedbackAnchor && _this.map) {
68233
+ var center = (_a = _this.map.getCamera(), _a.center), zoom = _a.zoom;
68234
+ _this.feedbackAnchor.href = "".concat(CopyrightControl.feedbackLink, "&cp=").concat(center[1], "~").concat(center[0], "&lvl=").concat(zoom + 1);
68235
+ }
68236
+ };
68221
68237
  _this.options = new CopyrightControlOptions().merge(options);
68222
68238
  return _this;
68223
68239
  }
68224
68240
  CopyrightControl.prototype.onAdd = function (map) {
68241
+ this.map = map;
68225
68242
  this.container = this.buildContainer(map, exports.ControlStyle.auto);
68226
68243
  this.container.className = "map-copyright";
68227
68244
  this.copyrightDiv = this.buildCopyrightDiv();
@@ -68288,27 +68305,30 @@ uniform ${precision} ${type} u_${name};
68288
68305
  };
68289
68306
  CopyrightControl.prototype.buildFeedbackLink = function () {
68290
68307
  var link = document.createElement("a");
68291
- link.setAttribute("alt", "Give Feedback");
68292
- link.setAttribute("aria-label", "Give Feedback");
68293
- link.href = "https://feedback.azuremaps.com";
68308
+ link.setAttribute("alt", "Provide Map Data Feedback");
68309
+ link.setAttribute("aria-label", "Provide Map Data Feedback");
68310
+ link.href = CopyrightControl.feedbackLink;
68294
68311
  link.target = "_blank";
68295
68312
  link.rel = "noopener";
68296
68313
  link.className = "azure-map-feedback";
68297
68314
  return link;
68298
68315
  };
68299
68316
  CopyrightControl.prototype.addRemoveFeedbackDiv = function (add) {
68317
+ var _a, _b, _c, _d;
68300
68318
  if (add) {
68301
68319
  this.feedbackAnchor = this.buildFeedbackLink();
68302
- this.tooltip = buildAccessibleTooltip("Give Feedback");
68320
+ this.tooltip = buildAccessibleTooltip("Provide Map Data Feedback");
68303
68321
  this.container.appendChild(this.feedbackAnchor);
68304
68322
  this.container.appendChild(this.tooltip);
68305
68323
  positionTooltip(this.tooltip, this.feedbackAnchor);
68324
+ (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.add("moveend", this.updateFeedbackLink);
68306
68325
  }
68307
68326
  else {
68308
68327
  this.feedbackAnchor.remove();
68309
68328
  this.tooltip.remove();
68310
68329
  delete this.tooltip;
68311
68330
  delete this.feedbackAnchor;
68331
+ (_d = (_c = this.map) === null || _c === void 0 ? void 0 : _c.events) === null || _d === void 0 ? void 0 : _d.remove("moveend", this.updateFeedbackLink);
68312
68332
  }
68313
68333
  };
68314
68334
  CopyrightControl.prototype.addRemoveLogo = function (add) {
@@ -68329,6 +68349,7 @@ uniform ${precision} ${type} u_${name};
68329
68349
  delete this.logoAnchor;
68330
68350
  }
68331
68351
  };
68352
+ CopyrightControl.feedbackLink = "https://aka.ms/azuremapsdatafeedback?feedbackep=UrlAzureMapsWebSdk";
68332
68353
  return CopyrightControl;
68333
68354
  }(ControlBase));
68334
68355
 
@@ -95783,10 +95804,10 @@ uniform ${precision} ${type} u_${name};
95783
95804
  */
95784
95805
  _this["enable-accessibility"] = _this.enableAccessibility;
95785
95806
  /**
95786
- * Enable fallback to geocoder for accessibility location, if failed to extract location from vector data.
95807
+ * Enable the fallback to the REST API geocoder for detecting location accessibility if extracting location from vector data fails.
95808
+ * Disabling this option will prevent the generation of geocode API requests but may lead to a lack of location information for screen readers.
95787
95809
  * default: true
95788
95810
  * @default true
95789
- * @internal
95790
95811
  */
95791
95812
  _this.enableAccessibilityLocationFallback = true;
95792
95813
  /**