@syncfusion/ej2-maps 20.3.56 → 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 +9 -1
- 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 +915 -722
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +901 -712
- 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 +33 -20
- 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 +5 -12
- package/src/maps/layers/layer-panel.d.ts +7 -7
- package/src/maps/layers/layer-panel.js +98 -53
- package/src/maps/layers/legend.js +19 -19
- package/src/maps/layers/marker.d.ts +13 -0
- package/src/maps/layers/marker.js +124 -107
- package/src/maps/layers/navigation-selected-line.d.ts +5 -0
- package/src/maps/layers/navigation-selected-line.js +111 -104
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +17 -0
- package/src/maps/maps.js +448 -364
- package/src/maps/model/base.js +1 -1
- 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 +0 -2
- package/src/maps/user-interaction/highlight.js +4 -3
- package/src/maps/user-interaction/selection.js +4 -2
- package/src/maps/user-interaction/tooltip.js +5 -5
- package/src/maps/user-interaction/zoom.d.ts +5 -0
- package/src/maps/user-interaction/zoom.js +7 -7
- package/src/maps/utils/helper.d.ts +2 -0
- package/src/maps/utils/helper.js +37 -30
|
@@ -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';
|
|
@@ -200,7 +197,10 @@ var LayerPanel = /** @class */ (function () {
|
|
|
200
197
|
panel.mapObject.previousZoomFactor = panel.mapObject.zoomSettings.zoomFactor;
|
|
201
198
|
}
|
|
202
199
|
if (panel.mapObject.navigationLineModule) {
|
|
203
|
-
panel.
|
|
200
|
+
var navigationLineElement = panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex);
|
|
201
|
+
if (!isNullOrUndefined(navigationLineElement)) {
|
|
202
|
+
panel.layerObject.appendChild(navigationLineElement);
|
|
203
|
+
}
|
|
204
204
|
}
|
|
205
205
|
if (panel.mapObject.markerModule) {
|
|
206
206
|
panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
|
|
@@ -268,7 +268,6 @@ var LayerPanel = /** @class */ (function () {
|
|
|
268
268
|
var imageUrl = resource['imageUrl'];
|
|
269
269
|
var subDomains = resource['imageUrlSubdomains'];
|
|
270
270
|
var maxZoom = resource['zoomMax'];
|
|
271
|
-
var markerGroupElement = document.getElementById(proxy_1.mapObject.element.id + '_Markers_Group');
|
|
272
271
|
if (imageUrl !== null && imageUrl !== undefined && imageUrl !== bing_1.imageUrl) {
|
|
273
272
|
bing_1.imageUrl = imageUrl;
|
|
274
273
|
}
|
|
@@ -433,8 +432,6 @@ var LayerPanel = /** @class */ (function () {
|
|
|
433
432
|
fill = Object.prototype.toString.call(getShapeColor_1) === '[object Object]' && !isNullOrUndefined(getShapeColor_1['fill'])
|
|
434
433
|
? getShapeColor_1['fill'] : fill;
|
|
435
434
|
if (this_1.currentLayer.shapeSettings.borderColorValuePath || this_1.currentLayer.shapeSettings.borderWidthValuePath) {
|
|
436
|
-
var borderColorValue = this_1.currentLayer.shapeSettings.borderColorValuePath;
|
|
437
|
-
var borderWidthValue = this_1.currentLayer.shapeSettings.borderWidthValuePath;
|
|
438
435
|
k = checkShapeDataFields(
|
|
439
436
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
440
437
|
this_1.currentLayer.dataSource, currentShapeData['property'], this_1.currentLayer.shapeDataPath, this_1.currentLayer.shapePropertyPath, this_1.currentLayer);
|
|
@@ -561,7 +558,9 @@ var LayerPanel = /** @class */ (function () {
|
|
|
561
558
|
case 'Point':
|
|
562
559
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
563
560
|
var pointData = currentShapeData['point'];
|
|
564
|
-
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);
|
|
565
564
|
circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
|
|
566
565
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
567
566
|
break;
|
|
@@ -571,7 +570,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
571
570
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
572
571
|
var pointData = multiPointData['point'];
|
|
573
572
|
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
|
|
574
|
-
circleOptions = new CircleOption((shapeID +
|
|
573
|
+
circleOptions = new CircleOption((shapeID + '_multiLine_' + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
|
|
575
574
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
576
575
|
_this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
|
|
577
576
|
});
|
|
@@ -604,15 +603,16 @@ var LayerPanel = /** @class */ (function () {
|
|
|
604
603
|
/**
|
|
605
604
|
* layer features as bubble, marker, datalabel, navigation line.
|
|
606
605
|
*
|
|
607
|
-
* @param {
|
|
608
|
-
* @param {
|
|
609
|
-
* @param {
|
|
610
|
-
* @param {
|
|
611
|
-
* @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.
|
|
612
611
|
* @returns {void}
|
|
613
612
|
*/
|
|
613
|
+
LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType,
|
|
614
614
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
615
|
-
|
|
615
|
+
currentShapeData, index) {
|
|
616
616
|
var property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
|
|
617
617
|
this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
|
|
618
618
|
var properties;
|
|
@@ -639,7 +639,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
639
639
|
pathEle.setAttribute('stroke', styleProperty.border.color);
|
|
640
640
|
pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
|
|
641
641
|
pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
|
|
642
|
-
pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
|
|
642
|
+
pathEle.setAttribute('stroke-width', (isNullOrUndefined(styleProperty.border.width) ? 0 : styleProperty.border.width).toString());
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
645
|
}
|
|
@@ -705,8 +705,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
705
705
|
_this.layerObject.appendChild(element);
|
|
706
706
|
});
|
|
707
707
|
if (this.mapObject.markerModule) {
|
|
708
|
-
this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
|
|
709
|
-
|
|
708
|
+
this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor) :
|
|
709
|
+
this.currentFactor), null);
|
|
710
710
|
}
|
|
711
711
|
this.translateLayerElements(this.layerObject, layerIndex);
|
|
712
712
|
this.layerGroup.appendChild(this.layerObject);
|
|
@@ -716,11 +716,11 @@ var LayerPanel = /** @class */ (function () {
|
|
|
716
716
|
*
|
|
717
717
|
* @param {LayerSettings} layer - Specifies the layer
|
|
718
718
|
* @param {number} layerIndex - Specifies the layer index
|
|
719
|
-
* @param {
|
|
719
|
+
* @param {any[]} shape - Specifies the shape
|
|
720
720
|
* @param {Element} group - Specifies the group
|
|
721
721
|
* @param {number} shapeIndex - Specifies the shape index
|
|
722
722
|
* @param {HTMLElement} labelTemplateEle - Specifies the label template element
|
|
723
|
-
* @param {
|
|
723
|
+
* @param {any[]} intersect - Specifies the intersect
|
|
724
724
|
* @returns {void}
|
|
725
725
|
*/
|
|
726
726
|
LayerPanel.prototype.renderLabel = function (layer, layerIndex,
|
|
@@ -819,10 +819,12 @@ var LayerPanel = /** @class */ (function () {
|
|
|
819
819
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
820
820
|
var multiPolygonDatas = [];
|
|
821
821
|
for (var i = 0; i < coordinates.length; i++) {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
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
|
+
}
|
|
826
828
|
}
|
|
827
829
|
}
|
|
828
830
|
multiPolygonDatas['property'] = properties;
|
|
@@ -831,15 +833,15 @@ var LayerPanel = /** @class */ (function () {
|
|
|
831
833
|
this.currentLayer.layerData.push(multiPolygonDatas);
|
|
832
834
|
break;
|
|
833
835
|
case 'linestring':
|
|
834
|
-
var
|
|
836
|
+
var lineExtraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
835
837
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
836
838
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
|
|
837
839
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
838
|
-
coordinates.map(function (points
|
|
840
|
+
coordinates.map(function (points) {
|
|
839
841
|
latitude = points[1];
|
|
840
842
|
longitude = points[0];
|
|
841
843
|
var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
|
|
842
|
-
_this.calculateBox(point,
|
|
844
|
+
_this.calculateBox(point, lineExtraSpace_1);
|
|
843
845
|
newData.push({
|
|
844
846
|
point: point, lat: latitude, lng: longitude
|
|
845
847
|
});
|
|
@@ -852,10 +854,12 @@ var LayerPanel = /** @class */ (function () {
|
|
|
852
854
|
var extraSpaces_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
853
855
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
854
856
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
|
|
857
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
855
858
|
var multiLineData_1 = [];
|
|
856
859
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
857
860
|
coordinates.map(function (multiPoints) {
|
|
858
861
|
newData = [];
|
|
862
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
859
863
|
multiPoints.map(function (points) {
|
|
860
864
|
latitude = points[1];
|
|
861
865
|
longitude = points[0];
|
|
@@ -884,8 +888,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
884
888
|
point: point, type: type, lat: latitude, lng: longitude, property: properties
|
|
885
889
|
});
|
|
886
890
|
break;
|
|
887
|
-
case 'multipoint':
|
|
888
|
-
var
|
|
891
|
+
case 'multipoint':
|
|
892
|
+
var extraSpace_1 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
889
893
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
890
894
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
|
|
891
895
|
(this.currentLayer.shapeSettings.circleRadius * 2);
|
|
@@ -895,7 +899,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
895
899
|
latitude = points[1];
|
|
896
900
|
longitude = points[0];
|
|
897
901
|
var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
|
|
898
|
-
_this.calculateBox(point,
|
|
902
|
+
_this.calculateBox(point, extraSpace_1);
|
|
899
903
|
newData.push({
|
|
900
904
|
point: point, lat: latitude, lng: longitude
|
|
901
905
|
});
|
|
@@ -904,7 +908,6 @@ var LayerPanel = /** @class */ (function () {
|
|
|
904
908
|
newData['type'] = type;
|
|
905
909
|
this.currentLayer.layerData.push(newData);
|
|
906
910
|
break;
|
|
907
|
-
}
|
|
908
911
|
case 'path':
|
|
909
912
|
this.currentLayer.layerData.push({
|
|
910
913
|
point: data['d'], type: type, property: properties
|
|
@@ -914,7 +917,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
914
917
|
};
|
|
915
918
|
LayerPanel.prototype.calculateBox = function (point, extraSpace) {
|
|
916
919
|
if (isNullOrUndefined(this.rectBounds)) {
|
|
917
|
-
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 } };
|
|
918
922
|
}
|
|
919
923
|
else {
|
|
920
924
|
this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x - extraSpace);
|
|
@@ -1038,6 +1042,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1038
1042
|
case 'multilinestring':
|
|
1039
1043
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1040
1044
|
coordinates.map(function (multiPoint, index) {
|
|
1045
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1041
1046
|
multiPoint.map(function (point, index) {
|
|
1042
1047
|
_this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
|
|
1043
1048
|
});
|
|
@@ -1053,6 +1058,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1053
1058
|
_this.calculateRectBox(coordinates, 'point');
|
|
1054
1059
|
break;
|
|
1055
1060
|
case 'multipoint':
|
|
1061
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1056
1062
|
coordinates.map(function (point, index) {
|
|
1057
1063
|
_this.calculateRectBox(point, 'multipoint', index === 0 ? true : false);
|
|
1058
1064
|
});
|
|
@@ -1068,7 +1074,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1068
1074
|
var newData = [];
|
|
1069
1075
|
var bounds = this.mapObject.baseMapBounds;
|
|
1070
1076
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1071
|
-
coordinates.map(function (currentPoint
|
|
1077
|
+
coordinates.map(function (currentPoint) {
|
|
1072
1078
|
var latitude = currentPoint[1];
|
|
1073
1079
|
var longitude = currentPoint[0];
|
|
1074
1080
|
if ((longitude >= bounds.longitude.min && longitude <= bounds.longitude.max)
|
|
@@ -1162,8 +1168,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1162
1168
|
tileI = (tileI % ycount) + ycount;
|
|
1163
1169
|
}
|
|
1164
1170
|
var tile = new Tile(tileI % ycount, j);
|
|
1165
|
-
tile.left = x;
|
|
1166
|
-
tile.top = y;
|
|
1171
|
+
tile.left = Math.round(x);
|
|
1172
|
+
tile.top = Math.round(y);
|
|
1167
1173
|
if (baseLayer.layerType === 'Bing' || (bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
|
|
1168
1174
|
var key = baseLayer.key;
|
|
1169
1175
|
tile.src = bing.getBingMap(tile, key, baseLayer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
|
|
@@ -1257,18 +1263,45 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1257
1263
|
animateElement = element ? element.children[0] : null;
|
|
1258
1264
|
}
|
|
1259
1265
|
}
|
|
1260
|
-
var id = 0;
|
|
1261
|
-
|
|
1262
|
-
var imgElement =
|
|
1263
|
-
imgElement.setAttribute('height', '256px');
|
|
1264
|
-
imgElement.setAttribute('width', '256px');
|
|
1265
|
-
imgElement.setAttribute('src', tile.src);
|
|
1266
|
-
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;
|
|
1267
1269
|
var mapId = _this.mapObject.element.id;
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
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;
|
|
1271
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'));
|
|
1272
1305
|
var child = createElement('div', { id: mapId + '_tile_' + id });
|
|
1273
1306
|
child.style.position = 'absolute';
|
|
1274
1307
|
child.style.left = tile.left + 'px';
|
|
@@ -1279,15 +1312,27 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1279
1312
|
if (animateElement) {
|
|
1280
1313
|
animateElement.appendChild(child);
|
|
1281
1314
|
}
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
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';
|
|
1285
1331
|
}
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
_loop_3(tile);
|
|
1332
|
+
else {
|
|
1333
|
+
animateElement.removeChild(animateElement.children[l]);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1291
1336
|
}
|
|
1292
1337
|
}, timeOut);
|
|
1293
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) {
|
|
@@ -982,8 +981,6 @@ var Legend = /** @class */ (function () {
|
|
|
982
981
|
}
|
|
983
982
|
if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
|
|
984
983
|
|| targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
|
|
985
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
986
|
-
var element = this.maps.legendSelectionCollection[selectionEle['SelectionIndex']];
|
|
987
984
|
var multiSelection = 0;
|
|
988
985
|
if (module.enableMultiSelect) {
|
|
989
986
|
for (var i = 0; i < shapeElement['Elements'].length; i++) {
|
|
@@ -1242,7 +1239,8 @@ var Legend = /** @class */ (function () {
|
|
|
1242
1239
|
var legendTitle = legend.title.text;
|
|
1243
1240
|
var textStyle = {
|
|
1244
1241
|
fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
|
|
1245
|
-
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
|
|
1246
1244
|
};
|
|
1247
1245
|
var textOptions;
|
|
1248
1246
|
var spacing = 10;
|
|
@@ -1303,7 +1301,8 @@ var Legend = /** @class */ (function () {
|
|
|
1303
1301
|
var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
|
|
1304
1302
|
var locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
|
|
1305
1303
|
if (legend.position === 'Float') {
|
|
1306
|
-
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);
|
|
1307
1306
|
this.legendTotalRect = map.mapAreaRect;
|
|
1308
1307
|
}
|
|
1309
1308
|
else {
|
|
@@ -1388,7 +1387,8 @@ var Legend = /** @class */ (function () {
|
|
|
1388
1387
|
_this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
|
|
1389
1388
|
}
|
|
1390
1389
|
else {
|
|
1391
|
-
newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill,
|
|
1390
|
+
newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill,
|
|
1391
|
+
name: text,
|
|
1392
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) });
|
|
1393
1393
|
_this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
|
|
1394
1394
|
}
|
|
@@ -1577,7 +1577,6 @@ var Legend = /** @class */ (function () {
|
|
|
1577
1577
|
if (outOfRangeValues.length === 0) {
|
|
1578
1578
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1579
1579
|
var range_1 = false;
|
|
1580
|
-
var outRange = [];
|
|
1581
1580
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1582
1581
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
1583
1582
|
range_1 = false;
|
|
@@ -1766,7 +1765,6 @@ var Legend = /** @class */ (function () {
|
|
|
1766
1765
|
Legend.prototype.legendClick = function (targetEle) {
|
|
1767
1766
|
var legendShapeId;
|
|
1768
1767
|
var legendTextId;
|
|
1769
|
-
var legendTextColor;
|
|
1770
1768
|
var legendToggleFill = this.maps.legendSettings.toggleLegendSettings.fill;
|
|
1771
1769
|
var legendToggleOpacity = this.maps.legendSettings.toggleLegendSettings.opacity;
|
|
1772
1770
|
var legendToggleBorderColor = this.maps.legendSettings.toggleLegendSettings.border.color;
|
|
@@ -2034,10 +2032,12 @@ var Legend = /** @class */ (function () {
|
|
|
2034
2032
|
this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
|
|
2035
2033
|
}
|
|
2036
2034
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
2037
|
-
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());
|
|
2038
2037
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
2039
2038
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
2040
|
-
this.maps.layers[k].shapeSettings.opacity :
|
|
2039
|
+
this.maps.layers[k].shapeSettings.opacity :
|
|
2040
|
+
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
2041
2041
|
mapLegendElement.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
2042
2042
|
if (targetEle !== null) {
|
|
2043
2043
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
@@ -2101,7 +2101,7 @@ var Legend = /** @class */ (function () {
|
|
|
2101
2101
|
&& isNaN(shapeData['properties'][shapePath]) ?
|
|
2102
2102
|
shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
|
|
2103
2103
|
if (shapeDataValueCase === dataPathValueCase) {
|
|
2104
|
-
if (shapeData['geometry']['type']
|
|
2104
|
+
if (shapeData['geometry']['type'] !== 'MultiPoint') {
|
|
2105
2105
|
legendData.push({
|
|
2106
2106
|
layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
|
|
2107
2107
|
name: data[dataPath], value: value, pointIndex: -1
|
|
@@ -25,14 +25,21 @@ export declare class Marker {
|
|
|
25
25
|
private calculateIndividualLayerMarkerZoomLevel;
|
|
26
26
|
/**
|
|
27
27
|
* To calculate center position and factor value dynamically
|
|
28
|
+
*
|
|
29
|
+
* @param {LayerSettings[]} layersCollection - Specifies the layer settings instance.
|
|
30
|
+
* @returns {void}
|
|
28
31
|
*/
|
|
29
32
|
calculateZoomCenterPositionAndFactor(layersCollection: LayerSettings[]): void;
|
|
30
33
|
/**
|
|
31
34
|
* To check and trigger marker click event
|
|
35
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
36
|
+
* @returns {void}
|
|
32
37
|
*/
|
|
33
38
|
markerClick(e: PointerEvent): void;
|
|
34
39
|
/**
|
|
35
40
|
* To check and trigger Cluster click event
|
|
41
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
42
|
+
* @returns {void}
|
|
36
43
|
*/
|
|
37
44
|
markerClusterClick(e: PointerEvent): void;
|
|
38
45
|
/**
|
|
@@ -44,10 +51,16 @@ export declare class Marker {
|
|
|
44
51
|
private getMarker;
|
|
45
52
|
/**
|
|
46
53
|
* To check and trigger marker move event
|
|
54
|
+
*
|
|
55
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
56
|
+
* @returns {void}
|
|
47
57
|
*/
|
|
48
58
|
markerMove(e: PointerEvent): void;
|
|
49
59
|
/**
|
|
50
60
|
* To check and trigger cluster move event
|
|
61
|
+
*
|
|
62
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
63
|
+
* @returns {void}
|
|
51
64
|
*/
|
|
52
65
|
markerClusterMouseMove(e: PointerEvent): void;
|
|
53
66
|
/**
|