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.
@@ -263,7 +263,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
263
263
  return Url;
264
264
  }());
265
265
 
266
- var version = "3.1.1";
266
+ var version = "3.1.2";
267
267
 
268
268
  /**
269
269
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -13665,6 +13665,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13665
13665
  * 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).
13666
13666
  */
13667
13667
  _this.fillPattern = undefined;
13668
+ /**
13669
+ * Whether or not the fill should be antialiased.
13670
+ * Default `true`.
13671
+ * @default true
13672
+ */
13673
+ _this.fillAntialias = true;
13668
13674
  return _this;
13669
13675
  }
13670
13676
  return PolygonLayerOptions;
@@ -13739,6 +13745,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13739
13745
  this._updatePaintProperty("fill-color", newOptions.fillColor, this.options.fillColor);
13740
13746
  this._updatePaintProperty("fill-opacity", newOptions.fillOpacity, this.options.fillOpacity);
13741
13747
  this._updatePaintProperty("fill-pattern", newOptions.fillPattern, this.options.fillPattern);
13748
+ this._updatePaintProperty("fill-antialias", newOptions.fillAntialias, this.options.fillAntialias);
13742
13749
  }
13743
13750
  this.options = newOptions;
13744
13751
  };
@@ -13756,7 +13763,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13756
13763
  visibility: this.options.visible ? "visible" : "none"
13757
13764
  },
13758
13765
  paint: {
13759
- "fill-opacity": this.options.fillOpacity
13766
+ "fill-opacity": this.options.fillOpacity,
13767
+ "fill-antialias": this.options.fillAntialias,
13760
13768
  },
13761
13769
  minzoom: this.options.minZoom,
13762
13770
  maxzoom: this.options.maxZoom
@@ -17416,10 +17424,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17416
17424
  .filter(function (message) { return message; })
17417
17425
  .join("");
17418
17426
  };
17427
+ // Append latitude, longitude and zoom level to feedback link.
17428
+ _this.updateFeedbackLink = function () {
17429
+ var _a;
17430
+ if (_this.feedbackAnchor && _this.map) {
17431
+ var center = (_a = _this.map.getCamera(), _a.center), zoom = _a.zoom;
17432
+ _this.feedbackAnchor.href = "".concat(CopyrightControl.feedbackLink, "&cp=").concat(center[1], "~").concat(center[0], "&lvl=").concat(zoom + 1);
17433
+ }
17434
+ };
17419
17435
  _this.options = new CopyrightControlOptions().merge(options);
17420
17436
  return _this;
17421
17437
  }
17422
17438
  CopyrightControl.prototype.onAdd = function (map) {
17439
+ this.map = map;
17423
17440
  this.container = this.buildContainer(map, exports.ControlStyle.auto);
17424
17441
  this.container.className = "map-copyright";
17425
17442
  this.copyrightDiv = this.buildCopyrightDiv();
@@ -17486,27 +17503,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17486
17503
  };
17487
17504
  CopyrightControl.prototype.buildFeedbackLink = function () {
17488
17505
  var link = document.createElement("a");
17489
- link.setAttribute("alt", "Give Feedback");
17490
- link.setAttribute("aria-label", "Give Feedback");
17491
- link.href = "https://feedback.azuremaps.com";
17506
+ link.setAttribute("alt", "Provide Map Data Feedback");
17507
+ link.setAttribute("aria-label", "Provide Map Data Feedback");
17508
+ link.href = CopyrightControl.feedbackLink;
17492
17509
  link.target = "_blank";
17493
17510
  link.rel = "noopener";
17494
17511
  link.className = "azure-map-feedback";
17495
17512
  return link;
17496
17513
  };
17497
17514
  CopyrightControl.prototype.addRemoveFeedbackDiv = function (add) {
17515
+ var _a, _b, _c, _d;
17498
17516
  if (add) {
17499
17517
  this.feedbackAnchor = this.buildFeedbackLink();
17500
- this.tooltip = buildAccessibleTooltip("Give Feedback");
17518
+ this.tooltip = buildAccessibleTooltip("Provide Map Data Feedback");
17501
17519
  this.container.appendChild(this.feedbackAnchor);
17502
17520
  this.container.appendChild(this.tooltip);
17503
17521
  positionTooltip(this.tooltip, this.feedbackAnchor);
17522
+ (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.add("moveend", this.updateFeedbackLink);
17504
17523
  }
17505
17524
  else {
17506
17525
  this.feedbackAnchor.remove();
17507
17526
  this.tooltip.remove();
17508
17527
  delete this.tooltip;
17509
17528
  delete this.feedbackAnchor;
17529
+ (_d = (_c = this.map) === null || _c === void 0 ? void 0 : _c.events) === null || _d === void 0 ? void 0 : _d.remove("moveend", this.updateFeedbackLink);
17510
17530
  }
17511
17531
  };
17512
17532
  CopyrightControl.prototype.addRemoveLogo = function (add) {
@@ -17527,6 +17547,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17527
17547
  delete this.logoAnchor;
17528
17548
  }
17529
17549
  };
17550
+ CopyrightControl.feedbackLink = "https://aka.ms/azuremapsdatafeedback?feedbackep=UrlAzureMapsWebSdk";
17530
17551
  return CopyrightControl;
17531
17552
  }(ControlBase));
17532
17553
 
