@syncfusion/ej2-maps 25.1.37 → 25.1.40

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.
Files changed (51) hide show
  1. package/.eslintrc.json +260 -0
  2. package/CHANGELOG.md +9 -0
  3. package/dist/ej2-maps.min.js +2 -2
  4. package/dist/ej2-maps.umd.min.js +2 -2
  5. package/dist/ej2-maps.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-maps.es2015.js +620 -396
  7. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  8. package/dist/es6/ej2-maps.es5.js +601 -378
  9. package/dist/es6/ej2-maps.es5.js.map +1 -1
  10. package/dist/global/ej2-maps.min.js +2 -2
  11. package/dist/global/ej2-maps.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +7 -7
  14. package/src/maps/layers/bubble.d.ts +17 -2
  15. package/src/maps/layers/bubble.js +20 -5
  16. package/src/maps/layers/color-mapping.d.ts +1 -1
  17. package/src/maps/layers/color-mapping.js +4 -0
  18. package/src/maps/layers/data-label.d.ts +2 -2
  19. package/src/maps/layers/data-label.js +4 -6
  20. package/src/maps/layers/layer-panel.d.ts +9 -7
  21. package/src/maps/layers/layer-panel.js +124 -121
  22. package/src/maps/layers/legend.d.ts +7 -6
  23. package/src/maps/layers/legend.js +41 -24
  24. package/src/maps/layers/marker.d.ts +7 -2
  25. package/src/maps/layers/marker.js +14 -10
  26. package/src/maps/layers/navigation-selected-line.js +1 -0
  27. package/src/maps/layers/polygon.js +5 -1
  28. package/src/maps/maps-model.d.ts +9 -9
  29. package/src/maps/maps.d.ts +30 -12
  30. package/src/maps/maps.js +88 -59
  31. package/src/maps/model/base-model.d.ts +3 -2
  32. package/src/maps/model/base.d.ts +10 -9
  33. package/src/maps/model/base.js +1 -1
  34. package/src/maps/model/export-image.js +1 -1
  35. package/src/maps/model/export-pdf.js +3 -3
  36. package/src/maps/model/interface.d.ts +1 -0
  37. package/src/maps/model/print.js +2 -0
  38. package/src/maps/model/theme.js +12 -12
  39. package/src/maps/user-interaction/annotation.d.ts +5 -0
  40. package/src/maps/user-interaction/annotation.js +6 -2
  41. package/src/maps/user-interaction/highlight.d.ts +13 -1
  42. package/src/maps/user-interaction/highlight.js +12 -2
  43. package/src/maps/user-interaction/selection.d.ts +13 -1
  44. package/src/maps/user-interaction/selection.js +19 -13
  45. package/src/maps/user-interaction/tooltip.d.ts +14 -0
  46. package/src/maps/user-interaction/tooltip.js +16 -1
  47. package/src/maps/user-interaction/zoom.d.ts +55 -10
  48. package/src/maps/user-interaction/zoom.js +146 -104
  49. package/src/maps/utils/helper.d.ts +64 -36
  50. package/src/maps/utils/helper.js +82 -52
  51. package/tslint.json +111 -0
