@syncfusion/ej2-maps 20.4.38 → 20.4.42
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/CHANGELOG.md +2 -0
- package/README.md +1 -1
- package/dist/ej2-maps.min.js +2 -2
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +45 -20
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +45 -20
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/maps/layers/legend.d.ts +1 -0
- package/src/maps/layers/legend.js +42 -18
- package/src/maps/maps.js +1 -1
- package/src/maps/user-interaction/zoom.js +2 -1
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -8541,7 +8541,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8541
8541
|
};
|
|
8542
8542
|
Maps.prototype.removeTileMap = function () {
|
|
8543
8543
|
var animateElement = document.getElementById(this.element.id + '_animated_tiles');
|
|
8544
|
-
if (!isNullOrUndefined(this.currentTiles) && animateElement.childElementCount
|
|
8544
|
+
if (!isNullOrUndefined(this.currentTiles) && animateElement.childElementCount < this.currentTiles.childElementCount) {
|
|
8545
8545
|
for (var l = animateElement.childElementCount - 1; l >= this.currentTiles.childElementCount; l--) {
|
|
8546
8546
|
animateElement.removeChild(animateElement.children[l]);
|
|
8547
8547
|
}
|
|
@@ -12507,12 +12507,13 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12507
12507
|
}
|
|
12508
12508
|
if (targetEle !== null) {
|
|
12509
12509
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
12510
|
-
legendShapeId.setAttribute('fill', '#E5E5E5');
|
|
12511
|
-
if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
|
|
12512
|
-
legendShapeId.setAttribute('stroke', '#E5E5E5');
|
|
12513
|
-
}
|
|
12514
12510
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12515
|
-
|
|
12511
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
12512
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
12513
|
+
}
|
|
12514
|
+
else {
|
|
12515
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[k].shapeSettings.fill);
|
|
12516
|
+
}
|
|
12516
12517
|
}
|
|
12517
12518
|
}
|
|
12518
12519
|
else {
|
|
@@ -12524,12 +12525,11 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12524
12525
|
}
|
|
12525
12526
|
if (targetEle !== null) {
|
|
12526
12527
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
12527
|
-
|
|
12528
|
+
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12529
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
12528
12530
|
if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
|
|
12529
12531
|
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
|
|
12530
12532
|
}
|
|
12531
|
-
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12532
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
12533
12533
|
}
|
|
12534
12534
|
}
|
|
12535
12535
|
}
|
|
@@ -12576,9 +12576,13 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12576
12576
|
}
|
|
12577
12577
|
if (targetEle !== null) {
|
|
12578
12578
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12579
|
-
legendTextId.setAttribute('fill', '#E5E5E5');
|
|
12580
12579
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
12581
|
-
|
|
12580
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
12581
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
12582
|
+
}
|
|
12583
|
+
else {
|
|
12584
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ? this.maps.layers[j].shapeSettings.opacity : this.maps.layers[j].shapeSettings.border.opacity, this.maps.layers[j].shapeSettings.fill);
|
|
12585
|
+
}
|
|
12582
12586
|
}
|
|
12583
12587
|
}
|
|
12584
12588
|
else {
|
|
@@ -12597,9 +12601,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12597
12601
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
12598
12602
|
if (targetEle !== null) {
|
|
12599
12603
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12600
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
12601
12604
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
12602
|
-
legendShapeId.
|
|
12605
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
12603
12606
|
}
|
|
12604
12607
|
}
|
|
12605
12608
|
}
|
|
@@ -12651,9 +12654,13 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12651
12654
|
}
|
|
12652
12655
|
if (targetEle !== null) {
|
|
12653
12656
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
12654
|
-
legendTextId.setAttribute('fill', '#E5E5E5');
|
|
12655
12657
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
12656
|
-
|
|
12658
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
12659
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
12660
|
+
}
|
|
12661
|
+
else {
|
|
12662
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width), (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity), this.maps.layers[k].shapeSettings.fill);
|
|
12663
|
+
}
|
|
12657
12664
|
}
|
|
12658
12665
|
}
|
|
12659
12666
|
else {
|
|
@@ -12666,6 +12673,10 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12666
12673
|
if (targetEle !== null) {
|
|
12667
12674
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
12668
12675
|
legendShapeId.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
12676
|
+
legendShapeId.setAttribute('fill-opacity', this.legendCollection[legendIndex]['opacity']);
|
|
12677
|
+
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['shapeBorder']['color']);
|
|
12678
|
+
legendShapeId.setAttribute('stroke-width', this.legendCollection[legendIndex]['shapeBorder']['width']);
|
|
12679
|
+
legendShapeId.setAttribute('stroke-opacity', this.legendCollection[legendIndex]['shapeBorder']['opacity']);
|
|
12669
12680
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
12670
12681
|
legendTextId.setAttribute('fill', '#757575');
|
|
12671
12682
|
}
|
|
@@ -12714,9 +12725,13 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12714
12725
|
}
|
|
12715
12726
|
if (targetEle !== null) {
|
|
12716
12727
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
12717
|
-
legendShapeId.setAttribute('fill', '#E5E5E5');
|
|
12718
12728
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
12719
|
-
|
|
12729
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
12730
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
12731
|
+
}
|
|
12732
|
+
else {
|
|
12733
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[0].shapeSettings.fill);
|
|
12734
|
+
}
|
|
12720
12735
|
}
|
|
12721
12736
|
}
|
|
12722
12737
|
else {
|
|
@@ -12736,9 +12751,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12736
12751
|
mapLegendElement.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
12737
12752
|
if (targetEle !== null) {
|
|
12738
12753
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
12739
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
12740
12754
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
12741
|
-
legendShapeId.
|
|
12755
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
12742
12756
|
}
|
|
12743
12757
|
}
|
|
12744
12758
|
}
|
|
@@ -12815,6 +12829,16 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12815
12829
|
}
|
|
12816
12830
|
return legendData;
|
|
12817
12831
|
};
|
|
12832
|
+
Legend.prototype.setToggleAttributes = function (textElement, shapeElement, fillColor, fillOpacity, borderColor, borderWidth, borderOpacity, textColor) {
|
|
12833
|
+
textElement.setAttribute('fill', textColor);
|
|
12834
|
+
shapeElement.setAttribute('fill', fillColor);
|
|
12835
|
+
shapeElement.setAttribute('fill-opacity', (fillOpacity).toString());
|
|
12836
|
+
shapeElement.setAttribute('stroke', borderColor);
|
|
12837
|
+
shapeElement.setAttribute('stroke-width', (borderWidth).toString());
|
|
12838
|
+
if (!isNullOrUndefined(borderOpacity)) {
|
|
12839
|
+
shapeElement.setAttribute('stroke-opacity', (borderOpacity).toString());
|
|
12840
|
+
}
|
|
12841
|
+
};
|
|
12818
12842
|
Legend.prototype.legendGradientColor = function (colorMap, legendIndex) {
|
|
12819
12843
|
var legendFillColor;
|
|
12820
12844
|
var xmlns = 'http://www.w3.org/2000/svg';
|
|
@@ -14220,7 +14244,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14220
14244
|
this.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
|
|
14221
14245
|
this.currentLayer = maps.layersCollection[this.index];
|
|
14222
14246
|
var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
|
|
14223
|
-
|
|
14247
|
+
var elementCount = layerElement.childElementCount;
|
|
14248
|
+
for (var j = 0; j < elementCount; j++) {
|
|
14224
14249
|
var currentEle = layerElement.childNodes[j];
|
|
14225
14250
|
if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
|
|
14226
14251
|
&& (!(currentEle.id.indexOf('_dataLableIndex_Group') > -1))) {
|