@syncfusion/ej2-maps 20.3.49 → 20.4.38
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/.eslintrc.json +16 -1
- package/CHANGELOG.md +19 -0
- package/README.md +65 -51
- 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 +1030 -781
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +1017 -772
- 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 +34 -21
- package/src/maps/layers/bing-map.d.ts +1 -0
- package/src/maps/layers/bing-map.js +1 -0
- package/src/maps/layers/bubble.d.ts +4 -0
- package/src/maps/layers/bubble.js +7 -3
- package/src/maps/layers/color-mapping.d.ts +5 -0
- package/src/maps/layers/color-mapping.js +5 -3
- package/src/maps/layers/data-label.d.ts +0 -1
- package/src/maps/layers/data-label.js +13 -14
- package/src/maps/layers/layer-panel.d.ts +7 -7
- package/src/maps/layers/layer-panel.js +119 -72
- package/src/maps/layers/legend.js +30 -25
- package/src/maps/layers/marker.d.ts +13 -0
- package/src/maps/layers/marker.js +133 -115
- package/src/maps/layers/navigation-selected-line.d.ts +5 -0
- package/src/maps/layers/navigation-selected-line.js +70 -65
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +19 -0
- package/src/maps/maps.js +469 -382
- package/src/maps/model/base.js +2 -2
- package/src/maps/model/export-image.d.ts +4 -3
- package/src/maps/model/export-image.js +7 -6
- package/src/maps/model/export-pdf.d.ts +6 -6
- package/src/maps/model/export-pdf.js +8 -7
- package/src/maps/model/interface.d.ts +2 -2
- package/src/maps/model/print.d.ts +4 -2
- package/src/maps/model/print.js +6 -3
- package/src/maps/user-interaction/annotation.js +2 -3
- package/src/maps/user-interaction/highlight.js +37 -13
- package/src/maps/user-interaction/selection.js +4 -2
- package/src/maps/user-interaction/tooltip.js +8 -8
- package/src/maps/user-interaction/zoom.d.ts +5 -0
- package/src/maps/user-interaction/zoom.js +39 -29
- package/src/maps/utils/helper.d.ts +2 -0
- package/src/maps/utils/helper.js +58 -45
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
2
|
-
/* eslint-disable jsdoc/require-param */
|
|
3
1
|
/* eslint-disable no-case-declarations */
|
|
4
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
2
|
import { isNullOrUndefined, extend, createElement, Ajax } from '@syncfusion/ej2-base';
|
|
6
3
|
import { getShapeColor } from '../model/theme';
|
|
7
4
|
import { GeoLocation, isCustomPath, convertGeoToPoint, Point, PathOption, Size, removeElement } from '../utils/helper';
|
|
@@ -35,10 +32,10 @@ var LayerPanel = /** @class */ (function () {
|
|
|
35
32
|
height: areaRect.height
|
|
36
33
|
});
|
|
37
34
|
var parentElement = createElement('div', {
|
|
38
|
-
id: this.mapObject.element.id + '_Tile_SVG_Parent'
|
|
39
|
-
(areaRect.height) + 'px; width: '
|
|
40
|
-
+ (areaRect.width) + 'px;'
|
|
35
|
+
id: this.mapObject.element.id + '_Tile_SVG_Parent'
|
|
41
36
|
});
|
|
37
|
+
parentElement.style.cssText = 'position: absolute; height: ' + (areaRect.height) + 'px; width: ' +
|
|
38
|
+
(areaRect.width) + 'px;';
|
|
42
39
|
parentElement.appendChild(this.tileSvgObject);
|
|
43
40
|
secondaryEle.appendChild(parentElement);
|
|
44
41
|
}
|
|
@@ -92,13 +89,13 @@ var LayerPanel = /** @class */ (function () {
|
|
|
92
89
|
(!isNullOrUndefined(panel.mapObject.tileZoomLevel) && panel.mapObject.tileZoomLevel !== 1)) ?
|
|
93
90
|
false : true;
|
|
94
91
|
if (isNullOrUndefined(panel.mapObject.previousCenterLatitude) &&
|
|
95
|
-
isNullOrUndefined(panel.mapObject.previousCenterLongitude)) {
|
|
92
|
+
isNullOrUndefined(panel.mapObject.previousCenterLongitude) && !panel.mapObject.isZoomByPosition) {
|
|
96
93
|
panel.mapObject.previousCenterLatitude = panel.mapObject.centerPosition.latitude;
|
|
97
94
|
panel.mapObject.previousCenterLongitude = panel.mapObject.centerPosition.longitude;
|
|
98
95
|
}
|
|
99
|
-
else if (panel.mapObject.previousCenterLatitude !==
|
|
96
|
+
else if ((panel.mapObject.previousCenterLatitude !==
|
|
100
97
|
panel.mapObject.centerPosition.latitude && panel.mapObject.previousCenterLongitude !==
|
|
101
|
-
panel.mapObject.centerPosition.longitude) {
|
|
98
|
+
panel.mapObject.centerPosition.longitude) || panel.mapObject.isZoomByPosition) {
|
|
102
99
|
panel.mapObject.centerPositionChanged = true;
|
|
103
100
|
panel.mapObject.previousCenterLatitude = panel.mapObject.centerPosition.latitude;
|
|
104
101
|
panel.mapObject.previousCenterLongitude = panel.mapObject.centerPosition.longitude;
|
|
@@ -110,7 +107,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
110
107
|
var centerTileMap = center;
|
|
111
108
|
if ((this.mapObject.isTileMap && panel.mapObject.markerModule) && panel.mapObject.zoomSettings.enable) {
|
|
112
109
|
panel.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);
|
|
113
|
-
if (!isNullOrUndefined(this.mapObject.markerCenterLatitude) && !isNullOrUndefined(this.mapObject.markerCenterLongitude)
|
|
110
|
+
if (!isNullOrUndefined(this.mapObject.markerCenterLatitude) && !isNullOrUndefined(this.mapObject.markerCenterLongitude)
|
|
111
|
+
&& !panel.mapObject.isZoomByPosition) {
|
|
114
112
|
centerTileMap = new Point(panel.mapObject.markerCenterLongitude, panel.mapObject.markerCenterLatitude);
|
|
115
113
|
}
|
|
116
114
|
}
|
|
@@ -126,7 +124,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
126
124
|
else {
|
|
127
125
|
center = { x: null, y: null };
|
|
128
126
|
}
|
|
129
|
-
var zoomFactorValue = panel.mapObject.zoomSettings.shouldZoomInitially ?
|
|
127
|
+
var zoomFactorValue = (panel.mapObject.zoomSettings.shouldZoomInitially && !panel.mapObject.isZoomByPosition) ?
|
|
130
128
|
isNullOrUndefined(panel.mapObject.markerZoomFactor) ? 1 :
|
|
131
129
|
panel.mapObject.markerZoomFactor : panel.mapObject.zoomSettings.zoomFactor;
|
|
132
130
|
zoomFactorValue = (panel.mapObject.enablePersistence) ? ((isNullOrUndefined(panel.mapObject.mapScaleValue))
|
|
@@ -199,7 +197,10 @@ var LayerPanel = /** @class */ (function () {
|
|
|
199
197
|
panel.mapObject.previousZoomFactor = panel.mapObject.zoomSettings.zoomFactor;
|
|
200
198
|
}
|
|
201
199
|
if (panel.mapObject.navigationLineModule) {
|
|
202
|
-
panel.
|
|
200
|
+
var navigationLineElement = panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex);
|
|
201
|
+
if (!isNullOrUndefined(navigationLineElement)) {
|
|
202
|
+
panel.layerObject.appendChild(navigationLineElement);
|
|
203
|
+
}
|
|
203
204
|
}
|
|
204
205
|
if (panel.mapObject.markerModule) {
|
|
205
206
|
panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
|
|
@@ -267,7 +268,6 @@ var LayerPanel = /** @class */ (function () {
|
|
|
267
268
|
var imageUrl = resource['imageUrl'];
|
|
268
269
|
var subDomains = resource['imageUrlSubdomains'];
|
|
269
270
|
var maxZoom = resource['zoomMax'];
|
|
270
|
-
var markerGroupElement = document.getElementById(proxy_1.mapObject.element.id + '_Markers_Group');
|
|
271
271
|
if (imageUrl !== null && imageUrl !== undefined && imageUrl !== bing_1.imageUrl) {
|
|
272
272
|
bing_1.imageUrl = imageUrl;
|
|
273
273
|
}
|
|
@@ -382,13 +382,13 @@ var LayerPanel = /** @class */ (function () {
|
|
|
382
382
|
var colors = shapeSettings.palette.length > 1 ? shapeSettings.palette : getShapeColor(this.mapObject.theme);
|
|
383
383
|
var labelTemplateEle = createElement('div', {
|
|
384
384
|
id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_Label_Template_Group',
|
|
385
|
-
className: this.mapObject.element.id + '_template'
|
|
386
|
-
styles: 'pointer-events: none; overflow: hidden; position: absolute;' +
|
|
387
|
-
'top:' + this.mapObject.mapAreaRect.y + 'px;' +
|
|
388
|
-
'left:' + this.mapObject.mapAreaRect.x + 'px;' +
|
|
389
|
-
'height:' + this.mapObject.mapAreaRect.height + 'px;' +
|
|
390
|
-
'width:' + this.mapObject.mapAreaRect.width + 'px;'
|
|
385
|
+
className: this.mapObject.element.id + '_template'
|
|
391
386
|
});
|
|
387
|
+
labelTemplateEle.style.cssText = 'pointer-events: none; overflow: hidden; position: absolute;' +
|
|
388
|
+
'top:' + this.mapObject.mapAreaRect.y + 'px;' +
|
|
389
|
+
'left:' + this.mapObject.mapAreaRect.x + 'px;' +
|
|
390
|
+
'height:' + this.mapObject.mapAreaRect.height + 'px;' +
|
|
391
|
+
'width:' + this.mapObject.mapAreaRect.width + 'px;';
|
|
392
392
|
if (this.currentLayer.layerData.length !== 0) {
|
|
393
393
|
var _loop_1 = function (i) {
|
|
394
394
|
var k = void 0;
|
|
@@ -432,8 +432,6 @@ var LayerPanel = /** @class */ (function () {
|
|
|
432
432
|
fill = Object.prototype.toString.call(getShapeColor_1) === '[object Object]' && !isNullOrUndefined(getShapeColor_1['fill'])
|
|
433
433
|
? getShapeColor_1['fill'] : fill;
|
|
434
434
|
if (this_1.currentLayer.shapeSettings.borderColorValuePath || this_1.currentLayer.shapeSettings.borderWidthValuePath) {
|
|
435
|
-
var borderColorValue = this_1.currentLayer.shapeSettings.borderColorValuePath;
|
|
436
|
-
var borderWidthValue = this_1.currentLayer.shapeSettings.borderWidthValuePath;
|
|
437
435
|
k = checkShapeDataFields(
|
|
438
436
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
439
437
|
this_1.currentLayer.dataSource, currentShapeData['property'], this_1.currentLayer.shapeDataPath, this_1.currentLayer.shapePropertyPath, this_1.currentLayer);
|
|
@@ -560,7 +558,9 @@ var LayerPanel = /** @class */ (function () {
|
|
|
560
558
|
case 'Point':
|
|
561
559
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
562
560
|
var pointData = currentShapeData['point'];
|
|
563
|
-
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ?
|
|
561
|
+
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ?
|
|
562
|
+
shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ?
|
|
563
|
+
_this.mapObject.scale : _this.currentFactor);
|
|
564
564
|
circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
|
|
565
565
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
566
566
|
break;
|
|
@@ -570,7 +570,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
570
570
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
571
571
|
var pointData = multiPointData['point'];
|
|
572
572
|
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
|
|
573
|
-
circleOptions = new CircleOption((shapeID +
|
|
573
|
+
circleOptions = new CircleOption((shapeID + '_multiLine_' + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
|
|
574
574
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
575
575
|
_this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
|
|
576
576
|
});
|
|
@@ -603,15 +603,16 @@ var LayerPanel = /** @class */ (function () {
|
|
|
603
603
|
/**
|
|
604
604
|
* layer features as bubble, marker, datalabel, navigation line.
|
|
605
605
|
*
|
|
606
|
-
* @param {
|
|
607
|
-
* @param {
|
|
608
|
-
* @param {
|
|
609
|
-
* @param {
|
|
610
|
-
* @param {
|
|
606
|
+
* @param {Element} groupElement - Specifies the element to append the group.
|
|
607
|
+
* @param {Element} pathEle - Specifies the svg element.
|
|
608
|
+
* @param {string} drawingType - Specifies the data type.
|
|
609
|
+
* @param {any} currentShapeData - Specifies the layer of shapedata.
|
|
610
|
+
* @param {number} index - Specifies the tab index.
|
|
611
611
|
* @returns {void}
|
|
612
612
|
*/
|
|
613
|
+
LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType,
|
|
613
614
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
614
|
-
|
|
615
|
+
currentShapeData, index) {
|
|
615
616
|
var property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
|
|
616
617
|
this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
|
|
617
618
|
var properties;
|
|
@@ -623,10 +624,10 @@ var LayerPanel = /** @class */ (function () {
|
|
|
623
624
|
}
|
|
624
625
|
pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
|
|
625
626
|
(currentShapeData['property'][properties]) : ''));
|
|
626
|
-
pathEle.
|
|
627
|
+
pathEle.tabIndex = this.mapObject.tabIndex + index + 3;
|
|
627
628
|
pathEle.setAttribute('role', '');
|
|
628
629
|
if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
|
|
629
|
-
pathEle.
|
|
630
|
+
pathEle.style.cssText = 'outline:none';
|
|
630
631
|
}
|
|
631
632
|
maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
|
|
632
633
|
if (this.mapObject.toggledShapeElementId) {
|
|
@@ -638,7 +639,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
638
639
|
pathEle.setAttribute('stroke', styleProperty.border.color);
|
|
639
640
|
pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
|
|
640
641
|
pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
|
|
641
|
-
pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
|
|
642
|
+
pathEle.setAttribute('stroke-width', (isNullOrUndefined(styleProperty.border.width) ? 0 : styleProperty.border.width).toString());
|
|
642
643
|
}
|
|
643
644
|
}
|
|
644
645
|
}
|
|
@@ -685,9 +686,9 @@ var LayerPanel = /** @class */ (function () {
|
|
|
685
686
|
this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);
|
|
686
687
|
}
|
|
687
688
|
var group = (this.mapObject.renderer.createGroup({
|
|
688
|
-
id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_dataLableIndex_Group'
|
|
689
|
-
style: 'pointer-events: none;'
|
|
689
|
+
id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_dataLableIndex_Group'
|
|
690
690
|
}));
|
|
691
|
+
group.style.pointerEvents = 'none';
|
|
691
692
|
if (this.mapObject.dataLabelModule && this.currentLayer.dataLabelSettings.visible) {
|
|
692
693
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
693
694
|
var intersect_1 = [];
|
|
@@ -704,8 +705,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
704
705
|
_this.layerObject.appendChild(element);
|
|
705
706
|
});
|
|
706
707
|
if (this.mapObject.markerModule) {
|
|
707
|
-
this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
|
|
708
|
-
|
|
708
|
+
this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor) :
|
|
709
|
+
this.currentFactor), null);
|
|
709
710
|
}
|
|
710
711
|
this.translateLayerElements(this.layerObject, layerIndex);
|
|
711
712
|
this.layerGroup.appendChild(this.layerObject);
|
|
@@ -715,11 +716,11 @@ var LayerPanel = /** @class */ (function () {
|
|
|
715
716
|
*
|
|
716
717
|
* @param {LayerSettings} layer - Specifies the layer
|
|
717
718
|
* @param {number} layerIndex - Specifies the layer index
|
|
718
|
-
* @param {
|
|
719
|
+
* @param {any[]} shape - Specifies the shape
|
|
719
720
|
* @param {Element} group - Specifies the group
|
|
720
721
|
* @param {number} shapeIndex - Specifies the shape index
|
|
721
722
|
* @param {HTMLElement} labelTemplateEle - Specifies the label template element
|
|
722
|
-
* @param {
|
|
723
|
+
* @param {any[]} intersect - Specifies the intersect
|
|
723
724
|
* @returns {void}
|
|
724
725
|
*/
|
|
725
726
|
LayerPanel.prototype.renderLabel = function (layer, layerIndex,
|
|
@@ -818,10 +819,12 @@ var LayerPanel = /** @class */ (function () {
|
|
|
818
819
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
819
820
|
var multiPolygonDatas = [];
|
|
820
821
|
for (var i = 0; i < coordinates.length; i++) {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
822
|
+
for (var j = 0; j < coordinates[i].length; j++) {
|
|
823
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
824
|
+
newData = this.calculatePolygonBox(coordinates[i][j], data, properties);
|
|
825
|
+
if (newData.length > 0) {
|
|
826
|
+
multiPolygonDatas.push(newData);
|
|
827
|
+
}
|
|
825
828
|
}
|
|
826
829
|
}
|
|
827
830
|
multiPolygonDatas['property'] = properties;
|
|
@@ -830,15 +833,15 @@ var LayerPanel = /** @class */ (function () {
|
|
|
830
833
|
this.currentLayer.layerData.push(multiPolygonDatas);
|
|
831
834
|
break;
|
|
832
835
|
case 'linestring':
|
|
833
|
-
var
|
|
836
|
+
var lineExtraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
834
837
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
835
838
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
|
|
836
839
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
837
|
-
coordinates.map(function (points
|
|
840
|
+
coordinates.map(function (points) {
|
|
838
841
|
latitude = points[1];
|
|
839
842
|
longitude = points[0];
|
|
840
843
|
var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
|
|
841
|
-
_this.calculateBox(point,
|
|
844
|
+
_this.calculateBox(point, lineExtraSpace_1);
|
|
842
845
|
newData.push({
|
|
843
846
|
point: point, lat: latitude, lng: longitude
|
|
844
847
|
});
|
|
@@ -851,10 +854,12 @@ var LayerPanel = /** @class */ (function () {
|
|
|
851
854
|
var extraSpaces_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
852
855
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
853
856
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
|
|
857
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
854
858
|
var multiLineData_1 = [];
|
|
855
859
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
856
860
|
coordinates.map(function (multiPoints) {
|
|
857
861
|
newData = [];
|
|
862
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
858
863
|
multiPoints.map(function (points) {
|
|
859
864
|
latitude = points[1];
|
|
860
865
|
longitude = points[0];
|
|
@@ -883,8 +888,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
883
888
|
point: point, type: type, lat: latitude, lng: longitude, property: properties
|
|
884
889
|
});
|
|
885
890
|
break;
|
|
886
|
-
case 'multipoint':
|
|
887
|
-
var
|
|
891
|
+
case 'multipoint':
|
|
892
|
+
var extraSpace_1 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
888
893
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
889
894
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
|
|
890
895
|
(this.currentLayer.shapeSettings.circleRadius * 2);
|
|
@@ -894,7 +899,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
894
899
|
latitude = points[1];
|
|
895
900
|
longitude = points[0];
|
|
896
901
|
var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
|
|
897
|
-
_this.calculateBox(point,
|
|
902
|
+
_this.calculateBox(point, extraSpace_1);
|
|
898
903
|
newData.push({
|
|
899
904
|
point: point, lat: latitude, lng: longitude
|
|
900
905
|
});
|
|
@@ -903,7 +908,6 @@ var LayerPanel = /** @class */ (function () {
|
|
|
903
908
|
newData['type'] = type;
|
|
904
909
|
this.currentLayer.layerData.push(newData);
|
|
905
910
|
break;
|
|
906
|
-
}
|
|
907
911
|
case 'path':
|
|
908
912
|
this.currentLayer.layerData.push({
|
|
909
913
|
point: data['d'], type: type, property: properties
|
|
@@ -913,7 +917,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
913
917
|
};
|
|
914
918
|
LayerPanel.prototype.calculateBox = function (point, extraSpace) {
|
|
915
919
|
if (isNullOrUndefined(this.rectBounds)) {
|
|
916
|
-
this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace,
|
|
920
|
+
this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace,
|
|
921
|
+
y: point.y + extraSpace } };
|
|
917
922
|
}
|
|
918
923
|
else {
|
|
919
924
|
this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x - extraSpace);
|
|
@@ -1037,6 +1042,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1037
1042
|
case 'multilinestring':
|
|
1038
1043
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1039
1044
|
coordinates.map(function (multiPoint, index) {
|
|
1045
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1040
1046
|
multiPoint.map(function (point, index) {
|
|
1041
1047
|
_this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
|
|
1042
1048
|
});
|
|
@@ -1052,6 +1058,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1052
1058
|
_this.calculateRectBox(coordinates, 'point');
|
|
1053
1059
|
break;
|
|
1054
1060
|
case 'multipoint':
|
|
1061
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1055
1062
|
coordinates.map(function (point, index) {
|
|
1056
1063
|
_this.calculateRectBox(point, 'multipoint', index === 0 ? true : false);
|
|
1057
1064
|
});
|
|
@@ -1067,7 +1074,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1067
1074
|
var newData = [];
|
|
1068
1075
|
var bounds = this.mapObject.baseMapBounds;
|
|
1069
1076
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1070
|
-
coordinates.map(function (currentPoint
|
|
1077
|
+
coordinates.map(function (currentPoint) {
|
|
1071
1078
|
var latitude = currentPoint[1];
|
|
1072
1079
|
var longitude = currentPoint[0];
|
|
1073
1080
|
if ((longitude >= bounds.longitude.min && longitude <= bounds.longitude.max)
|
|
@@ -1161,8 +1168,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1161
1168
|
tileI = (tileI % ycount) + ycount;
|
|
1162
1169
|
}
|
|
1163
1170
|
var tile = new Tile(tileI % ycount, j);
|
|
1164
|
-
tile.left = x;
|
|
1165
|
-
tile.top = y;
|
|
1171
|
+
tile.left = Math.round(x);
|
|
1172
|
+
tile.top = Math.round(y);
|
|
1166
1173
|
if (baseLayer.layerType === 'Bing' || (bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
|
|
1167
1174
|
var key = baseLayer.key;
|
|
1168
1175
|
tile.src = bing.getBingMap(tile, key, baseLayer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
|
|
@@ -1209,7 +1216,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1209
1216
|
}
|
|
1210
1217
|
}
|
|
1211
1218
|
}
|
|
1212
|
-
if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset
|
|
1219
|
+
if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset || this.mapObject.isZoomByPosition
|
|
1220
|
+
|| this.mapObject.zoomNotApplied) {
|
|
1213
1221
|
this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
|
|
1214
1222
|
}
|
|
1215
1223
|
};
|
|
@@ -1255,18 +1263,45 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1255
1263
|
animateElement = element ? element.children[0] : null;
|
|
1256
1264
|
}
|
|
1257
1265
|
}
|
|
1258
|
-
var id = 0;
|
|
1259
|
-
|
|
1260
|
-
var imgElement =
|
|
1261
|
-
imgElement.setAttribute('height', '256px');
|
|
1262
|
-
imgElement.setAttribute('width', '256px');
|
|
1263
|
-
imgElement.setAttribute('src', tile.src);
|
|
1264
|
-
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
1266
|
+
for (var id = 0; id < _this.tiles.length; id++) {
|
|
1267
|
+
var tile = _this.tiles[id];
|
|
1268
|
+
var imgElement = null;
|
|
1265
1269
|
var mapId = _this.mapObject.element.id;
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1270
|
+
if (type === 'Pan') {
|
|
1271
|
+
var child = document.getElementById(mapId + '_tile_' + id);
|
|
1272
|
+
var isNewTile = false;
|
|
1273
|
+
if (isNullOrUndefined(child)) {
|
|
1274
|
+
isNewTile = true;
|
|
1275
|
+
child = createElement('div', { id: mapId + '_tile_' + id });
|
|
1276
|
+
imgElement = createElement('img');
|
|
1277
|
+
}
|
|
1278
|
+
else {
|
|
1279
|
+
child.style.removeProperty('display');
|
|
1280
|
+
imgElement = child.children[0];
|
|
1281
|
+
}
|
|
1282
|
+
if (!isNewTile && imgElement && imgElement.src !== tile.src) {
|
|
1283
|
+
imgElement.src = tile.src;
|
|
1269
1284
|
}
|
|
1285
|
+
child.style.position = 'absolute';
|
|
1286
|
+
child.style.left = tile.left + 'px';
|
|
1287
|
+
child.style.top = tile.top + 'px';
|
|
1288
|
+
child.style.height = tile.height + 'px';
|
|
1289
|
+
child.style.width = tile.width + 'px';
|
|
1290
|
+
if (isNewTile) {
|
|
1291
|
+
imgElement.setAttribute('height', '256px');
|
|
1292
|
+
imgElement.setAttribute('width', '256px');
|
|
1293
|
+
imgElement.setAttribute('src', tile.src);
|
|
1294
|
+
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
1295
|
+
child.appendChild(imgElement);
|
|
1296
|
+
animateElement.appendChild(child);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
else {
|
|
1300
|
+
imgElement = createElement('img');
|
|
1301
|
+
imgElement.setAttribute('height', '256px');
|
|
1302
|
+
imgElement.setAttribute('width', '256px');
|
|
1303
|
+
imgElement.setAttribute('src', tile.src);
|
|
1304
|
+
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
1270
1305
|
var child = createElement('div', { id: mapId + '_tile_' + id });
|
|
1271
1306
|
child.style.position = 'absolute';
|
|
1272
1307
|
child.style.left = tile.left + 'px';
|
|
@@ -1277,15 +1312,27 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1277
1312
|
if (animateElement) {
|
|
1278
1313
|
animateElement.appendChild(child);
|
|
1279
1314
|
}
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1315
|
+
}
|
|
1316
|
+
if (id === (_this.tiles.length - 1) && document.getElementById(_this.mapObject.element.id + '_animated_tiles_old')) {
|
|
1317
|
+
removeElement(_this.mapObject.element.id + '_animated_tiles_old');
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
if (!isNullOrUndefined(_this.mapObject.currentTiles)) {
|
|
1321
|
+
for (var l = _this.tiles.length; l < animateElement.childElementCount; l++) {
|
|
1322
|
+
var isExistingElement = false;
|
|
1323
|
+
for (var a = 0; a < _this.mapObject.currentTiles.childElementCount; a++) {
|
|
1324
|
+
if (!isExistingElement &&
|
|
1325
|
+
_this.mapObject.currentTiles.children[a].id === animateElement.children[l].id) {
|
|
1326
|
+
isExistingElement = true;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
if (isExistingElement) {
|
|
1330
|
+
animateElement.children[l].style.display = 'none';
|
|
1283
1331
|
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
_loop_3(tile);
|
|
1332
|
+
else {
|
|
1333
|
+
animateElement.removeChild(animateElement.children[l]);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1289
1336
|
}
|
|
1290
1337
|
}, timeOut);
|
|
1291
1338
|
}
|
|
@@ -154,7 +154,6 @@ var Legend = /** @class */ (function () {
|
|
|
154
154
|
var shapeLocation = [];
|
|
155
155
|
var textLocation = [];
|
|
156
156
|
var legendRectCollection = [];
|
|
157
|
-
var location_1;
|
|
158
157
|
var position = legend.position;
|
|
159
158
|
var labelAction = legend.labelDisplayMode;
|
|
160
159
|
var arrangement = (legend.orientation === 'None') ? ((position === 'Top' || position === 'Bottom')
|
|
@@ -460,7 +459,6 @@ var Legend = /** @class */ (function () {
|
|
|
460
459
|
var spacing = 10;
|
|
461
460
|
var shapeSize = new Size(legend.shapeWidth, legend.shapeHeight);
|
|
462
461
|
var textOptions;
|
|
463
|
-
var renderOptions;
|
|
464
462
|
var render = map.renderer;
|
|
465
463
|
var legendShape = legend.shape;
|
|
466
464
|
if (page >= 0 && page < this.totalPages.length) {
|
|
@@ -486,15 +484,16 @@ var Legend = /** @class */ (function () {
|
|
|
486
484
|
var textId = map.element.id + '_Legend_Text_Index_' + collection['idIndex'];
|
|
487
485
|
var shapeLocation = new Point(collection['Shape']['x'], (collection['Shape']['y'] - pagingArrowPadding));
|
|
488
486
|
var textLocation = new Point(collection['Text']['x'], (collection['Text']['y'] - pagingArrowPadding));
|
|
489
|
-
var
|
|
490
|
-
var renderOptions_1 = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
487
|
+
var renderOptions = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
491
488
|
var legendTextStyle = {
|
|
492
489
|
fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
|
|
493
|
-
fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color,
|
|
490
|
+
fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color,
|
|
491
|
+
opacity: legend.textStyle.opacity
|
|
494
492
|
};
|
|
495
493
|
legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
|
|
496
494
|
this.maps.themeStyle.legendTextColor;
|
|
497
|
-
legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
|
|
495
|
+
legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
|
|
496
|
+
this.maps.themeStyle.fontFamily;
|
|
498
497
|
legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
|
|
499
498
|
if (i === 0) {
|
|
500
499
|
this.renderLegendBorder();
|
|
@@ -504,11 +503,11 @@ var Legend = /** @class */ (function () {
|
|
|
504
503
|
var marker = map.layers[legendShapeData['layerIndex']].markerSettings[legendShapeData['markerIndex']];
|
|
505
504
|
legendShape = !isNullOrUndefined(marker.dataSource[legendShapeData['dataIndex']][marker['shapeValuePath']]) && marker.dataSource[legendShapeData['dataIndex']][marker['shapeValuePath']] !== '' ? marker.dataSource[legendShapeData['dataIndex']][marker['shapeValuePath']] : marker.shape;
|
|
506
505
|
}
|
|
507
|
-
if (legendShape ===
|
|
508
|
-
legendElement.appendChild(drawBalloon(map,
|
|
506
|
+
if (legendShape === 'Balloon') {
|
|
507
|
+
legendElement.appendChild(drawBalloon(map, renderOptions, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
|
|
509
508
|
}
|
|
510
509
|
else {
|
|
511
|
-
legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'],
|
|
510
|
+
legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions));
|
|
512
511
|
}
|
|
513
512
|
var legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
|
|
514
513
|
if (legendRectSize > this.legendBorderRect.width) {
|
|
@@ -543,14 +542,14 @@ var Legend = /** @class */ (function () {
|
|
|
543
542
|
leftPageElement.appendChild(render.drawPath(leftPageOptions));
|
|
544
543
|
var leftRectPageOptions = new RectOption(map.element.id + '_Left_Page_Rect', 'transparent', {}, 1, new Rect(leftPageX - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
|
|
545
544
|
var pathEle = render.drawRectangle(leftRectPageOptions);
|
|
546
|
-
pathEle.
|
|
545
|
+
pathEle.tabIndex = (page + 1) === 1 ? -1 : (map.tabIndex + 1);
|
|
547
546
|
leftPageElement.appendChild(pathEle);
|
|
548
547
|
this.wireEvents(leftPageElement);
|
|
549
548
|
var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
|
|
550
549
|
rightPageElement.appendChild(render.drawPath(rightPageOptions));
|
|
551
550
|
var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect(rightPageX - spacing - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
|
|
552
551
|
pathEle = render.drawRectangle(rightRectPageOptions);
|
|
553
|
-
pathEle.
|
|
552
|
+
pathEle.tabIndex = (page + 1) === this.totalPages.length ? -1 : (map.tabIndex + 2);
|
|
554
553
|
rightPageElement.appendChild(pathEle);
|
|
555
554
|
this.wireEvents(rightPageElement);
|
|
556
555
|
pagingGroup.appendChild(leftPageElement);
|
|
@@ -571,7 +570,7 @@ var Legend = /** @class */ (function () {
|
|
|
571
570
|
'dominant-baseline': ''
|
|
572
571
|
};
|
|
573
572
|
var pagingTextElement = render.createText(pageTextOptions, pagingText);
|
|
574
|
-
pagingTextElement.
|
|
573
|
+
pagingTextElement.style.cssText = 'user-select: none;';
|
|
575
574
|
pagingGroup.appendChild(pagingTextElement);
|
|
576
575
|
this.legendGroup.appendChild(pagingGroup);
|
|
577
576
|
}
|
|
@@ -705,11 +704,14 @@ var Legend = /** @class */ (function () {
|
|
|
705
704
|
this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeElement);
|
|
706
705
|
var shapeItemCount = this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].length - 1;
|
|
707
706
|
var shapeOldFillColor = shapeElement.getAttribute('fill');
|
|
707
|
+
var shapeOldOpacity = shapeElement.getAttribute('fill-opacity');
|
|
708
708
|
this.legendHighlightCollection[length - 1]['shapeOldFillColor'].push(shapeOldFillColor);
|
|
709
|
+
this.legendHighlightCollection[length - 1]['shapeOldOpacity'] = shapeOldOpacity;
|
|
709
710
|
var shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
|
|
711
|
+
var shapeOldFillOpacity = this.legendHighlightCollection[length - 1]['shapeOldOpacity'];
|
|
710
712
|
this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
|
|
711
|
-
this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
712
|
-
this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
713
|
+
this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
714
|
+
this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
713
715
|
}
|
|
714
716
|
else if (value === 'selection') {
|
|
715
717
|
this.legendHighlightCollection = [];
|
|
@@ -774,6 +776,7 @@ var Legend = /** @class */ (function () {
|
|
|
774
776
|
var length = collection.length;
|
|
775
777
|
collection[length - 1]['MapShapeCollection'] = { Elements: [] };
|
|
776
778
|
collection[length - 1]['shapeOldFillColor'] = [];
|
|
779
|
+
collection[length - 1]['shapeOldOpacity'] = null;
|
|
777
780
|
};
|
|
778
781
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
779
782
|
Legend.prototype.removeLegend = function (collection) {
|
|
@@ -785,7 +788,8 @@ var Legend = /** @class */ (function () {
|
|
|
785
788
|
for (var j = 0; j < dataCount; j++) {
|
|
786
789
|
var shapeFillColor = item['legendOldFill'].indexOf('url') !== -1
|
|
787
790
|
? item['shapeOldFillColor'][j] : item['legendOldFill'];
|
|
788
|
-
|
|
791
|
+
var shapeOpacity = !isNullOrUndefined(item['shapeOldOpacity']) ? item['shapeOldOpacity'] : item['shapeOpacity'];
|
|
792
|
+
this.setColor(item['MapShapeCollection']['Elements'][j], shapeFillColor, shapeOpacity, item['shapeOldBorderColor'], item['shapeOldBorderWidth'], 'highlight');
|
|
789
793
|
}
|
|
790
794
|
}
|
|
791
795
|
};
|
|
@@ -977,8 +981,6 @@ var Legend = /** @class */ (function () {
|
|
|
977
981
|
}
|
|
978
982
|
if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
|
|
979
983
|
|| targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
|
|
980
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
981
|
-
var element = this.maps.legendSelectionCollection[selectionEle['SelectionIndex']];
|
|
982
984
|
var multiSelection = 0;
|
|
983
985
|
if (module.enableMultiSelect) {
|
|
984
986
|
for (var i = 0; i < shapeElement['Elements'].length; i++) {
|
|
@@ -1237,7 +1239,8 @@ var Legend = /** @class */ (function () {
|
|
|
1237
1239
|
var legendTitle = legend.title.text;
|
|
1238
1240
|
var textStyle = {
|
|
1239
1241
|
fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
|
|
1240
|
-
fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color,
|
|
1242
|
+
fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color,
|
|
1243
|
+
opacity: legend.titleStyle.opacity
|
|
1241
1244
|
};
|
|
1242
1245
|
var textOptions;
|
|
1243
1246
|
var spacing = 10;
|
|
@@ -1298,7 +1301,8 @@ var Legend = /** @class */ (function () {
|
|
|
1298
1301
|
var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
|
|
1299
1302
|
var locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
|
|
1300
1303
|
if (legend.position === 'Float') {
|
|
1301
|
-
this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) :
|
|
1304
|
+
this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) :
|
|
1305
|
+
new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
|
|
1302
1306
|
this.legendTotalRect = map.mapAreaRect;
|
|
1303
1307
|
}
|
|
1304
1308
|
else {
|
|
@@ -1383,7 +1387,8 @@ var Legend = /** @class */ (function () {
|
|
|
1383
1387
|
_this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
|
|
1384
1388
|
}
|
|
1385
1389
|
else {
|
|
1386
|
-
newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill,
|
|
1390
|
+
newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill,
|
|
1391
|
+
name: text,
|
|
1387
1392
|
shape: (!isNullOrUndefined(marker.shapeValuePath) && !isNullOrUndefined(data[marker.shapeValuePath]) && data[marker.shapeValuePath] !== '') ? data[marker.shapeValuePath] : (_this.maps.legendSettings.useMarkerShape ? marker.shape : _this.maps.legendSettings.shape) });
|
|
1388
1393
|
_this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
|
|
1389
1394
|
}
|
|
@@ -1572,7 +1577,6 @@ var Legend = /** @class */ (function () {
|
|
|
1572
1577
|
if (outOfRangeValues.length === 0) {
|
|
1573
1578
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1574
1579
|
var range_1 = false;
|
|
1575
|
-
var outRange = [];
|
|
1576
1580
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1577
1581
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
1578
1582
|
range_1 = false;
|
|
@@ -1761,7 +1765,6 @@ var Legend = /** @class */ (function () {
|
|
|
1761
1765
|
Legend.prototype.legendClick = function (targetEle) {
|
|
1762
1766
|
var legendShapeId;
|
|
1763
1767
|
var legendTextId;
|
|
1764
|
-
var legendTextColor;
|
|
1765
1768
|
var legendToggleFill = this.maps.legendSettings.toggleLegendSettings.fill;
|
|
1766
1769
|
var legendToggleOpacity = this.maps.legendSettings.toggleLegendSettings.opacity;
|
|
1767
1770
|
var legendToggleBorderColor = this.maps.legendSettings.toggleLegendSettings.border.color;
|
|
@@ -2029,10 +2032,12 @@ var Legend = /** @class */ (function () {
|
|
|
2029
2032
|
this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
|
|
2030
2033
|
}
|
|
2031
2034
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
2032
|
-
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 :
|
|
2035
|
+
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 :
|
|
2036
|
+
this.maps.layers[k].shapeSettings.border.width).toString());
|
|
2033
2037
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
2034
2038
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
2035
|
-
this.maps.layers[k].shapeSettings.opacity :
|
|
2039
|
+
this.maps.layers[k].shapeSettings.opacity :
|
|
2040
|
+
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
2036
2041
|
mapLegendElement.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
2037
2042
|
if (targetEle !== null) {
|
|
2038
2043
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
@@ -2096,7 +2101,7 @@ var Legend = /** @class */ (function () {
|
|
|
2096
2101
|
&& isNaN(shapeData['properties'][shapePath]) ?
|
|
2097
2102
|
shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
|
|
2098
2103
|
if (shapeDataValueCase === dataPathValueCase) {
|
|
2099
|
-
if (shapeData['geometry']['type']
|
|
2104
|
+
if (shapeData['geometry']['type'] !== 'MultiPoint') {
|
|
2100
2105
|
legendData.push({
|
|
2101
2106
|
layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
|
|
2102
2107
|
name: data[dataPath], value: value, pointIndex: -1
|