@@ -56,7 +56,7 @@ export function stringToNumber(value, containerSize) {
56
56
  export function calculateSize(maps) {
57
57
  maps.element.style.height = !isNullOrUndefined(maps.height) ? maps.height : 'auto';
58
58
  maps.element.style.width = !isNullOrUndefined(maps.width) ? maps.width : 'auto';
59
- maps.element.style.setProperty("display", "block");
59
+ maps.element.style.setProperty('display', 'block');
60
60
  var containerWidth = maps.element.clientWidth;
61
61
  var containerHeight = maps.element.clientHeight;
62
62
  var containerElementWidth = stringToNumber(maps.element.style.width, containerWidth);
@@ -216,6 +216,11 @@ export function convertGeoToPoint(latitude, longitude, factor, layer, mapModel)
216
216
  return new Point(x, y);
217
217
  }
218
218
  /**
219
+ * @param {Maps} maps - Specifies the map control.
220
+ * @param {number} factor - Specifies the factor.
221
+ * @param {LayerSettings} currentLayer - Specifies the current layer.
222
+ * @param {Coordinate} markerData - Specifies the marker data.
223
+ * @returns {string} - Returns the path.
219
224
  * @private
220
225
  */
221
226
  export function calculatePolygonPath(maps, factor, currentLayer, markerData) {
@@ -432,9 +437,14 @@ export function measureText(text, font) {
432
437
  '; visibility: hidden; top: -100; left: 0; whiteSpace: nowrap; lineHeight: normal';
433
438
  return new Size(measureObject.clientWidth, measureObject.clientHeight);
434
439
  }
435
- /** @private */
440
+ /**
441
+ * @param {string} text - Specifies the text.
442
+ * @param {FontModel} font - Specifies the font.
443
+ * @returns {Size} - Returns the size of text.
444
+ * @private */
436
445
  export function measureTextElement(text, font) {
437
446
  var canvas = document.createElement('canvas');
447
+ // eslint-disable-next-line @typescript-eslint/tslint/config
438
448
  var context = canvas.getContext('2d');
439
449
  context.font = font.fontStyle + " " + font.fontWeight + " " + (typeof font.size === 'number' ? font.size + 'px' : font.size) + " " + font.fontFamily;
440
450
  var metrics = context.measureText(text);
@@ -718,15 +728,15 @@ export function renderTextElement(option, style, color, parent, isMinus) {
718
728
  return htmlObject;
719
729
  }
720
730
  /**
721
- * @param {HTMLCollection} element Specifies the html collection
722
- * @param {string} markerId Specifies the marker id
723
- * @param {any} data Specifies the data
724
- * @param {number} index Specifies the index
725
- * @param {Maps} mapObj Specifies the map object
726
- * @returns {HTMLCollection} Returns the html collection
731
+ * @param {HTMLCollection} element - Specifies the html collection
732
+ * @param {string} markerId - Specifies the marker id
733
+ * @param {object} data - Specifies the data
734
+ * @param {number} index - Specifies the index
735
+ * @param {Maps} mapObj - Specifies the map object
736
+ * @param {string} templateType - Specifies the template type
737
+ * @returns {HTMLElement} - Returns the html element
727
738
  * @private
728
739
  */
729
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
730
740
  export function convertElement(element, markerId, data, index, mapObj, templateType) {
731
741
  var childElement = createElement('div', {
732
742
  id: markerId, className: mapObj.element.id + '_marker_template_element'
@@ -737,6 +747,7 @@ export function convertElement(element, markerId, data, index, mapObj, templateT
737
747
  childElement.appendChild(element[0]);
738
748
  elementLength--;
739
749
  }
750
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
740
751
  if (!mapObj.isReact || templateType !== 'function') {
741
752
  var templateHtml = childElement.innerHTML;
742
753
  var properties = Object.keys(data);
@@ -778,12 +789,11 @@ export function formatValue(value, maps) {
778
789
  *
779
790
  * @param {string} stringTemplate - Specifies the template
780
791
  * @param {string} format - Specifies the format
781
- * @param {any} data - Specifies the data
792
+ * @param {object} data - Specifies the data
782
793
  * @param {Maps} maps - Specifies the instance of the maps
783
794
  * @returns {string} - Returns the string value
784
795
  * @private
785
796
  */
786
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
787
797
  export function convertStringToValue(stringTemplate, format, data, maps) {
788
798
  var templateHtml = (stringTemplate === '') ? format : stringTemplate;
789
799
  var templateValue = (stringTemplate === '') ? templateHtml.split('${') : templateHtml.split('{{:');
@@ -808,14 +818,11 @@ export function convertStringToValue(stringTemplate, format, data, maps) {
808
818
  *
809
819
  * @param {Element} element - Specifies the element
810
820
  * @param {string} labelId - Specifies the label id
811
- * @param {any} data - Specifies the data
812
- * @param {number} index - Specifies the index
813
- * @param {Maps} mapObj - Specifies the map object
821
+ * @param {object} data - Specifies the data
814
822
  * @returns {HTMLElement} - Returns the html element
815
823
  * @private
816
824
  */
817
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
818
- export function convertElementFromLabel(element, labelId, data, index, mapObj) {
825
+ export function convertElementFromLabel(element, labelId, data) {
819
826
  var labelEle = isNullOrUndefined(element.childElementCount) ? element[0] : element;
820
827
  var templateHtml = labelEle.outerHTML;
821
828
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -844,7 +851,7 @@ export function convertElementFromLabel(element, labelId, data, index, mapObj) {
844
851
  * @returns {Element} - Returns the element
845
852
  * @private
846
853
  */
847
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
854
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
848
855
  export function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCollection, maps) {
849
856
  var markerEle;
850
857
  var x;
@@ -858,7 +865,6 @@ export function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, ma
858
865
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
859
866
  var border = { color: borderColor, width: borderWidth, opacity: borderOpacity };
860
867
  var opacity = shapeCustom['opacity'];
861
- var padding = 5;
862
868
  var rectOptions;
863
869
  var pathOptions = new PathOption(markerID, fill, borderWidth, borderColor, opacity, borderOpacity, dashArray, '');
864
870
  size.width = typeof (size.width) === 'string' ? parseInt(size.width, 10) : size.width;
@@ -887,7 +893,7 @@ export function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, ma
887
893
  }
888
894
  /**
889
895
  *
890
- * @param {any} data - Specifies the data
896
+ * @param {object} data - Specifies the data
891
897
  * @param {string} value - Specifies the value
892
898
  * @returns {any} - Returns the data
893
899
  * @private
@@ -910,11 +916,10 @@ export function getValueFromObject(data, value) {
910
916
  /**
911
917
  *
912
918
  * @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
913
- * @param {any} data - Specifies the data
919
+ * @param {object} data - Specifies the data
914
920
  * @returns {IMarkerRenderingEventArgs} - Returns the arguments
915
921
  * @private
916
922
  */
917
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
918
923
  export function markerColorChoose(eventArgs, data) {
919
924
  var color = (!isNullOrUndefined(eventArgs.colorValuePath)) ? ((eventArgs.colorValuePath.indexOf('.') > -1) ? (getValueFromObject(data, eventArgs.colorValuePath)).toString() :
920
925
  data[eventArgs.colorValuePath]) : data[eventArgs.colorValuePath];
@@ -927,11 +932,10 @@ export function markerColorChoose(eventArgs, data) {
927
932
  /**
928
933
  *
929
934
  * @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
930
- * @param {any} data - Specifies the data
935
+ * @param {object} data - Specifies the data
931
936
  * @returns {IMarkerRenderingEventArgs} - Returns the arguments
932
937
  * @private
933
938
  */
934
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
935
939
  export function markerShapeChoose(eventArgs, data) {
936
940
  if (!isNullOrUndefined(eventArgs.shapeValuePath) && !isNullOrUndefined(data[eventArgs.shapeValuePath])) {
937
941
  var shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
@@ -964,7 +968,7 @@ export function markerShapeChoose(eventArgs, data) {
964
968
  * @param {Element} layerElement - Specifies the layer element
965
969
  * @param {boolean} check - Specifies the boolean value
966
970
  * @param {boolean} zoomCheck - Specifies the boolean value
967
- * @returns {void}
971
+ * @returns {boolean} -Returns boolean for cluster completion
968
972
  * @private
969
973
  */
970
974
  export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerCollection, layerElement, check, zoomCheck) {
@@ -994,14 +998,15 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
994
998
  data: data, maps: maps, cluster: clusters, border: clusters.border
995
999
  };
996
1000
  var containerRect = maps.element.getBoundingClientRect();
997
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
998
- var translatePoint = (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
1001
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
1002
+ (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
999
1003
  var factor;
1000
1004
  if (!maps.isTileMap) {
1001
1005
  factor = maps.mapLayerPanel.calculateFactor(currentLayer);
1002
1006
  }
1003
1007
  var isClusteringCompleted = false;
1004
1008
  var currentZoomFactor = !maps.isTileMap ? maps.mapScaleValue : maps.tileZoomLevel;
1009
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1005
1010
  maps.trigger('markerClusterRendering', eventArg, function (clusterargs) {
1006
1011
  Array.prototype.forEach.call(markerTemplate.childNodes, function (markerElement, o) {
1007
1012
  indexCollection = [];
@@ -1014,7 +1019,7 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
1014
1019
  || (maps.markerModule.initialMarkerCluster.length > 0 && maps.markerModule.initialMarkerCluster[layerIndex] && maps.markerModule.initialMarkerCluster[layerIndex][o] && maps.markerModule.initialMarkerCluster[layerIndex][o].length > 0) ?
1015
1020
  (maps.previousScale < currentZoomFactor ? maps.markerModule.zoomedMarkerCluster[layerIndex][o] : maps.markerModule.initialMarkerCluster[layerIndex][o]) : null;
1016
1021
  if (!isNullOrUndefined(list) && list.length !== 0) {
1017
- Array.prototype.forEach.call(list, function (currentIndex, p) {
1022
+ Array.prototype.forEach.call(list, function (currentIndex) {
1018
1023
  if (o !== currentIndex) {
1019
1024
  var otherMarkerElement = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
1020
1025
  + 0 + '_dataIndex_' + currentIndex);
@@ -1197,9 +1202,16 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
1197
1202
  });
1198
1203
  return isClusteringCompleted;
1199
1204
  }
1200
- /** @private */
1205
+ /**
1206
+ * @param {Maps} maps - Specifies the map control.
1207
+ * @param {number} currentZoomFactor - Specifies the current zoom factor.
1208
+ * @param {number} layerIndex - Specifies the layer index.
1209
+ * @param {number} index - Specifies the index.
1210
+ * @param {number} indexCollection - Specifies the index Collection.
1211
+ * @returns {void}
1212
+ * @private */
1201
1213
  export function markerClusterListHandler(maps, currentZoomFactor, layerIndex, index, indexCollection) {
1202
- if (currentZoomFactor == 1) {
1214
+ if (currentZoomFactor === 1) {
1203
1215
  var initialMarkerClusterList = isNullOrUndefined(maps.markerModule.initialMarkerCluster[layerIndex][index]) ? [] : indexCollection.length > 1 ? indexCollection : [];
1204
1216
  maps.markerModule.initialMarkerCluster[layerIndex][index] = initialMarkerClusterList;
1205
1217
  var zoomedMarkerClusterList = isNullOrUndefined(maps.markerModule.zoomedMarkerCluster[layerIndex][index]) ? [] : indexCollection.length > 1 ? indexCollection : [];
@@ -1209,8 +1221,16 @@ export function markerClusterListHandler(maps, currentZoomFactor, layerIndex, in
1209
1221
  maps.markerModule.zoomedMarkerCluster[layerIndex][index] = indexCollection.length > 1 ? indexCollection : [];
1210
1222
  }
1211
1223
  }
1212
- /** @private */
1224
+ /**
1225
+ * @param {Element} tempElement - Specifies the temp element.
1226
+ * @param {ClientRect} markerBounds - Specifies the marker bounds.
1227
+ * @param {ClientRect} colloideBounds - Specifies the colloide Bounds.
1228
+ * @param {number[]} indexCollection - Specifies the index collection.
1229
+ * @param {number} p - Specifies the p.
1230
+ * @returns {void}
1231
+ * @private */
1213
1232
  export function markerBoundsComparer(tempElement, markerBounds, colloideBounds, indexCollection, p) {
1233
+ // eslint-disable-next-line @typescript-eslint/tslint/config
1214
1234
  var currentMarkerBound = tempElement.getBoundingClientRect();
1215
1235
  if (!isNullOrUndefined(currentMarkerBound)) {
1216
1236
  if (!(markerBounds.left > currentMarkerBound.right || markerBounds.right < currentMarkerBound.left
@@ -1225,11 +1245,10 @@ export function markerBoundsComparer(tempElement, markerBounds, colloideBounds,
1225
1245
  *
1226
1246
  * @param {MarkerClusterData[]} sameMarkerData - Specifies the marker data
1227
1247
  * @param {Maps} maps - Specifies the instance of the maps
1228
- * @param {Element | HTMLElement} markerElement - Specifies the marker element
1229
1248
  * @returns {void}
1230
1249
  * @private
1231
1250
  */
1232
- export function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
1251
+ export function mergeSeparateCluster(sameMarkerData, maps) {
1233
1252
  var layerIndex = sameMarkerData[0].layerIndex;
1234
1253
  var clusterIndex = sameMarkerData[0].targetClusterIndex;
1235
1254
  var markerIndex = sameMarkerData[0].markerIndex;
@@ -1393,7 +1412,7 @@ export function marker(eventArgs, markerSettings, markerData, dataIndex, locatio
1393
1412
  * @returns {HTMLElement} - Returns the html element
1394
1413
  * @private
1395
1414
  */
1396
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1415
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
1397
1416
  export function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
1398
1417
  templateFn = getTemplateFunction(eventArgs.template, maps);
1399
1418
  if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
@@ -1811,8 +1830,10 @@ export function getFieldData(dataSource, fields) {
1811
1830
  * @returns {number} - Returns the number
1812
1831
  * @private
1813
1832
  */
1814
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1815
- export function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, layer) {
1833
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
1834
+ export function checkShapeDataFields(dataSource, properties, dataPath, propertyPath,
1835
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1836
+ layer) {
1816
1837
  if (!(isNullOrUndefined(properties))) {
1817
1838
  for (var i = 0; i < dataSource.length; i++) {
1818
1839
  var shapeDataPath = ((dataPath.indexOf('.') > -1) ? getValueFromObject(dataSource[i], dataPath) :
@@ -1833,10 +1854,9 @@ export function checkShapeDataFields(dataSource, properties, dataPath, propertyP
1833
1854
  *
1834
1855
  * @param {string} shapeData - Specifies the shape data
1835
1856
  * @param {string | string[]} shapePropertyPath - Specifies the shape property path
1836
- * @param {any} shape - Specifies the shape
1857
+ * @param {object} shape - Specifies the shape
1837
1858
  * @returns {string} - Returns the string value
1838
1859
  */
1839
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1840
1860
  export function checkPropertyPath(shapeData, shapePropertyPath, shape) {
1841
1861
  if (!isNullOrUndefined(shapeData) && !isNullOrUndefined(shape)) {
1842
1862
  if (!isNullOrUndefined(shapePropertyPath)) {
@@ -1931,6 +1951,7 @@ export function findMidPointOfPolygon(points, type, geometryType) {
1931
1951
  ySum = ySum + Math.abs(((startY + startY1) * (((startX * startY1) - (startX1 * startY)))));
1932
1952
  }
1933
1953
  sum = 0.5 * sum;
1954
+ // eslint-disable-next-line @typescript-eslint/tslint/config
1934
1955
  var pointValue = points.some(function (point) { return point.x < 5 && point.y < 5; }) && geometryType === 'Normal' ? 6 : 4;
1935
1956
  xSum = (1 / (pointValue * sum)) * xSum;
1936
1957
  ySum = (1 / (pointValue * sum)) * ySum;
@@ -1998,7 +2019,7 @@ export function findMidPointOfPolygon(points, type, geometryType) {
1998
2019
  export function isCustomPath(layerData) {
1999
2020
  var customPath = false;
2000
2021
  if (Object.prototype.toString.call(layerData) === '[object Array]') {
2001
- Array.prototype.forEach.call(layerData, function (layer, index) {
2022
+ Array.prototype.forEach.call(layerData, function (layer) {
2002
2023
  if (!isNullOrUndefined(layer['geometry']) && layer['geometry']['type'] === 'Path') {
2003
2024
  customPath = true;
2004
2025
  }
@@ -2012,6 +2033,9 @@ export function isCustomPath(layerData) {
2012
2033
  * @param {number} maxWidth - Specifies the maximum width
2013
2034
  * @param {string} text - Specifies the text
2014
2035
  * @param {FontModel} font - Specifies the font
2036
+ * @param {number} width - Specifies the width of text
2037
+ * @param {boolean} isCanvasMeasure - checks the canvas measure
2038
+ * @param {number[]} widthList - Specifies the width list
2015
2039
  * @returns {string} - Returns the string
2016
2040
  * @private
2017
2041
  */
@@ -2126,6 +2150,7 @@ export function getTranslate(mapObject, layer, animate) {
2126
2150
  }
2127
2151
  if (mapObject.zoomSettings.shouldZoomInitially && mapObject.zoomSettings.enable) {
2128
2152
  mapObject.mapScaleValue = scaleFactor = zoomFactorValue = ((mapObject.zoomSettings.shouldZoomInitially || mapObject.enablePersistence) && mapObject.scale === 1)
2153
+ // eslint-disable-next-line radix
2129
2154
  ? mapObject.scale : (isNullOrUndefined(mapObject.markerZoomFactor)) ? 1 : (mapObject.markerZoomedState ? mapObject.markerZoomFactor : parseInt(mapObject.scale.toString()));
2130
2155
  if (mapObject.markerZoomedState && mapObject.mapScaleValue !== mapObject.markerZoomFactor && !mapObject.enablePersistence) {
2131
2156
  mapObject.mapScaleValue = zoomFactorValue = mapObject.markerZoomFactor;
@@ -2483,9 +2508,9 @@ export function Internalize(maps, value) {
2483
2508
  /**
2484
2509
  * Function to compile the template function for maps.
2485
2510
  *
2486
- * @param {string} template - Specifies the template
2511
+ * @param {string | Function} template - Specifies the template
2487
2512
  * @param {Maps} maps - Specifies the Maps instance.
2488
- * @returns {Function} - Returns the function
2513
+ * @returns {any} - Returns the template function
2489
2514
  * @private
2490
2515
  */
2491
2516
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2524,7 +2549,7 @@ export function getElement(id) {
2524
2549
  *
2525
2550
  * @param {string} targetId - Specifies the target id
2526
2551
  * @param {Maps} map - Specifies the instance of the maps
2527
- * @returns {any} - Returns the object
2552
+ * @returns {object} - Returns the object
2528
2553
  * @private
2529
2554
  */
2530
2555
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2687,14 +2712,12 @@ export function customizeStyle(id, className, eventArgs) {
2687
2712
  * @param {SelectionSettingsModel} selectionSettings - Specifies the selection settings
2688
2713
  * @param {Maps} map - Specifies the instance of the maps
2689
2714
  * @param {Element} targetElement - Specifies the target element
2690
- * @param {any} shapeData - Specifies the shape data
2691
- * @param {any} data - Specifies the data
2715
+ * @param {object} shapeData - Specifies the shape data
2716
+ * @param {object} data - Specifies the data
2692
2717
  * @returns {void}
2693
2718
  * @private
2694
2719
  */
2695
- export function triggerItemSelectionEvent(selectionSettings, map, targetElement,
2696
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2697
- shapeData, data) {
2720
+ export function triggerItemSelectionEvent(selectionSettings, map, targetElement, shapeData, data) {
2698
2721
  var border = {
2699
2722
  color: selectionSettings.border.color,
2700
2723
  width: selectionSettings.border.width / map.scale,
@@ -2711,6 +2734,7 @@ shapeData, data) {
2711
2734
  data: data,
2712
2735
  maps: map
2713
2736
  };
2737
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2714
2738
  map.trigger('itemSelection', eventArgs, function (observedArgs) {
2715
2739
  eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity :
2716
2740
  selectionSettings.border.opacity;
@@ -2768,6 +2792,7 @@ export function elementAnimate(element, delay, duration, point, maps, ele, radiu
2768
2792
  ' ) scale(' + height + ')');
2769
2793
  }
2770
2794
  },
2795
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2771
2796
  end: function (model) {
2772
2797
  element.setAttribute('transform', transform);
2773
2798
  if (!ele) {
@@ -2908,15 +2933,17 @@ export function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element)
2908
2933
  /**
2909
2934
  * @param {string} id - Specifies the id
2910
2935
  * @param {string} text - Specifies the text
2911
- * @param {string} top - Specifies the top
2912
- * @param {string} left - Specifies the left
2936
+ * @param {number} top - Specifies the top
2937
+ * @param {number} left - Specifies the left
2913
2938
  * @param {ZoomToolbarTooltipSettingsModel} settings - Specifies the tooltip settings.
2914
2939
  * @returns {void}
2915
2940
  * @private
2916
2941
  */
2917
2942
  export function createTooltip(id, text, top, left, settings) {
2918
2943
  var tooltip = getElement(id);
2944
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2919
2945
  var borderColor = getHexColor(settings.borderColor);
2946
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2920
2947
  var fontColor = getHexColor(settings.fontColor);
2921
2948
  var style = 'top:' + top.toString() + 'px;' +
2922
2949
  'left:' + left.toString() + 'px;' +
@@ -2943,10 +2970,14 @@ export function createTooltip(id, text, top, left, settings) {
2943
2970
  }
2944
2971
  }
2945
2972
  /**
2973
+ * @param {string} color - Specifies the color
2974
+ * @returns {any} - Returns the color in rgb
2946
2975
  * @private
2947
2976
  */
2977
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2948
2978
  export function getHexColor(color) {
2949
2979
  if (color.indexOf('#') !== -1 && color.toLowerCase().indexOf('rgb') === -1) {
2980
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2950
2981
  var colorArray = (/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i).exec(color);
2951
2982
  return colorArray ? { r: parseInt(colorArray[1], 16), g: parseInt(colorArray[2], 16), b: parseInt(colorArray[3], 16) } : null;
2952
2983
  }
@@ -3143,7 +3174,6 @@ export function changeBorderWidth(element, index, scale, maps) {
3143
3174
  else {
3144
3175
  var currentStroke = void 0;
3145
3176
  var value = 0;
3146
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3147
3177
  var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
3148
3178
  var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
3149
3179
  var circleRadius = maps.layersCollection[index].shapeSettings.circleRadius;
@@ -3344,14 +3374,13 @@ export function zoomAnimate(element, delay, duration, point, scale, size, maps)
3344
3374
  * @returns {void}
3345
3375
  * @private
3346
3376
  */
3347
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3348
3377
  export function animate(element, delay, duration, process, end) {
3349
3378
  var _this = this;
3350
3379
  var start = null;
3351
3380
  // eslint-disable-next-line prefer-const
3352
3381
  var clearAnimation;
3353
3382
  var markerStyle = 'visibility:visible';
3354
- duration = animationMode === "Disable" ? 0 : duration;
3383
+ duration = animationMode === 'Disable' ? 0 : duration;
3355
3384
  var startAnimation = function (timestamp) {
3356
3385
  if (!start) {
3357
3386
  start = timestamp;
@@ -3455,6 +3484,7 @@ export function compareZoomFactor(scaleFactor, maps) {
3455
3484
  * @param {number} mapWidth - Specifies the width of the maps
3456
3485
  * @param {number} mapHeight - Specifies the height of the maps
3457
3486
  * @param {Maps} maps - Specifies the instance of the maps
3487
+ * @param {boolean} isZoomToCoordinates - Checks for the zoom to coordinates
3458
3488
  * @returns {number} - Returns the scale factor
3459
3489
  * @private
3460
3490
  */
@@ -3496,7 +3526,7 @@ export function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, m
3496
3526
  * @returns {any} - Returns the data value
3497
3527
  * @private
3498
3528
  */
3499
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3529
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
3500
3530
  export function processResult(e) {
3501
3531
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3502
3532
  var dataValue;
package/tslint.json ADDED
@@ -0,0 +1,111 @@
1
+ {
2
+ "rules": {
3
+ "chai-vague-errors": true,
4
+ "use-isnan": true,
5
+ "missing-jsdoc": true,
6
+ "missing-optional-annotation": true,
7
+ "no-backbone-get-set-outside-model": true,
8
+ "no-banned-terms": true,
9
+ "no-constant-condition": true,
10
+ "no-control-regex": true,
11
+ "no-cookies": true,
12
+ "no-delete-expression": true,
13
+ "no-document-write": true,
14
+ "no-document-domain": true,
15
+ "no-disable-auto-sanitization": true,
16
+ "no-duplicate-case": true,
17
+ "no-duplicate-parameter-names": true,
18
+ "no-empty-interfaces": true,
19
+ "no-exec-script": true,
20
+ "no-function-constructor-with-string-args": true,
21
+ "no-function-expression": true,
22
+ "no-invalid-regexp": true,
23
+ "no-for-in": true,
24
+ "member-access": true,
25
+ "no-multiline-string": true,
26
+ "no-multiple-var-decl": true,
27
+ "no-unnecessary-bind": true,
28
+ "no-unnecessary-semicolons": true,
29
+ "no-octal-literal": true,
30
+ "no-regex-spaces": true,
31
+ "no-sparse-arrays": true,
32
+ "no-string-based-set-immediate": true,
33
+ "no-string-based-set-interval": true,
34
+ "no-unused-imports": true,
35
+ "no-with-statement": true,
36
+ "prefer-array-literal": true,
37
+ "promise-must-complete": false,
38
+ "react-no-dangerous-html": true,
39
+ "use-named-parameter": true,
40
+ "valid-typeof": true,
41
+ "max-func-body-length": [true, 100, {
42
+ "ignore-parameters-to-function-regex": "describe"
43
+ }],
44
+ "class-name": true,
45
+ "curly": true,
46
+ "eofline": false,
47
+ "forin": true,
48
+ "indent": [
49
+ true,
50
+ "spaces"
51
+ ],
52
+ "label-position": true,
53
+ "max-line-length": [true, 140],
54
+ "no-arg": true,
55
+ "no-console": [true,
56
+ "debug",
57
+ "info",
58
+ "log",
59
+ "time",
60
+ "timeEnd",
61
+ "trace"
62
+ ],
63
+ "no-construct": true,
64
+ "no-parameter-properties": true,
65
+ "no-debugger": true,
66
+ "no-duplicate-variable": true,
67
+ "no-empty": true,
68
+ "no-eval": true,
69
+ "no-string-literal": true,
70
+ "no-switch-case-fall-through": true,
71
+ "trailing-comma": true,
72
+ "no-trailing-whitespace": true,
73
+ "no-unused-expression": true,
74
+ "no-use-before-declare": false,
75
+ "no-var-requires": true,
76
+ "one-line": [true,
77
+ "check-open-brace",
78
+ "check-catch",
79
+ "check-else",
80
+ "check-whitespace"
81
+ ],
82
+ "no-any": true,
83
+ "no-conditional-assignment": true,
84
+ "no-angle-bracket-type-assertion": false,
85
+ "align": [true, "parameters", "arguments", "statements"],
86
+ "no-empty-line-after-opening-brace": false,
87
+ "typedef-whitespace": [false],
88
+ "ban": true,
89
+ "quotemark": [true, "single"],
90
+ "semicolon": true,
91
+ "triple-equals": [true, "allow-null-check"],
92
+ "typedef": [true,
93
+ "call-signature",
94
+ "parameter",
95
+ "property-declaration",
96
+ "variable-declaration",
97
+ "arrow-parameter",
98
+ "member-variable-declaration"],
99
+ "variable-name": true,
100
+ "whitespace": [true,
101
+ "check-branch",
102
+ "check-decl",
103
+ "check-operator",
104
+ "check-separator",
105
+ "check-type"
106
+ ],
107
+ "jsdoc-format": true,
108
+ "no-var-keyword": true,
109
+ "radix": true
110
+ }
111
+ }