azure-maps-control 3.1.1 → 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.
package/dist/atlas-esm.js CHANGED
@@ -51090,7 +51090,7 @@ var Url = /** @class */ (function () {
51090
51090
  return Url;
51091
51091
  }());
51092
51092
 
51093
- var version$3 = "3.1.1";
51093
+ var version$3 = "3.1.2";
51094
51094
 
51095
51095
  /**
51096
51096
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -64461,6 +64461,12 @@ var PolygonLayerOptions$1 = /** @class */ (function (_super) {
64461
64461
  * 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).
64462
64462
  */
64463
64463
  _this.fillPattern = undefined;
64464
+ /**
64465
+ * Whether or not the fill should be antialiased.
64466
+ * Default `true`.
64467
+ * @default true
64468
+ */
64469
+ _this.fillAntialias = true;
64464
64470
  return _this;
64465
64471
  }
64466
64472
  return PolygonLayerOptions;
@@ -64535,6 +64541,7 @@ var PolygonLayer = /** @class */ (function (_super) {
64535
64541
  this._updatePaintProperty("fill-color", newOptions.fillColor, this.options.fillColor);
64536
64542
  this._updatePaintProperty("fill-opacity", newOptions.fillOpacity, this.options.fillOpacity);
64537
64543
  this._updatePaintProperty("fill-pattern", newOptions.fillPattern, this.options.fillPattern);
64544
+ this._updatePaintProperty("fill-antialias", newOptions.fillAntialias, this.options.fillAntialias);
64538
64545
  }
64539
64546
  this.options = newOptions;
64540
64547
  };
@@ -64552,7 +64559,8 @@ var PolygonLayer = /** @class */ (function (_super) {
64552
64559
  visibility: this.options.visible ? "visible" : "none"
64553
64560
  },
64554
64561
  paint: {
64555
- "fill-opacity": this.options.fillOpacity
64562
+ "fill-opacity": this.options.fillOpacity,
64563
+ "fill-antialias": this.options.fillAntialias,
64556
64564
  },
64557
64565
  minzoom: this.options.minZoom,
64558
64566
  maxzoom: this.options.maxZoom
@@ -87683,10 +87691,19 @@ var CopyrightControl = /** @class */ (function (_super) {
87683
87691
  .filter(function (message) { return message; })
87684
87692
  .join("");
87685
87693
  };
87694
+ // Append latitude, longitude and zoom level to feedback link.
87695
+ _this.updateFeedbackLink = function () {
87696
+ var _a;
87697
+ if (_this.feedbackAnchor && _this.map) {
87698
+ var center = (_a = _this.map.getCamera(), _a.center), zoom = _a.zoom;
87699
+ _this.feedbackAnchor.href = "".concat(CopyrightControl.feedbackLink, "&cp=").concat(center[1], "~").concat(center[0], "&lvl=").concat(zoom + 1);
87700
+ }
87701
+ };
87686
87702
  _this.options = new CopyrightControlOptions().merge(options);
87687
87703
  return _this;
87688
87704
  }
87689
87705
  CopyrightControl.prototype.onAdd = function (map) {
87706
+ this.map = map;
87690
87707
  this.container = this.buildContainer(map, ControlStyle.auto);
87691
87708
  this.container.className = "map-copyright";
87692
87709
  this.copyrightDiv = this.buildCopyrightDiv();
@@ -87753,27 +87770,30 @@ var CopyrightControl = /** @class */ (function (_super) {
87753
87770
  };
87754
87771
  CopyrightControl.prototype.buildFeedbackLink = function () {
87755
87772
  var link = document.createElement("a");
87756
- link.setAttribute("alt", "Give Feedback");
87757
- link.setAttribute("aria-label", "Give Feedback");
87758
- link.href = "https://feedback.azuremaps.com";
87773
+ link.setAttribute("alt", "Provide Map Data Feedback");
87774
+ link.setAttribute("aria-label", "Provide Map Data Feedback");
87775
+ link.href = CopyrightControl.feedbackLink;
87759
87776
  link.target = "_blank";
87760
87777
  link.rel = "noopener";
87761
87778
  link.className = "azure-map-feedback";
87762
87779
  return link;
87763
87780
  };
87764
87781
  CopyrightControl.prototype.addRemoveFeedbackDiv = function (add) {
87782
+ var _a, _b, _c, _d;
87765
87783
  if (add) {
87766
87784
  this.feedbackAnchor = this.buildFeedbackLink();
87767
- this.tooltip = buildAccessibleTooltip("Give Feedback");
87785
+ this.tooltip = buildAccessibleTooltip("Provide Map Data Feedback");
87768
87786
  this.container.appendChild(this.feedbackAnchor);
87769
87787
  this.container.appendChild(this.tooltip);
87770
87788
  positionTooltip(this.tooltip, this.feedbackAnchor);
87789
+ (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.add("moveend", this.updateFeedbackLink);
87771
87790
  }
87772
87791
  else {
87773
87792
  this.feedbackAnchor.remove();
87774
87793
  this.tooltip.remove();
87775
87794
  delete this.tooltip;
87776
87795
  delete this.feedbackAnchor;
87796
+ (_d = (_c = this.map) === null || _c === void 0 ? void 0 : _c.events) === null || _d === void 0 ? void 0 : _d.remove("moveend", this.updateFeedbackLink);
87777
87797
  }
87778
87798
  };
87779
87799
  CopyrightControl.prototype.addRemoveLogo = function (add) {
@@ -87794,6 +87814,7 @@ var CopyrightControl = /** @class */ (function (_super) {
87794
87814
  delete this.logoAnchor;
87795
87815
  }
87796
87816
  };
87817
+ CopyrightControl.feedbackLink = "https://aka.ms/azuremapsdatafeedback?feedbackep=UrlAzureMapsWebSdk";
87797
87818
  return CopyrightControl;
87798
87819
  }(ControlBase));
87799
87820