@@ -263,7 +263,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
263
263
  return Url;
264
264
  }());
265
265
 
266
- var version$2 = "3.1.1";
266
+ var version$2 = "3.1.2";
267
267
 
268
268
  /**
269
269
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -13665,6 +13665,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13665
13665
  * 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).
13666
13666
  */
13667
13667
  _this.fillPattern = undefined;
13668
+ /**
13669
+ * Whether or not the fill should be antialiased.
13670
+ * Default `true`.
13671
+ * @default true
13672
+ */
13673
+ _this.fillAntialias = true;
13668
13674
  return _this;
13669
13675
  }
13670
13676
  return PolygonLayerOptions;
@@ -13739,6 +13745,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13739
13745
  this._updatePaintProperty("fill-color", newOptions.fillColor, this.options.fillColor);
13740
13746
  this._updatePaintProperty("fill-opacity", newOptions.fillOpacity, this.options.fillOpacity);
13741
13747
  this._updatePaintProperty("fill-pattern", newOptions.fillPattern, this.options.fillPattern);
13748
+ this._updatePaintProperty("fill-antialias", newOptions.fillAntialias, this.options.fillAntialias);
13742
13749
  }
13743
13750
  this.options = newOptions;
13744
13751
  };
@@ -13756,7 +13763,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13756
13763
  visibility: this.options.visible ? "visible" : "none"
13757
13764
  },
13758
13765
  paint: {
13759
- "fill-opacity": this.options.fillOpacity
13766
+ "fill-opacity": this.options.fillOpacity,
13767
+ "fill-antialias": this.options.fillAntialias,
13760
13768
  },
13761
13769
  minzoom: this.options.minZoom,
13762
13770
  maxzoom: this.options.maxZoom
@@ -17416,10 +17424,19 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17416
17424
  .filter(function (message) { return message; })
17417
17425
  .join("");
17418
17426
  };
17427
+ // Append latitude, longitude and zoom level to feedback link.
17428
+ _this.updateFeedbackLink = function () {
17429
+ var _a;
17430
+ if (_this.feedbackAnchor && _this.map) {
17431
+ var center = (_a = _this.map.getCamera(), _a.center), zoom = _a.zoom;
17432
+ _this.feedbackAnchor.href = "".concat(CopyrightControl.feedbackLink, "&cp=").concat(center[1], "~").concat(center[0], "&lvl=").concat(zoom + 1);
17433
+ }
17434
+ };
17419
17435
  _this.options = new CopyrightControlOptions().merge(options);
17420
17436
  return _this;
17421
17437
  }
17422
17438
  CopyrightControl.prototype.onAdd = function (map) {
17439
+ this.map = map;
17423
17440
  this.container = this.buildContainer(map, exports.ControlStyle.auto);
17424
17441
  this.container.className = "map-copyright";
17425
17442
  this.copyrightDiv = this.buildCopyrightDiv();
@@ -17486,27 +17503,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17486
17503
  };
17487
17504
  CopyrightControl.prototype.buildFeedbackLink = function () {
17488
17505
  var link = document.createElement("a");
17489
- link.setAttribute("alt", "Give Feedback");
17490
- link.setAttribute("aria-label", "Give Feedback");
17491
- link.href = "https://feedback.azuremaps.com";
17506
+ link.setAttribute("alt", "Provide Map Data Feedback");
17507
+ link.setAttribute("aria-label", "Provide Map Data Feedback");
17508
+ link.href = CopyrightControl.feedbackLink;
17492
17509
  link.target = "_blank";
17493
17510
  link.rel = "noopener";
17494
17511
  link.className = "azure-map-feedback";
17495
17512
  return link;
17496
17513
  };
17497
17514
  CopyrightControl.prototype.addRemoveFeedbackDiv = function (add) {
17515
+ var _a, _b, _c, _d;
17498
17516
  if (add) {
17499
17517
  this.feedbackAnchor = this.buildFeedbackLink();
17500
- this.tooltip = buildAccessibleTooltip("Give Feedback");
17518
+ this.tooltip = buildAccessibleTooltip("Provide Map Data Feedback");
17501
17519
  this.container.appendChild(this.feedbackAnchor);
17502
17520
  this.container.appendChild(this.tooltip);
17503
17521
  positionTooltip(this.tooltip, this.feedbackAnchor);
17522
+ (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.add("moveend", this.updateFeedbackLink);
17504
17523
  }
17505
17524
  else {
17506
17525
  this.feedbackAnchor.remove();
17507
17526
  this.tooltip.remove();
17508
17527
  delete this.tooltip;
17509
17528
  delete this.feedbackAnchor;
17529
+ (_d = (_c = this.map) === null || _c === void 0 ? void 0 : _c.events) === null || _d === void 0 ? void 0 : _d.remove("moveend", this.updateFeedbackLink);
17510
17530
  }
17511
17531
  };
17512
17532
  CopyrightControl.prototype.addRemoveLogo = function (add) {
@@ -17527,6 +17547,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17527
17547
  delete this.logoAnchor;
17528
17548
  }
17529
17549
  };
17550
+ CopyrightControl.feedbackLink = "https://aka.ms/azuremapsdatafeedback?feedbackep=UrlAzureMapsWebSdk";
17530
17551
  return CopyrightControl;
17531
17552
  }(ControlBase));
17532
17553