@syncfusion/ej2-maps 19.4.53 → 19.4.56-105067

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 (84) hide show
  1. package/.eslintrc.json +18 -3
  2. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -72
  3. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -49
  4. package/CHANGELOG.md +441 -422
  5. package/README.md +73 -73
  6. package/dist/ej2-maps.umd.min.js +1 -10
  7. package/dist/ej2-maps.umd.min.js.map +1 -1
  8. package/dist/es6/ej2-maps.es2015.js +1220 -653
  9. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  10. package/dist/es6/ej2-maps.es5.js +1258 -692
  11. package/dist/es6/ej2-maps.es5.js.map +1 -1
  12. package/dist/global/ej2-maps.min.js +1 -10
  13. package/dist/global/ej2-maps.min.js.map +1 -1
  14. package/dist/global/index.d.ts +0 -9
  15. package/dist/ts/maps/layers/bing-map.ts +50 -0
  16. package/dist/ts/maps/layers/bubble.ts +290 -0
  17. package/dist/ts/maps/layers/color-mapping.ts +226 -0
  18. package/dist/ts/maps/layers/data-label.ts +418 -0
  19. package/dist/ts/maps/layers/layer-panel.ts +1480 -0
  20. package/dist/ts/maps/layers/legend.ts +2236 -0
  21. package/dist/ts/maps/layers/marker.ts +453 -0
  22. package/dist/ts/maps/layers/navigation-selected-line.ts +167 -0
  23. package/dist/ts/maps/maps.ts +2886 -0
  24. package/dist/ts/maps/model/base.ts +1843 -0
  25. package/dist/ts/maps/model/constants.ts +200 -0
  26. package/dist/ts/maps/model/export-image.ts +178 -0
  27. package/dist/ts/maps/model/export-pdf.ts +170 -0
  28. package/dist/ts/maps/model/interface.ts +823 -0
  29. package/dist/ts/maps/model/print.ts +104 -0
  30. package/dist/ts/maps/model/theme.ts +554 -0
  31. package/dist/ts/maps/user-interaction/annotation.ts +127 -0
  32. package/dist/ts/maps/user-interaction/highlight.ts +233 -0
  33. package/dist/ts/maps/user-interaction/selection.ts +321 -0
  34. package/dist/ts/maps/user-interaction/tooltip.ts +387 -0
  35. package/dist/ts/maps/user-interaction/zoom.ts +1767 -0
  36. package/dist/ts/maps/utils/enum.ts +368 -0
  37. package/dist/ts/maps/utils/helper.ts +3421 -0
  38. package/helper/e2e/index.js +3 -3
  39. package/helper/e2e/maps-helper.js +13 -13
  40. package/license +9 -9
  41. package/package.json +85 -85
  42. package/src/maps/layers/bing-map.d.ts +4 -0
  43. package/src/maps/layers/bing-map.js +16 -3
  44. package/src/maps/layers/bubble.d.ts +1 -2
  45. package/src/maps/layers/bubble.js +7 -12
  46. package/src/maps/layers/data-label.d.ts +1 -4
  47. package/src/maps/layers/data-label.js +32 -35
  48. package/src/maps/layers/layer-panel.d.ts +18 -1
  49. package/src/maps/layers/layer-panel.js +226 -72
  50. package/src/maps/layers/legend.d.ts +5 -2
  51. package/src/maps/layers/legend.js +170 -61
  52. package/src/maps/layers/marker.d.ts +2 -4
  53. package/src/maps/layers/marker.js +49 -48
  54. package/src/maps/layers/navigation-selected-line.d.ts +1 -2
  55. package/src/maps/layers/navigation-selected-line.js +7 -13
  56. package/src/maps/maps-model.d.ts +259 -251
  57. package/src/maps/maps.d.ts +25 -3
  58. package/src/maps/maps.js +179 -106
  59. package/src/maps/model/base-model.d.ts +1025 -1021
  60. package/src/maps/model/base.d.ts +5 -1
  61. package/src/maps/model/base.js +24 -24
  62. package/src/maps/model/constants.d.ts +6 -0
  63. package/src/maps/model/constants.js +6 -0
  64. package/src/maps/model/export-image.d.ts +2 -4
  65. package/src/maps/model/export-image.js +34 -33
  66. package/src/maps/model/export-pdf.d.ts +4 -6
  67. package/src/maps/model/export-pdf.js +31 -32
  68. package/src/maps/model/interface.d.ts +34 -26
  69. package/src/maps/model/print.d.ts +2 -5
  70. package/src/maps/model/print.js +32 -18
  71. package/src/maps/model/theme.js +7 -4
  72. package/src/maps/user-interaction/annotation.d.ts +1 -2
  73. package/src/maps/user-interaction/annotation.js +3 -4
  74. package/src/maps/user-interaction/highlight.d.ts +1 -2
  75. package/src/maps/user-interaction/highlight.js +11 -10
  76. package/src/maps/user-interaction/selection.d.ts +1 -2
  77. package/src/maps/user-interaction/selection.js +42 -19
  78. package/src/maps/user-interaction/tooltip.d.ts +3 -5
  79. package/src/maps/user-interaction/tooltip.js +27 -14
  80. package/src/maps/user-interaction/zoom.d.ts +3 -8
  81. package/src/maps/user-interaction/zoom.js +282 -162
  82. package/src/maps/utils/enum.d.ts +5 -1
  83. package/src/maps/utils/helper.d.ts +9 -1
  84. package/src/maps/utils/helper.js +82 -33
@@ -3,19 +3,19 @@ import { SvgRenderer, Tooltip } from '@syncfusion/ej2-svg-base';
3
3
  import { DataManager, Query } from '@syncfusion/ej2-data';
4
4
  import { PdfBitmap, PdfDocument, PdfPageOrientation } from '@syncfusion/ej2-pdf-export';
5
5
 
6
- var __extends$1 = (undefined && undefined.__extends) || (function () {
7
- var extendStatics = function (d, b) {
8
- extendStatics = Object.setPrototypeOf ||
9
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11
- return extendStatics(d, b);
12
- };
13
- return function (d, b) {
14
- extendStatics(d, b);
15
- function __() { this.constructor = d; }
16
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
- };
18
- })();
6
+ var __extends$1 = (undefined && undefined.__extends) || (function () {
7
+ var extendStatics = function (d, b) {
8
+ extendStatics = Object.setPrototypeOf ||
9
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11
+ return extendStatics(d, b);
12
+ };
13
+ return function (d, b) {
14
+ extendStatics(d, b);
15
+ function __() { this.constructor = d; }
16
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
+ };
18
+ })();
19
19
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
20
20
  /* eslint-disable @typescript-eslint/no-unused-vars */
21
21
  /* eslint-disable max-len */
@@ -788,6 +788,8 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
788
788
  var opacity = shapeCustom['opacity'];
789
789
  var rectOptions;
790
790
  var pathOptions = new PathOption(markerID, fill, borderWidth, borderColor, opacity, borderOpacity, dashArray, '');
791
+ size.width = typeof (size.width) === 'string' ? parseInt(size.width, 10) : size.width;
792
+ size.height = typeof (size.height) === 'string' ? parseInt(size.height, 10) : size.height;
791
793
  if (shape === 'Circle') {
792
794
  var radius = (size.width + size.height) / 4;
793
795
  var circleOptions = new CircleOption(markerID, fill, border, opacity, location.x, location.y, radius, dashArray);
@@ -1005,8 +1007,8 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1005
1007
  shapeCustom['borderWidth'] = eventArg.border.width;
1006
1008
  shapeCustom['borderOpacity'] = isNullOrUndefined(eventArg.border.opacity) ? clusters_1.opacity : eventArg.border.opacity;
1007
1009
  }
1008
- tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX : ((location_1.x + transPoint.x + eventArg.width) * maps.mapScaleValue);
1009
- tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY : ((location_1.y + transPoint.y + (eventArg.height / 2)) * maps.mapScaleValue);
1010
+ tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX : tempX + postionY - (eventArg.width / 2);
1011
+ tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY : tempY - (eventArg.height / 2);
1010
1012
  if (maps.isTileMap && !maps.zoomSettings.enable) {
1011
1013
  tempX = location_1.x;
1012
1014
  tempY = location_1.y;
@@ -1085,12 +1087,15 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1085
1087
  getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
1086
1088
  layerElement.appendChild(markerCollection);
1087
1089
  }
1088
- var markerCluster = document.getElementById(maps.element.id + '_LayerIndex_0_markerCluster');
1090
+ var markerCluster = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_markerCluster');
1089
1091
  if (!isNullOrUndefined(markerCluster)) {
1090
1092
  markerCluster.remove();
1091
1093
  }
1092
1094
  if (zoomCheck) {
1093
- document.getElementById(maps.element.id + '_Layer_Collections').appendChild(layerElement);
1095
+ var layerGroupElement = document.getElementById(maps.element.id + '_Layer_Collections');
1096
+ if (!isNullOrUndefined(layerGroupElement)) {
1097
+ layerGroupElement.appendChild(layerElement);
1098
+ }
1094
1099
  }
1095
1100
  });
1096
1101
  }
@@ -1107,15 +1112,16 @@ function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
1107
1112
  var markerIndex = sameMarkerData[0].markerIndex;
1108
1113
  var dataIndex = sameMarkerData[0].dataIndex;
1109
1114
  var markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
1115
+ var marker = maps.layers[layerIndex].markerSettings[markerIndex];
1110
1116
  var clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
1111
- var clusterEle = getElement(clusterId);
1117
+ var clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElement(clusterId + '_Group') : getElement(clusterId);
1112
1118
  var clusterEleLabel = getElement(clusterId + '_datalabel_' + clusterIndex);
1113
1119
  clusterEle.setAttribute('visibility', 'visible');
1114
1120
  clusterEleLabel.setAttribute('visibility', 'visible');
1115
1121
  var markerEle;
1116
1122
  var markerDataLength = sameMarkerData[0].data.length;
1117
1123
  for (var i = 0; i < markerDataLength; i++) {
1118
- markerEle = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1124
+ markerEle = marker.shape === 'Balloon' ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1119
1125
  markerEle['style']['visibility'] = 'hidden';
1120
1126
  }
1121
1127
  removeElement(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine');
@@ -1137,13 +1143,13 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1137
1143
  var getElementFunction = isDom ? getElement : markerElement.querySelector.bind(markerElement);
1138
1144
  var getQueryConnect = isDom ? '' : '#';
1139
1145
  var markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
1146
+ var marker = maps.layers[layerIndex].markerSettings[markerIndex];
1140
1147
  var clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
1141
- var clusterEle = getElementFunction(getQueryConnect + '' + clusterId);
1148
+ var clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + clusterId + '_Group') : getElementFunction(getQueryConnect + '' + clusterId);
1142
1149
  var clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
1143
1150
  clusterEle.setAttribute('visibility', 'hidden');
1144
1151
  clusterEleLabel.setAttribute('visibility', 'hidden');
1145
- var marker = maps.layers[layerIndex].markerSettings[markerIndex];
1146
- var markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1152
+ var markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1147
1153
  var height = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().height : marker.height;
1148
1154
  var width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
1149
1155
  var centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
@@ -1179,7 +1185,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1179
1185
  var x1 = centerX + radius * Math.sin((Math.PI * 2 * newAngle) / 360);
1180
1186
  var y1 = centerY + radius * Math.cos((Math.PI * 2 * newAngle) / 360);
1181
1187
  path += start + 'L ' + (x1) + ' ' + y1 + ' ';
1182
- markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1188
+ markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1183
1189
  if (markerEle.parentElement.id.indexOf('Template_Group') > -1) {
1184
1190
  markerEle['style']['transform'] = '';
1185
1191
  markerEle['style']['left'] = maps.isTileMap ? x1 - (width / 2) + 'px' : (x1 - (width / 2) - 10) + 'px';
@@ -1200,7 +1206,12 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1200
1206
  markerElement = isDom ? getElementFunction(maps.element.id + '_Markers_Group') : markerElement;
1201
1207
  var groupEle = maps.renderer.createGroup({ id: maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine' });
1202
1208
  groupEle.appendChild(maps.renderer.drawPath(options));
1203
- markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0'));
1209
+ if (marker.shape === 'Balloon') {
1210
+ markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0_Group'));
1211
+ }
1212
+ else {
1213
+ markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0'));
1214
+ }
1204
1215
  }
1205
1216
  /**
1206
1217
  *
@@ -1227,6 +1238,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
1227
1238
  dashArray: markerSettings.dashArray, borderOpacity: isNullOrUndefined(eventArgs.border.opacity) ? markerSettings.opacity :
1228
1239
  eventArgs.border.opacity
1229
1240
  };
1241
+ removeElement(markerID);
1230
1242
  var ele = drawSymbols(eventArgs.shape, eventArgs.imageUrl, { x: 0, y: 0 }, markerID, shapeCustom, markerCollection, maps);
1231
1243
  var x = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x;
1232
1244
  var y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y;
@@ -1257,7 +1269,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
1257
1269
  */
1258
1270
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1259
1271
  function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
1260
- templateFn = getTemplateFunction(eventArgs.template);
1272
+ templateFn = getTemplateFunction(eventArgs.template, maps);
1261
1273
  if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
1262
1274
  var templateElement = templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false);
1263
1275
  var markerElement = convertElement(templateElement, markerID, data, markerIndex, maps);
@@ -1293,8 +1305,10 @@ function maintainSelection(elementId, elementClass, element, className) {
1293
1305
  if (elementId) {
1294
1306
  for (var index = 0; index < elementId.length; index++) {
1295
1307
  if (element.getAttribute('id') === elementId[index]) {
1296
- if (isNullOrUndefined(getElement(elementClass.id)) || index === 0) {
1297
- document.body.appendChild(elementClass);
1308
+ if (index === 0 || element.tagName === 'g') {
1309
+ if (!isNullOrUndefined(elementClass) && !isNullOrUndefined(elementClass.id)) {
1310
+ document.body.appendChild(elementClass);
1311
+ }
1298
1312
  if (element.id.indexOf('_MarkerIndex_') > -1 && element.childElementCount > 0) {
1299
1313
  element.children[0].setAttribute('class', className);
1300
1314
  }
@@ -1602,7 +1616,7 @@ function drawBalloon(maps, options, size, location, type, element) {
1602
1616
  var y = size.height / 30;
1603
1617
  balloon.setAttribute('transform', 'translate(' + location.x + ', ' + location.y + ') scale(' + x + ', ' + y + ')');
1604
1618
  if (type === 'Marker') {
1605
- var g = maps.renderer.createGroup({ id: options.id });
1619
+ var g = maps.renderer.createGroup({ id: options.id + '_Group' });
1606
1620
  appendShape(balloon, g);
1607
1621
  pathElement = appendShape(g, element);
1608
1622
  }
@@ -2020,7 +2034,12 @@ function getTranslate(mapObject, layer, animate) {
2020
2034
  }
2021
2035
  else {
2022
2036
  if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
2037
+ if (mapHeight === 0 || mapWidth === 0 || mapHeight === mapWidth) {
2038
+ mapWidth = size.width / 2;
2039
+ mapHeight = size.height;
2040
+ }
2023
2041
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2042
+ scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
2024
2043
  mapWidth *= scaleFactor;
2025
2044
  mapHeight *= scaleFactor;
2026
2045
  var widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
@@ -2069,8 +2088,9 @@ function getTranslate(mapObject, layer, animate) {
2069
2088
  mapObject.zoomTranslatePoint.y = y;
2070
2089
  }
2071
2090
  else {
2072
- if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
2091
+ if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1 || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
2073
2092
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2093
+ scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
2074
2094
  mapWidth *= scaleFactor;
2075
2095
  x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2076
2096
  mapHeight *= scaleFactor;
@@ -2227,6 +2247,8 @@ function getZoomTranslate(mapObject, layer, animate) {
2227
2247
  }
2228
2248
  }
2229
2249
  scaleFactor = (mapObject.enablePersistence) ? (mapObject.mapScaleValue === 0 ? 1 : mapObject.mapScaleValue) : scaleFactor;
2250
+ mapObject.widthBeforeRefresh = mapObject.availableSize.width;
2251
+ mapObject.heightBeforeRefresh = mapObject.availableSize.height;
2230
2252
  return { scale: animate ? 1 : scaleFactor, location: new Point(x, y) };
2231
2253
  }
2232
2254
  /**
@@ -2254,6 +2276,22 @@ function fixInitialScaleForTile(map) {
2254
2276
  function getElementByID(id) {
2255
2277
  return document.getElementById(id);
2256
2278
  }
2279
+ /**
2280
+ * Function to get clientElement from id.
2281
+ *
2282
+ * @param {string} id - Specifies the id
2283
+ * @returns {Element} - Returns the element
2284
+ * @private
2285
+ */
2286
+ function getClientElement(id) {
2287
+ var element = document.getElementById(id);
2288
+ if (!isNullOrUndefined(element)) {
2289
+ return element.getClientRects()[0];
2290
+ }
2291
+ else {
2292
+ return null;
2293
+ }
2294
+ }
2257
2295
  /**
2258
2296
  * To apply internalization
2259
2297
  *
@@ -2274,7 +2312,7 @@ function Internalize(maps, value) {
2274
2312
  * @private
2275
2313
  */
2276
2314
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2277
- function getTemplateFunction(template) {
2315
+ function getTemplateFunction(template, maps) {
2278
2316
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2279
2317
  var templateFn = null;
2280
2318
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2282,6 +2320,9 @@ function getTemplateFunction(template) {
2282
2320
  if (document.querySelectorAll(template).length) {
2283
2321
  templateFn = compile(document.querySelector(template).innerHTML.trim());
2284
2322
  }
2323
+ else if (maps.isVue || maps.isVue3) {
2324
+ templateFn = compile(template);
2325
+ }
2285
2326
  }
2286
2327
  catch (e) {
2287
2328
  templateFn = compile(template);
@@ -2685,6 +2726,7 @@ function createTooltip(id, text, top, left, fontSize) {
2685
2726
  'left:' + left.toString() + 'px;' +
2686
2727
  'color: #000000; ' +
2687
2728
  'background:' + '#FFFFFF' + ';' +
2729
+ 'z-index: 2;' +
2688
2730
  'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
2689
2731
  if (!tooltip) {
2690
2732
  tooltip = createElement('div', {
@@ -2873,6 +2915,7 @@ function changeBorderWidth(element, index, scale, maps) {
2873
2915
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2874
2916
  var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
2875
2917
  var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
2918
+ var circleRadius = maps.layersCollection[index].shapeSettings.circleRadius;
2876
2919
  if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
2877
2920
  value = checkShapeDataFields(
2878
2921
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2885,13 +2928,16 @@ function changeBorderWidth(element, index, scale, maps) {
2885
2928
  currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2886
2929
  }
2887
2930
  }
2931
+ else {
2932
+ currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2933
+ }
2888
2934
  }
2889
2935
  else {
2890
2936
  currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2891
2937
  }
2892
2938
  childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
2893
- if (element.id.indexOf('_LineString') > -1 && isNullOrUndefined(currentStroke)) {
2894
- childNode.setAttribute('stroke-width', (1 / scale).toString());
2939
+ if (element.id.indexOf('_Point') > -1 || element.id.indexOf('_MultiPoint') > -1) {
2940
+ childNode.setAttribute('r', (circleRadius / scale).toString());
2895
2941
  }
2896
2942
  }
2897
2943
  }
@@ -3085,7 +3131,10 @@ function animate(element, delay, duration, process, end) {
3085
3131
  else {
3086
3132
  window.cancelAnimationFrame(clearAnimation);
3087
3133
  end.call(_this, { element: element });
3088
- element.setAttribute('style', markerStyle);
3134
+ if (element.id.indexOf('Marker') > -1) {
3135
+ var markerElement = getElementByID(element.id.split('_Layer')[0] + '_Markers_Group');
3136
+ markerElement.setAttribute('style', markerStyle);
3137
+ }
3089
3138
  }
3090
3139
  };
3091
3140
  clearAnimation = window.requestAnimationFrame(startAnimation);
@@ -3413,11 +3462,11 @@ function getShapeColor(theme) {
3413
3462
  themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
3414
3463
  '#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
3415
3464
  break;
3416
- case 'fluentui':
3465
+ case 'fluent':
3417
3466
  themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
3418
3467
  '#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
3419
3468
  break;
3420
- case 'fluentuidark':
3469
+ case 'fluentdark':
3421
3470
  themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
3422
3471
  '#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
3423
3472
  break;
@@ -3558,6 +3607,7 @@ function getThemeStyle(theme) {
3558
3607
  backgroundColor: color,
3559
3608
  areaBackgroundColor: color,
3560
3609
  titleFontColor: '#FFFFFF',
3610
+ titleFontSize: '14px',
3561
3611
  subTitleFontColor: '#FFFFFF',
3562
3612
  legendTitleFontColor: '#DADADA',
3563
3613
  legendTextColor: '#DADADA',
@@ -3577,6 +3627,7 @@ function getThemeStyle(theme) {
3577
3627
  backgroundColor: '#000000',
3578
3628
  areaBackgroundColor: '#000000',
3579
3629
  titleFontColor: '#FFFFFF',
3630
+ titleFontSize: '14px',
3580
3631
  subTitleFontColor: '#FFFFFF',
3581
3632
  legendTitleFontColor: '#FFFFFF',
3582
3633
  legendTextColor: '#FFFFFF',
@@ -3706,7 +3757,7 @@ function getThemeStyle(theme) {
3706
3757
  shapeFill: '#495057'
3707
3758
  };
3708
3759
  break;
3709
- case 'fluentui':
3760
+ case 'fluent':
3710
3761
  style = {
3711
3762
  backgroundColor: 'rgba(255,255,255, 0.0)',
3712
3763
  areaBackgroundColor: 'rgba(255,255,255, 0.0)',
@@ -3729,7 +3780,7 @@ function getThemeStyle(theme) {
3729
3780
  shapeFill: '#F3F2F1'
3730
3781
  };
3731
3782
  break;
3732
- case 'fluentuidark':
3783
+ case 'fluentdark':
3733
3784
  style = {
3734
3785
  backgroundColor: 'rgba(255,255,255, 0.0)',
3735
3786
  areaBackgroundColor: 'rgba(255,255,255, 0.0)',
@@ -3757,6 +3808,7 @@ function getThemeStyle(theme) {
3757
3808
  backgroundColor: '#FFFFFF',
3758
3809
  areaBackgroundColor: '#FFFFFF',
3759
3810
  titleFontColor: '#424242',
3811
+ titleFontSize: '14px',
3760
3812
  subTitleFontColor: '#424242',
3761
3813
  legendTitleFontColor: '#757575',
3762
3814
  legendTextColor: '#757575',
@@ -3775,25 +3827,25 @@ function getThemeStyle(theme) {
3775
3827
  return style;
3776
3828
  }
3777
3829
 
3778
- var __extends$2 = (undefined && undefined.__extends) || (function () {
3779
- var extendStatics = function (d, b) {
3780
- extendStatics = Object.setPrototypeOf ||
3781
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3782
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3783
- return extendStatics(d, b);
3784
- };
3785
- return function (d, b) {
3786
- extendStatics(d, b);
3787
- function __() { this.constructor = d; }
3788
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3789
- };
3790
- })();
3791
- var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
3792
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3793
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3794
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3795
- return c > 3 && r && Object.defineProperty(target, key, r), r;
3796
- };
3830
+ var __extends$2 = (undefined && undefined.__extends) || (function () {
3831
+ var extendStatics = function (d, b) {
3832
+ extendStatics = Object.setPrototypeOf ||
3833
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3834
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
3835
+ return extendStatics(d, b);
3836
+ };
3837
+ return function (d, b) {
3838
+ extendStatics(d, b);
3839
+ function __() { this.constructor = d; }
3840
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3841
+ };
3842
+ })();
3843
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
3844
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3845
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3846
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3847
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3848
+ };
3797
3849
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
3798
3850
  /**
3799
3851
  * Maps base document
@@ -4281,7 +4333,7 @@ var SubTitleSettings = /** @__PURE__ @class */ (function (_super) {
4281
4333
  return _super !== null && _super.apply(this, arguments) || this;
4282
4334
  }
4283
4335
  __decorate$1([
4284
- Complex({ size: Theme.mapsSubTitleFont.size, fontWeight: null }, Font)
4336
+ Complex({ size: null, fontWeight: null, fontFamily: null }, Font)
4285
4337
  ], SubTitleSettings.prototype, "textStyle", void 0);
4286
4338
  __decorate$1([
4287
4339
  Property('Center')
@@ -4297,7 +4349,7 @@ var TitleSettings = /** @__PURE__ @class */ (function (_super) {
4297
4349
  return _super !== null && _super.apply(this, arguments) || this;
4298
4350
  }
4299
4351
  __decorate$1([
4300
- Complex({ size: Theme.mapsTitleFont.size, fontWeight: null }, Font)
4352
+ Complex({ size: null, fontWeight: null, fontFamily: null }, Font)
4301
4353
  ], TitleSettings.prototype, "textStyle", void 0);
4302
4354
  __decorate$1([
4303
4355
  Property('Center')
@@ -4441,7 +4493,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
4441
4493
  Property('')
4442
4494
  ], LegendSettings.prototype, "height", void 0);
4443
4495
  __decorate$1([
4444
- Complex({}, Font)
4496
+ Complex({ fontFamily: null }, Font)
4445
4497
  ], LegendSettings.prototype, "textStyle", void 0);
4446
4498
  __decorate$1([
4447
4499
  Property(15)
@@ -4462,7 +4514,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
4462
4514
  Complex({}, CommonTitleSettings)
4463
4515
  ], LegendSettings.prototype, "title", void 0);
4464
4516
  __decorate$1([
4465
- Complex(Theme.legendTitleFont, Font)
4517
+ Complex({ size: Theme.legendTitleFont.size, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: Theme.legendTitleFont.fontWeight, fontFamily: null }, Font)
4466
4518
  ], LegendSettings.prototype, "titleStyle", void 0);
4467
4519
  __decorate$1([
4468
4520
  Property('Bottom')
@@ -4725,7 +4777,7 @@ var LayerSettings = /** @__PURE__ @class */ (function (_super) {
4725
4777
  Property('Geometry')
4726
4778
  ], LayerSettings.prototype, "layerType", void 0);
4727
4779
  __decorate$1([
4728
- Property('https://a.tile.openstreetmap.org/level/tileX/tileY.png')
4780
+ Property('')
4729
4781
  ], LayerSettings.prototype, "urlTemplate", void 0);
4730
4782
  __decorate$1([
4731
4783
  Property(true)
@@ -4817,102 +4869,103 @@ var Marker = /** @__PURE__ @class */ (function () {
4817
4869
  this.trackElements = [];
4818
4870
  this.sameMarkerData = [];
4819
4871
  }
4820
- Marker.prototype.markerRender = function (layerElement, layerIndex, factor, type) {
4872
+ Marker.prototype.markerRender = function (maps, layerElement, layerIndex, factor, type) {
4821
4873
  var _this = this;
4822
4874
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4823
4875
  var templateFn;
4824
4876
  var markerCount = 0;
4825
4877
  var nullCount = 0;
4826
4878
  var markerTemplateCount = 0;
4827
- this.maps.translateType = 'marker';
4828
- var currentLayer = this.maps.layersCollection[layerIndex];
4829
- this.markerSVGObject = this.maps.renderer.createGroup({
4830
- id: this.maps.element.id + '_Markers_Group',
4879
+ maps.translateType = 'marker';
4880
+ var currentLayer = maps.layersCollection[layerIndex];
4881
+ this.markerSVGObject = maps.renderer.createGroup({
4882
+ id: maps.element.id + '_Markers_Group',
4831
4883
  class: 'GroupElement',
4832
4884
  style: 'pointer-events: auto;'
4833
4885
  });
4834
4886
  var markerTemplateEle = createElement('div', {
4835
- id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
4836
- className: this.maps.element.id + '_template',
4887
+ id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
4888
+ className: maps.element.id + '_template',
4837
4889
  styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
4838
- 'top:' + this.maps.mapAreaRect.y + 'px;' +
4839
- 'left:' + this.maps.mapAreaRect.x + 'px;' +
4840
- 'height:' + this.maps.mapAreaRect.height + 'px;' +
4841
- 'width:' + this.maps.mapAreaRect.width + 'px;'
4890
+ 'top:' + maps.mapAreaRect.y + 'px;' +
4891
+ 'left:' + maps.mapAreaRect.x + 'px;' +
4892
+ 'height:' + maps.mapAreaRect.height + 'px;' +
4893
+ 'width:' + maps.mapAreaRect.width + 'px;'
4842
4894
  });
4843
4895
  currentLayer.markerSettings.map(function (markerSettings, markerIndex) {
4844
4896
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4845
4897
  var markerData = markerSettings.dataSource;
4846
4898
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4847
4899
  Array.prototype.forEach.call(markerData, function (data, dataIndex) {
4848
- _this.maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : _this.maps.markerNullCount;
4900
+ maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
4849
4901
  var eventArgs = {
4850
4902
  cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
4851
4903
  width: markerSettings.width, imageUrl: markerSettings.imageUrl, shape: markerSettings.shape,
4852
- template: markerSettings.template, data: data, maps: _this.maps, marker: markerSettings,
4904
+ template: markerSettings.template, data: data, maps: maps, marker: markerSettings,
4853
4905
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
4854
4906
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
4855
4907
  };
4856
- _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
4908
+ maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
4857
4909
  eventArgs = markerColorChoose(eventArgs, data);
4858
4910
  eventArgs = markerShapeChoose(eventArgs, data);
4859
4911
  var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
4860
4912
  Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
4861
- parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : 0;
4913
+ parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : null;
4862
4914
  var lat = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
4863
4915
  Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
4864
- parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : 0;
4916
+ parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
4865
4917
  var offset = markerSettings.offset;
4866
4918
  if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(lng) && !isNullOrUndefined(lat)) {
4867
- var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
4919
+ var markerID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
4868
4920
  + markerIndex + '_dataIndex_' + dataIndex;
4869
- var location_1 = (_this.maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, _this.maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, _this.maps);
4870
- var animate$$1 = currentLayer.animationDuration !== 0 || isNullOrUndefined(_this.maps.zoomModule);
4921
+ var location_1 = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
4922
+ var animate$$1 = currentLayer.animationDuration !== 0 || isNullOrUndefined(maps.zoomModule);
4871
4923
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4872
- var translate = (_this.maps.isTileMap) ? (currentLayer.type === 'SubLayer' && isNullOrUndefined(_this.maps.zoomModule)) ? location_1 = convertTileLatLongToPoint(new MapLocation(lng, lat), _this.maps.tileZoomLevel, _this.maps.tileTranslatePoint, true) : new Object() :
4873
- !isNullOrUndefined(_this.maps.zoomModule) && _this.maps.zoomSettings.zoomFactor > 1 ?
4874
- getZoomTranslate(_this.maps, currentLayer, animate$$1) :
4875
- getTranslate(_this.maps, currentLayer, animate$$1);
4876
- var scale = type === 'AddMarker' ? _this.maps.scale : translate['scale'];
4877
- var transPoint = type === 'AddMarker' ? _this.maps.translatePoint : translate['location'];
4924
+ var translate = (maps.isTileMap) ? (currentLayer.type === 'SubLayer' && isNullOrUndefined(maps.zoomModule)) ? location_1 = convertTileLatLongToPoint(new MapLocation(lng, lat), maps.tileZoomLevel, maps.tileTranslatePoint, true) : new Object() :
4925
+ !isNullOrUndefined(maps.zoomModule) && maps.zoomSettings.zoomFactor > 1 ?
4926
+ getZoomTranslate(maps, currentLayer, animate$$1) :
4927
+ getTranslate(maps, currentLayer, animate$$1);
4928
+ var scale = type === 'AddMarker' ? maps.scale : translate['scale'];
4929
+ var transPoint = type === 'AddMarker' ? maps.translatePoint : translate['location'];
4878
4930
  if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
4879
4931
  markerTemplateCount++;
4880
- markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location_1, transPoint, scale, offset, _this.maps);
4932
+ markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location_1, transPoint, scale, offset, maps);
4881
4933
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4882
- _this.maps.renderReactTemplates();
4934
+ maps.renderReactTemplates();
4883
4935
  }
4884
4936
  else if (!eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
4885
4937
  markerCount++;
4886
- marker(eventArgs, markerSettings, markerData, dataIndex, location_1, transPoint, markerID, offset, scale, _this.maps, _this.markerSVGObject);
4938
+ marker(eventArgs, markerSettings, markerData, dataIndex, location_1, transPoint, markerID, offset, scale, maps, _this.markerSVGObject);
4887
4939
  }
4888
4940
  }
4889
4941
  nullCount += (!isNaN(lat) && !isNaN(lng)) ? 0 : 1;
4890
4942
  markerTemplateCount += (eventArgs.cancel) ? 1 : 0;
4891
4943
  markerCount += (eventArgs.cancel) ? 1 : 0;
4892
- _this.maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
4893
- var markerDataLength = markerData.length - _this.maps.markerNullCount;
4944
+ maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? maps.markerNullCount + 1 : maps.markerNullCount;
4945
+ var markerDataLength = markerData.length - maps.markerNullCount;
4894
4946
  if (_this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
4895
4947
  layerElement.appendChild(_this.markerSVGObject);
4896
4948
  if (currentLayer.markerClusterSettings.allowClustering) {
4897
- _this.maps.svgObject.appendChild(_this.markerSVGObject);
4898
- _this.maps.element.appendChild(_this.maps.svgObject);
4899
- if (currentLayer.layerType !== 'OSM' || !_this.maps.zoomSettings.enable) {
4900
- clusterTemplate(currentLayer, _this.markerSVGObject, _this.maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
4949
+ maps.svgObject.appendChild(_this.markerSVGObject);
4950
+ maps.element.appendChild(maps.svgObject);
4951
+ if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
4952
+ && maps.zoomSettings.enable) {
4953
+ layerElement.appendChild(_this.markerSVGObject);
4901
4954
  }
4902
4955
  else {
4903
- layerElement.appendChild(_this.markerSVGObject);
4956
+ clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
4904
4957
  }
4905
4958
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4906
- _this.maps.renderReactTemplates();
4959
+ maps.renderReactTemplates();
4907
4960
  }
4908
4961
  }
4909
- if (markerTemplateEle.childElementCount === (markerData.length - markerCount - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
4910
- getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
4911
- if (_this.maps.checkInitialRender) {
4962
+ if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
4963
+ getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
4964
+ if (maps.checkInitialRender) {
4912
4965
  if (currentLayer.markerClusterSettings.allowClustering) {
4913
- clusterTemplate(currentLayer, markerTemplateEle, _this.maps, layerIndex, _this.markerSVGObject, layerElement, false, false);
4966
+ clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, _this.markerSVGObject, layerElement, false, false);
4914
4967
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4915
- _this.maps.renderReactTemplates();
4968
+ maps.renderReactTemplates();
4916
4969
  }
4917
4970
  }
4918
4971
  }
@@ -5155,8 +5208,8 @@ var Marker = /** @__PURE__ @class */ (function () {
5155
5208
  }
5156
5209
  if ((target.indexOf('_cluster_') > -1)) {
5157
5210
  var isClusterSame = false;
5158
- var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? target.split('_datalabel_')[0] : target);
5159
- var indexes = clusterElement.innerHTML.split(',').map(Number);
5211
+ var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? layer.markerClusterSettings.shape === 'Balloon' ? target.split('_datalabel_')[0] + '_Group' : target.split('_datalabel_')[0] : layer.markerClusterSettings.shape === 'Balloon' ? target + '_Group' : target);
5212
+ var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerHTML.split(',').map(Number) : clusterElement.innerHTML.split(',').map(Number);
5160
5213
  collection_1 = [];
5161
5214
  for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
5162
5215
  var i = indexes_1[_i];
@@ -5225,14 +5278,14 @@ var Marker = /** @__PURE__ @class */ (function () {
5225
5278
  /**
5226
5279
  * To destroy the layers.
5227
5280
  *
5228
- * @param {Maps} maps - Specifies the instance of the map
5229
5281
  * @returns {void}
5230
5282
  * @private
5231
5283
  */
5232
- Marker.prototype.destroy = function (maps) {
5233
- /**
5234
- * Destroy method performed here
5235
- */
5284
+ Marker.prototype.destroy = function () {
5285
+ this.maps = null;
5286
+ this.trackElements = [];
5287
+ this.markerSVGObject = null;
5288
+ this.sameMarkerData = [];
5236
5289
  };
5237
5290
  return Marker;
5238
5291
  }());
@@ -5258,6 +5311,12 @@ var loaded = 'loaded';
5258
5311
  * @private
5259
5312
  */
5260
5313
  var click = 'click';
5314
+ /**
5315
+ * Specifies the maps onclick event name.
5316
+ *
5317
+ * @private
5318
+ */
5319
+ var onclick = 'onclick';
5261
5320
  /**
5262
5321
  * Specifies the maps right click event name.
5263
5322
  *
@@ -5452,9 +5511,21 @@ var BingMap = /** @__PURE__ @class */ (function () {
5452
5511
  }
5453
5512
  quadKey = quadKey + '' + digit;
5454
5513
  }
5455
- var subDomain = subDomains[Math.min(parseInt(quadKey.substr(quadKey.length - 1, 1), 10), subDomains.length)];
5456
- imageUrl = imageUrl.replace('{quadkey}', quadKey).replace('{subdomain}', subDomain);
5457
- return imageUrl += '&mkt=' + language + '&ur=IN&Key=' + key;
5514
+ if (!isNullOrUndefined(subDomains)) {
5515
+ var subDomain = subDomains[Math.min(parseInt(quadKey.substr(quadKey.length - 1, 1), 10), subDomains.length)];
5516
+ imageUrl = imageUrl.replace('{quadkey}', quadKey).replace('{subdomain}', subDomain);
5517
+ return imageUrl += '&mkt=' + language + '&ur=IN&Key=' + key;
5518
+ }
5519
+ else {
5520
+ return '';
5521
+ }
5522
+ };
5523
+ /**
5524
+ * @private
5525
+ */
5526
+ BingMap.prototype.destroy = function () {
5527
+ this.maps = null;
5528
+ this.subDomains = [];
5458
5529
  };
5459
5530
  return BingMap;
5460
5531
  }());
@@ -5727,8 +5798,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5727
5798
  else {
5728
5799
  this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption(this.mapObject.element.id + '_MapArea_ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
5729
5800
  x: this.mapObject.isTileMap ? 0 : areaRect.x, y: this.mapObject.isTileMap ? 0 : areaRect.y,
5730
- width: areaRect.width, height: (areaRect.height < 0) ? 0 : !isNullOrUndefined(this.mapObject.legendModule) &&
5731
- this.mapObject.legendModule.totalPages.length > 0 ? this.mapObject.legendModule.legendTotalRect.height : areaRect.height
5801
+ width: areaRect.width, height: areaRect.height
5732
5802
  }));
5733
5803
  }
5734
5804
  this.layerGroup.appendChild(this.clipRectElement);
@@ -5739,6 +5809,14 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5739
5809
  _this.currentLayer = layer;
5740
5810
  _this.processLayers(layer, index);
5741
5811
  });
5812
+ if (!isNullOrUndefined(this.mapObject.legendModule) && this.mapObject.legendSettings.position === 'Float') {
5813
+ if (this.mapObject.isTileMap) {
5814
+ this.layerGroup.appendChild(this.mapObject.legendModule.legendGroup);
5815
+ }
5816
+ else {
5817
+ this.mapObject.svgObject.appendChild(this.mapObject.legendModule.legendGroup);
5818
+ }
5819
+ }
5742
5820
  };
5743
5821
  /**
5744
5822
  * Tile rendering
@@ -5866,7 +5944,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5866
5944
  panel.layerObject.appendChild(panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex));
5867
5945
  }
5868
5946
  if (panel.mapObject.markerModule) {
5869
- panel.mapObject.markerModule.markerRender(panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
5947
+ panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
5870
5948
  }
5871
5949
  panel.translateLayerElements(panel.layerObject, layerIndex);
5872
5950
  panel.layerGroup.appendChild(panel.layerObject);
@@ -5898,9 +5976,21 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5898
5976
  };
5899
5977
  this.mapObject.trigger('layerRendering', eventArgs, function (observedArgs) {
5900
5978
  if (!eventArgs.cancel && eventArgs.visible) {
5901
- if (layer.layerType !== 'Geometry') {
5979
+ if (layer.layerType === 'OSM') {
5980
+ layer.urlTemplate = 'https://a.tile.openstreetmap.org/level/tileX/tileY.png';
5981
+ }
5982
+ if (layer.layerType === 'Google') {
5983
+ layer.urlTemplate = 'https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level';
5984
+ }
5985
+ if (layer.layerType !== 'Geometry' || (isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
5902
5986
  if (layer.layerType !== 'Bing' || _this.bing) {
5903
- _this.renderTileLayer(_this, layer, layerIndex);
5987
+ if (!isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate.indexOf('quadkey') > -1) {
5988
+ var bing = new BingMap(_this.mapObject);
5989
+ _this.bingMapCalculation(layer, layerIndex, _this, bing);
5990
+ }
5991
+ else {
5992
+ _this.renderTileLayer(_this, layer, layerIndex);
5993
+ }
5904
5994
  }
5905
5995
  else if (layer.key && layer.key.length > 1) {
5906
5996
  // eslint-disable-next-line @typescript-eslint/no-this-alias
@@ -5933,7 +6023,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5933
6023
  proxy_1.renderTileLayer(proxy_1, layer, layerIndex, bing_1);
5934
6024
  _this.mapObject.arrangeTemplate();
5935
6025
  if (_this.mapObject.zoomModule && (_this.mapObject.previousScale !== _this.mapObject.scale)) {
5936
- _this.mapObject.zoomModule.applyTransform(true);
6026
+ _this.mapObject.zoomModule.applyTransform(_this.mapObject, true);
5937
6027
  }
5938
6028
  };
5939
6029
  ajax.send();
@@ -5969,6 +6059,17 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5969
6059
  this.mapObject.baseMapBounds = null;
5970
6060
  }
5971
6061
  };
6062
+ LayerPanel.prototype.bingMapCalculation = function (layer, layerIndex, proxy, bing) {
6063
+ bing.imageUrl = layer.urlTemplate;
6064
+ bing.subDomains = ['t0', 't1', 't2', 't3'];
6065
+ bing.maxZoom = '21';
6066
+ proxy.mapObject['bingMap'] = bing;
6067
+ proxy.renderTileLayer(proxy, layer, layerIndex, bing);
6068
+ this.mapObject.arrangeTemplate();
6069
+ if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
6070
+ this.mapObject.zoomModule.applyTransform(this.mapObject, true);
6071
+ }
6072
+ };
5972
6073
  LayerPanel.prototype.bubbleCalculation = function (bubbleSettings, range) {
5973
6074
  if (bubbleSettings.dataSource != null && bubbleSettings != null) {
5974
6075
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6161,60 +6262,66 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6161
6262
  }
6162
6263
  break;
6163
6264
  case 'LineString':
6164
- path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
6165
6265
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6166
- currentShapeData.map(function (lineData) {
6167
- path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6266
+ currentShapeData.map(function (lineData, index) {
6267
+ if (index === 0) {
6268
+ path += 'M ' + (lineData['point']['x']) + ' ' + (lineData['point']['y']);
6269
+ }
6270
+ else {
6271
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6272
+ }
6273
+ });
6274
+ if (path.length > 3) {
6275
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, !isNullOrUndefined(eventArgs.fill) ? eventArgs.fill :
6276
+ eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6277
+ pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6278
+ }
6279
+ break;
6280
+ case 'MultiLineString':
6281
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6282
+ currentShapeData.map(function (multilineData) {
6283
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6284
+ multilineData.map(function (lineData, index) {
6285
+ if (index === 0) {
6286
+ path += 'M ' + (lineData['point']['x']) + ' ' + (lineData['point']['y']);
6287
+ }
6288
+ else {
6289
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6290
+ }
6291
+ });
6168
6292
  });
6169
6293
  if (path.length > 3) {
6170
- pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6294
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, !isNullOrUndefined(eventArgs.fill) ? eventArgs.fill :
6295
+ eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6171
6296
  pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6172
6297
  }
6173
6298
  break;
6174
6299
  case 'Point':
6175
6300
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6176
6301
  var pointData = currentShapeData['point'];
6177
- var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / _this.currentFactor;
6178
- circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, null);
6302
+ var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
6303
+ circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6179
6304
  pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6180
6305
  break;
6306
+ case 'MultiPoint':
6307
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6308
+ currentShapeData.map(function (multiPointData, index) {
6309
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6310
+ var pointData = multiPointData['point'];
6311
+ var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
6312
+ circleOptions = new CircleOption((shapeID + "_multiLine_" + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6313
+ pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6314
+ _this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6315
+ });
6316
+ break;
6181
6317
  case 'Path':
6182
6318
  path = currentShapeData['point'];
6183
6319
  pathOptions = new PathOption(shapeID, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6184
6320
  pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6185
6321
  break;
6186
6322
  }
6187
- if (!isNullOrUndefined(pathEle)) {
6188
- var property = (Object.prototype.toString.call(_this.currentLayer.shapePropertyPath) === '[object Array]' ?
6189
- _this.currentLayer.shapePropertyPath : [_this.currentLayer.shapePropertyPath]);
6190
- var properties = void 0;
6191
- for (var j = 0; j < property.length; j++) {
6192
- if (!isNullOrUndefined(currentShapeData['property'])) {
6193
- properties = property[j];
6194
- break;
6195
- }
6196
- }
6197
- pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6198
- (currentShapeData['property'][properties]) : ''));
6199
- pathEle.setAttribute('tabindex', (_this.mapObject.tabIndex + i + 3).toString());
6200
- if (drawingType === 'LineString') {
6201
- pathEle.setAttribute('style', 'outline:none');
6202
- }
6203
- maintainSelection(_this.mapObject.selectedElementId, _this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
6204
- if (_this.mapObject.toggledShapeElementId) {
6205
- for (var j = 0; j < _this.mapObject.toggledShapeElementId.length; j++) {
6206
- var styleProperty = _this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings ?
6207
- _this.currentLayer.shapeSettings : _this.mapObject.legendSettings.toggleLegendSettings;
6208
- if (_this.mapObject.toggledShapeElementId[j] === pathEle.id) {
6209
- pathEle.setAttribute('fill', styleProperty.fill);
6210
- pathEle.setAttribute('stroke', styleProperty.border.color);
6211
- pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
6212
- pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
6213
- pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
6214
- }
6215
- }
6216
- }
6217
- groupElement.appendChild(pathEle);
6323
+ if (!isNullOrUndefined(pathEle) && drawingType !== 'MultiPoint') {
6324
+ _this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6218
6325
  }
6219
6326
  if (i === _this.currentLayer.layerData.length - 1) {
6220
6327
  _this.layerFeatures(layerIndex, colors, renderData, labelTemplateEle);
@@ -6232,6 +6339,50 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6232
6339
  this.layerFeatures(layerIndex, colors, renderData, labelTemplateEle);
6233
6340
  }
6234
6341
  };
6342
+ /**
6343
+ * layer features as bubble, marker, datalabel, navigation line.
6344
+ *
6345
+ * @param {groupElement} Element - Specifies the element to append the group
6346
+ * @param {pathEle} Element - Specifies the svg element
6347
+ * @param {drawingType} string - Specifies the data type
6348
+ * @param {currentShapeData} any - Specifies the layer of shapedata.
6349
+ * @param {index} number - Specifies the tab index.
6350
+ * @returns {void}
6351
+ */
6352
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6353
+ LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType, currentShapeData, index) {
6354
+ var property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
6355
+ this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
6356
+ var properties;
6357
+ for (var j = 0; j < property.length; j++) {
6358
+ if (!isNullOrUndefined(currentShapeData['property'])) {
6359
+ properties = property[j];
6360
+ break;
6361
+ }
6362
+ }
6363
+ pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6364
+ (currentShapeData['property'][properties]) : ''));
6365
+ pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + index + 3).toString());
6366
+ pathEle.setAttribute('role', '');
6367
+ if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
6368
+ pathEle.setAttribute('style', 'outline:none');
6369
+ }
6370
+ maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
6371
+ if (this.mapObject.toggledShapeElementId) {
6372
+ for (var j = 0; j < this.mapObject.toggledShapeElementId.length; j++) {
6373
+ var styleProperty = this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings ?
6374
+ this.currentLayer.shapeSettings : this.mapObject.legendSettings.toggleLegendSettings;
6375
+ if (this.mapObject.toggledShapeElementId[j] === pathEle.id) {
6376
+ pathEle.setAttribute('fill', styleProperty.fill);
6377
+ pathEle.setAttribute('stroke', styleProperty.border.color);
6378
+ pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
6379
+ pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
6380
+ pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
6381
+ }
6382
+ }
6383
+ }
6384
+ groupElement.appendChild(pathEle);
6385
+ };
6235
6386
  /**
6236
6387
  * layer features as bubble, marker, datalabel, navigation line.
6237
6388
  *
@@ -6292,7 +6443,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6292
6443
  _this.layerObject.appendChild(element);
6293
6444
  });
6294
6445
  if (this.mapObject.markerModule) {
6295
- this.mapObject.markerModule.markerRender(this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
6446
+ this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
6296
6447
  : this.currentFactor), null);
6297
6448
  }
6298
6449
  this.translateLayerElements(this.layerObject, layerIndex);
@@ -6419,7 +6570,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6419
6570
  break;
6420
6571
  case 'linestring':
6421
6572
  var extraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6422
- this.currentLayer.shapeSettings.border.width : 1;
6573
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6574
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
6423
6575
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6424
6576
  coordinates.map(function (points, index) {
6425
6577
  latitude = points[1];
@@ -6434,31 +6586,61 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6434
6586
  newData['type'] = type;
6435
6587
  this.currentLayer.layerData.push(newData);
6436
6588
  break;
6437
- case 'point': {
6438
- var arrayCollections_1 = false;
6439
- var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6440
- this.currentLayer.shapeSettings.border.width : 1) + (this.currentLayer.shapeSettings.circleRadius * 2);
6589
+ case 'multilinestring':
6590
+ var extraSpaces_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6591
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6592
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
6593
+ var multiLineData_1 = [];
6441
6594
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6442
- coordinates.map(function (points, index) {
6443
- if (Object.prototype.toString.call(points) === '[object Array]') {
6595
+ coordinates.map(function (multiPoints) {
6596
+ newData = [];
6597
+ multiPoints.map(function (points) {
6444
6598
  latitude = points[1];
6445
6599
  longitude = points[0];
6446
- arrayCollections_1 = true;
6447
6600
  var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
6448
- _this.currentLayer.layerData.push({
6449
- point: point, type: type, lat: latitude, lng: longitude, property: properties
6601
+ _this.calculateBox(point, extraSpaces_1);
6602
+ newData.push({
6603
+ point: point, lat: latitude, lng: longitude
6450
6604
  });
6451
- }
6605
+ });
6606
+ multiLineData_1.push(newData);
6452
6607
  });
6453
- if (!arrayCollections_1) {
6454
- latitude = coordinates[1];
6455
- longitude = coordinates[0];
6456
- var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6457
- this.calculateBox(point, extraSpace_2);
6458
- this.currentLayer.layerData.push({
6459
- point: point, type: type, lat: latitude, lng: longitude, property: properties
6608
+ multiLineData_1['property'] = properties;
6609
+ multiLineData_1['type'] = type;
6610
+ this.currentLayer.layerData.push(multiLineData_1);
6611
+ break;
6612
+ case 'point':
6613
+ var pointExtraSpace = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6614
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6615
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
6616
+ (this.currentLayer.shapeSettings.circleRadius * 2);
6617
+ latitude = coordinates[1];
6618
+ longitude = coordinates[0];
6619
+ var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6620
+ this.calculateBox(point, pointExtraSpace);
6621
+ this.currentLayer.layerData.push({
6622
+ point: point, type: type, lat: latitude, lng: longitude, property: properties
6623
+ });
6624
+ break;
6625
+ case 'multipoint': {
6626
+ var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6627
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6628
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
6629
+ (this.currentLayer.shapeSettings.circleRadius * 2);
6630
+ newData = [];
6631
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6632
+ coordinates.map(function (points) {
6633
+ latitude = points[1];
6634
+ longitude = points[0];
6635
+ var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
6636
+ _this.calculateBox(point, extraSpace_2);
6637
+ newData.push({
6638
+ point: point, lat: latitude, lng: longitude
6460
6639
  });
6461
- }
6640
+ });
6641
+ newData['property'] = properties;
6642
+ newData['type'] = type;
6643
+ this.currentLayer.layerData.push(newData);
6462
6644
  break;
6463
6645
  }
6464
6646
  case 'path':
@@ -6470,12 +6652,12 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6470
6652
  };
6471
6653
  LayerPanel.prototype.calculateBox = function (point, extraSpace) {
6472
6654
  if (isNullOrUndefined(this.rectBounds)) {
6473
- this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
6655
+ this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace, y: point.y + extraSpace } };
6474
6656
  }
6475
6657
  else {
6476
- this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
6658
+ this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x - extraSpace);
6477
6659
  this.rectBounds['min']['y'] = Math.min(this.rectBounds['min']['y'], point.y - extraSpace);
6478
- this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x);
6660
+ this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x + extraSpace);
6479
6661
  this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
6480
6662
  }
6481
6663
  };
@@ -6493,6 +6675,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6493
6675
  var end = convertGeoToPoint(bounds.latitude.max, bounds.longitude.max, null, layer, this.mapObject);
6494
6676
  mapHeight = end.y - start.y;
6495
6677
  mapWidth = end.x - start.x;
6678
+ if (mapHeight === 0 || mapWidth === 0) {
6679
+ mapWidth = mapSize.width / 2;
6680
+ mapHeight = mapSize.height;
6681
+ }
6496
6682
  }
6497
6683
  else {
6498
6684
  mapHeight = mapWidth = 500;
@@ -6587,15 +6773,28 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6587
6773
  _this.calculateRectBox(point[0]);
6588
6774
  });
6589
6775
  break;
6776
+ case 'multilinestring':
6777
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6778
+ coordinates.map(function (multiPoint, index) {
6779
+ multiPoint.map(function (point, index) {
6780
+ _this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
6781
+ });
6782
+ });
6783
+ break;
6590
6784
  case 'linestring':
6591
6785
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6592
6786
  coordinates.map(function (point, index) {
6593
- _this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
6787
+ _this.calculateRectBox(point, 'linestring', index === 0 ? true : false);
6594
6788
  });
6595
6789
  break;
6596
6790
  case 'point':
6597
6791
  _this.calculateRectBox(coordinates, 'point');
6598
6792
  break;
6793
+ case 'multipoint':
6794
+ coordinates.map(function (point, index) {
6795
+ _this.calculateRectBox(point, 'multipoint', index === 0 ? true : false);
6796
+ });
6797
+ break;
6599
6798
  }
6600
6799
  }
6601
6800
  });
@@ -6634,7 +6833,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6634
6833
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6635
6834
  LayerPanel.prototype.calculateRectBox = function (coordinates, type, isFirstItem) {
6636
6835
  var _this = this;
6637
- if (type !== 'LineString' && type !== 'point') {
6836
+ if ((type !== 'linestring' && type !== 'multilinestring') && (type !== 'point' && type !== 'multipoint')) {
6638
6837
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6639
6838
  Array.prototype.forEach.call(coordinates, function (currentCoords) {
6640
6839
  if (isNullOrUndefined(_this.mapObject.baseMapBounds)) {
@@ -6703,7 +6902,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6703
6902
  var tile = new Tile(tileI % ycount, j);
6704
6903
  tile.left = x;
6705
6904
  tile.top = y;
6706
- if (baseLayer.layerType === 'Bing') {
6905
+ if (baseLayer.layerType === 'Bing' || (bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
6707
6906
  var key = baseLayer.key;
6708
6907
  tile.src = bing.getBingMap(tile, key, baseLayer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
6709
6908
  }
@@ -6732,11 +6931,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6732
6931
  if (!(layer.type === 'SubLayer' && layer.visible)) {
6733
6932
  continue;
6734
6933
  }
6735
- if (layer.layerType === 'OSM' || layer.layerType === 'Bing') {
6934
+ if ((layer.layerType !== 'Geometry' && layer.layerType !== 'GoogleStaticMap') || (layer.layerType === 'Geometry' &&
6935
+ isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
6736
6936
  for (var _b = 0, proxTiles_1 = proxTiles; _b < proxTiles_1.length; _b++) {
6737
6937
  var baseTile = proxTiles_1[_b];
6738
6938
  var subtile = extend({}, baseTile, {}, true);
6739
6939
  if (layer.layerType === 'Bing') {
6940
+ bing = new BingMap(this.mapObject);
6740
6941
  subtile.src = bing.getBingMap(subtile, layer.key, layer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
6741
6942
  }
6742
6943
  else {
@@ -6782,7 +6983,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6782
6983
  else {
6783
6984
  if (type !== 'Pan' && element1 && element) {
6784
6985
  element1.appendChild(element.children[0]);
6785
- if (!isNullOrUndefined(document.getElementById(_this.mapObject.element.id + '_animated_tiles'))) {
6986
+ if (!_this.mapObject.isAddLayer && !isNullOrUndefined(document.getElementById(_this.mapObject.element.id + '_animated_tiles'))) {
6786
6987
  document.getElementById(_this.mapObject.element.id + '_animated_tiles').id =
6787
6988
  _this.mapObject.element.id + '_animated_tiles_old';
6788
6989
  }
@@ -6796,7 +6997,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6796
6997
  var id = 0;
6797
6998
  var _loop_3 = function (tile) {
6798
6999
  var imgElement = createElement('img');
7000
+ imgElement.setAttribute('height', '256px');
7001
+ imgElement.setAttribute('width', '256px');
6799
7002
  imgElement.setAttribute('src', tile.src);
7003
+ imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
6800
7004
  var mapId = _this.mapObject.element.id;
6801
7005
  imgElement.onload = function () {
6802
7006
  if (document.getElementById(mapId + '_tile_' + id) && type === 'Pan') {
@@ -6908,7 +7112,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6908
7112
  '&zoom=' + zoom + '&center=' + center + '&maptype=' + mapType + '&key=' + apikey;
6909
7113
  document.getElementById(this.mapObject.element.id + '_tile_parent').innerHTML
6910
7114
  = '<div id="' + this.mapObject.element.id + '_StaticGoogleMap"' + 'style="position:absolute; left:' + eleWidth + 'px; top:'
6911
- + eleHeight + 'px"><img src="' + staticMapString + '"></div>';
7115
+ + eleHeight + 'px"><img src="' + staticMapString + '"' + 'alt="' + this.mapObject.getLocalizedLabel('ImageNotFound') + '"></div>';
6912
7116
  };
6913
7117
  /**
6914
7118
  * To find the tile translate point
@@ -6966,6 +7170,27 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6966
7170
  this.mapObject.previousTileHeight = factorY;
6967
7171
  return new Point(x, y);
6968
7172
  };
7173
+ /**
7174
+ * @returns {void}
7175
+ * @private
7176
+ */
7177
+ LayerPanel.prototype.destroy = function () {
7178
+ this.mapObject = null;
7179
+ this.groupElements = [];
7180
+ this.layerObject = null;
7181
+ this.currentLayer = null;
7182
+ this.rectBounds = null;
7183
+ this.tiles = [];
7184
+ this.clipRectElement = null;
7185
+ this.tileSvgObject = null;
7186
+ this.ajaxModule = null;
7187
+ this.ajaxResponse = [];
7188
+ this.layerGroup = null;
7189
+ if (!isNullOrUndefined(this.bing)) {
7190
+ this.bing.destroy();
7191
+ }
7192
+ this.bing = null;
7193
+ };
6969
7194
  return LayerPanel;
6970
7195
  }());
6971
7196
 
@@ -7021,7 +7246,7 @@ var Annotations = /** @__PURE__ @class */ (function () {
7021
7246
  if (argsData.cancel) {
7022
7247
  return;
7023
7248
  }
7024
- templateFn = getTemplateFunction(argsData.content);
7249
+ templateFn = getTemplateFunction(argsData.content, _this.map);
7025
7250
  if (templateFn && templateFn(_this.map, _this.map, argsData.content, _this.map.element.id + '_ContentTemplate_' + annotationIndex).length) {
7026
7251
  templateElement = Array.prototype.slice.call(templateFn(_this.map, _this.map, argsData.content, _this.map.element.id + '_ContentTemplate_' + annotationIndex));
7027
7252
  var length_1 = templateElement.length;
@@ -7081,35 +7306,34 @@ var Annotations = /** @__PURE__ @class */ (function () {
7081
7306
  /**
7082
7307
  * To destroy the annotation.
7083
7308
  *
7084
- * @param {Maps} map - Specifies the instance of the maps
7085
7309
  * @returns {void}
7086
7310
  * @private
7087
7311
  */
7088
- Annotations.prototype.destroy = function (map) {
7089
- // Destroy method performed here
7312
+ Annotations.prototype.destroy = function () {
7313
+ this.map = null;
7090
7314
  };
7091
7315
  return Annotations;
7092
7316
  }());
7093
7317
 
7094
- var __extends = (undefined && undefined.__extends) || (function () {
7095
- var extendStatics = function (d, b) {
7096
- extendStatics = Object.setPrototypeOf ||
7097
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7098
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7099
- return extendStatics(d, b);
7100
- };
7101
- return function (d, b) {
7102
- extendStatics(d, b);
7103
- function __() { this.constructor = d; }
7104
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7105
- };
7106
- })();
7107
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7108
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7109
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7110
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
7111
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7112
- };
7318
+ var __extends = (undefined && undefined.__extends) || (function () {
7319
+ var extendStatics = function (d, b) {
7320
+ extendStatics = Object.setPrototypeOf ||
7321
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
7322
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7323
+ return extendStatics(d, b);
7324
+ };
7325
+ return function (d, b) {
7326
+ extendStatics(d, b);
7327
+ function __() { this.constructor = d; }
7328
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7329
+ };
7330
+ })();
7331
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
7332
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
7333
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7334
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
7335
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7336
+ };
7113
7337
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
7114
7338
  /* eslint-disable @typescript-eslint/no-unused-vars */
7115
7339
  /* eslint-disable radix */
@@ -7148,6 +7372,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7148
7372
  * Resize the map
7149
7373
  */
7150
7374
  _this.isResize = false;
7375
+ /**
7376
+ * @private
7377
+ */
7378
+ _this.isReset = false;
7151
7379
  /** @private */
7152
7380
  _this.baseSize = new Size(0, 0);
7153
7381
  /** @public */
@@ -7305,6 +7533,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7305
7533
  this.renderArea();
7306
7534
  this.processRequestJsonData();
7307
7535
  this.renderComplete();
7536
+ this.isAddLayer = !this.isTileMap ? false : this.isAddLayer;
7308
7537
  };
7309
7538
  /**
7310
7539
  * To Initialize the control rendering.
@@ -7445,16 +7674,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7445
7674
  };
7446
7675
  Maps.prototype.renderMap = function () {
7447
7676
  if (this.legendModule && this.legendSettings.visible) {
7448
- if (!this.isTileMap) {
7449
- this.legendModule.renderLegend();
7450
- }
7451
- else {
7452
- var layerCount = this.layersCollection.length - 1;
7453
- if (!this.layersCollection[layerCount].isBaseLayer) {
7454
- this.isTileMapSubLayer = true;
7455
- this.legendModule.renderLegend();
7456
- }
7457
- }
7677
+ this.legendModule.renderLegend();
7458
7678
  }
7459
7679
  this.createTile();
7460
7680
  if (this.zoomSettings.enable && this.zoomModule) {
@@ -7465,7 +7685,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7465
7685
  this.dataLabelShape = [];
7466
7686
  }
7467
7687
  this.mapLayerPanel.measureLayerPanel();
7468
- this.element.appendChild(this.svgObject);
7688
+ if (!isNullOrUndefined(this.svgObject)) {
7689
+ this.element.appendChild(this.svgObject);
7690
+ }
7469
7691
  var position = this.getExtraPosition();
7470
7692
  for (var i = 0; i < this.layers.length; i++) {
7471
7693
  if (position.x !== 0 || position.y !== 0) {
@@ -7488,12 +7710,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7488
7710
  this.checkInitialRender = false;
7489
7711
  }
7490
7712
  }
7491
- for (var k = 0; k < this.layers[i].markerSettings.length; k++) {
7492
- if (this.layers[i].markerSettings[k].selectionSettings && this.layers[i].markerSettings[k].selectionSettings.enable
7493
- && this.layers[i].markerSettings[k].initialMarkerSelection.length > 0) {
7494
- var markerSelectionValues = this.layers[i].markerSettings[k].initialMarkerSelection;
7495
- for (var j = 0; j < markerSelectionValues.length; j++) {
7496
- this.markerInitialSelection(i, k, this.layers[i].markerSettings[k], markerSelectionValues[j].latitude, markerSelectionValues[j].longitude);
7713
+ if (!this.isResize) {
7714
+ for (var k = 0; k < this.layers[i].markerSettings.length; k++) {
7715
+ if (this.layers[i].markerSettings[k].selectionSettings && this.layers[i].markerSettings[k].selectionSettings.enable
7716
+ && this.layers[i].markerSettings[k].initialMarkerSelection.length > 0) {
7717
+ var markerSelectionValues = this.layers[i].markerSettings[k].initialMarkerSelection;
7718
+ for (var j = 0; j < markerSelectionValues.length; j++) {
7719
+ this.markerInitialSelection(i, k, this.layers[i].markerSettings[k], markerSelectionValues[j].latitude, markerSelectionValues[j].longitude);
7720
+ }
7497
7721
  }
7498
7722
  }
7499
7723
  }
@@ -7535,12 +7759,16 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7535
7759
  bottom = svg.bottom - tile.bottom - element.offsetTop;
7536
7760
  top_1 = parseFloat(tileElement.style.top) + element.offsetTop;
7537
7761
  }
7538
- top_1 = (bottom <= 11) ? top_1 : (top_1 * 2);
7539
- left = (bottom <= 11) ? left : (left * 2);
7762
+ top_1 = (bottom <= 11) ? top_1 : (!isNullOrUndefined(this.legendModule) && this.legendSettings.position === 'Bottom') ? this.mapAreaRect.y : (top_1 * 2);
7763
+ left = (bottom <= 11) ? left : !isNullOrUndefined(this.legendModule) ? left : (left * 2);
7540
7764
  tileElement.style.top = top_1 + 'px';
7541
7765
  tileElement.style.left = left + 'px';
7542
7766
  tileElement1.style.top = top_1 + 'px';
7543
7767
  tileElement1.style.left = left + 'px';
7768
+ if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
7769
+ tileElement.style.height = tileElement1.style.height = this.legendModule.legendTotalRect.height + 'px';
7770
+ tileElement.style.width = tileElement1.style.width = this.legendModule.legendTotalRect.width + 'px';
7771
+ }
7544
7772
  }
7545
7773
  this.arrangeTemplate();
7546
7774
  if (this.annotationsModule) {
@@ -7571,7 +7799,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7571
7799
  Maps.prototype.markerSelection = function (selectionSettings, map, targetElement, data) {
7572
7800
  var border = {
7573
7801
  color: selectionSettings.border.color,
7574
- width: selectionSettings.border.width / map.scale
7802
+ width: selectionSettings.border.width / map.scale,
7803
+ opacity: selectionSettings.border.opacity
7575
7804
  };
7576
7805
  var markerSelectionProperties = {
7577
7806
  opacity: selectionSettings.opacity,
@@ -7591,9 +7820,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7591
7820
  if (this.selectedMarkerElementId.length === 0 || selectionSettings.enableMultiSelect) {
7592
7821
  if (targetElement.tagName === 'g') {
7593
7822
  targetElement.children[0].setAttribute('class', 'MarkerselectionMapStyle');
7823
+ this.selectedMarkerElementId.push(targetElement.children[0].id);
7594
7824
  }
7595
7825
  else {
7596
7826
  targetElement.setAttribute('class', 'MarkerselectionMapStyle');
7827
+ this.selectedMarkerElementId.push(targetElement.id);
7597
7828
  }
7598
7829
  }
7599
7830
  };
@@ -7645,6 +7876,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7645
7876
  */
7646
7877
  Maps.prototype.addTabIndex = function () {
7647
7878
  this.element.setAttribute('aria-label', this.description || 'Maps Element');
7879
+ this.element.setAttribute('role', '');
7648
7880
  this.element.setAttribute('tabindex', this.tabIndex.toString());
7649
7881
  };
7650
7882
  // private setSecondaryElementPosition(): void {
@@ -7663,12 +7895,21 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7663
7895
  this.zoomModule.layerCollectionEle = getElementByID(this.element.id + '_Layer_Collections');
7664
7896
  }
7665
7897
  if (this.isTileMap && getElementByID(this.element.id + '_Tile_SVG') && getElementByID(this.element.id + '_tile_parent')) {
7666
- var tileRect = getElementByID(this.element.id + '_tile_parent').getBoundingClientRect();
7667
- var tileSvgRect = getElementByID(this.element.id + '_Tile_SVG').getBoundingClientRect();
7898
+ var tileElement = getElementByID(this.element.id + '_tile_parent');
7899
+ var tileSvgElement = getElementByID(this.element.id + '_Tile_SVG');
7900
+ var tileSvgParentElement = getElementByID(this.element.id + '_Tile_SVG_Parent');
7901
+ var tileRect = tileElement.getBoundingClientRect();
7902
+ var tileSvgRect = tileSvgElement.getBoundingClientRect();
7668
7903
  left = (tileRect.left - tileSvgRect.left);
7669
7904
  top = (tileRect.top - tileSvgRect.top);
7670
- getElementByID(this.element.id + '_Tile_SVG_Parent').style.left = left + 'px';
7671
- getElementByID(this.element.id + '_Tile_SVG_Parent').style.top = top + 'px';
7905
+ tileSvgParentElement.style.left = left + 'px';
7906
+ tileSvgParentElement.style.top = top + 'px';
7907
+ if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
7908
+ tileElement.style.width = tileSvgElement.style.width = this.legendModule.legendTotalRect.width.toString();
7909
+ tileElement.style.height = tileSvgElement.style.height = this.legendModule.legendTotalRect.height.toString();
7910
+ tileSvgParentElement.style.width = this.legendModule.legendTotalRect.width + 'px';
7911
+ tileSvgParentElement.style.height = this.legendModule.legendTotalRect.height + 'px';
7912
+ }
7672
7913
  var markerTemplateElements = document.getElementsByClassName('template');
7673
7914
  if (!isNullOrUndefined(markerTemplateElements) && markerTemplateElements.length > 0) {
7674
7915
  for (var i = 0; i < markerTemplateElements.length; i++) {
@@ -7686,7 +7927,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7686
7927
  if (!isNullOrUndefined(elements) && elements.childElementCount > 0) {
7687
7928
  for (var i = 0; i < elements.childNodes.length; i++) {
7688
7929
  var childElement = elements.childNodes[i];
7689
- if (childElement.tagName === 'g') {
7930
+ if (childElement.tagName === 'g' && childElement.id.indexOf('_Legend_Group') == -1) {
7690
7931
  var layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
7691
7932
  for (var j = 0; j < childElement.childNodes.length; j++) {
7692
7933
  var childNode = childElement.childNodes[j];
@@ -7700,7 +7941,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7700
7941
  }
7701
7942
  }
7702
7943
  if (this.zoomModule && (this.previousScale !== this.scale)) {
7703
- this.zoomModule.applyTransform(true);
7944
+ this.zoomModule.applyTransform(this, true);
7704
7945
  }
7705
7946
  }
7706
7947
  };
@@ -7723,7 +7964,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7723
7964
  }
7724
7965
  var templateElements = document.getElementsByClassName(this.element.id + '_template');
7725
7966
  if (!isNullOrUndefined(templateElements) && templateElements.length > 0 &&
7726
- getElementByID(this.element.id + '_Layer_Collections') && this.layers[this.layers.length - 1].layerType !== 'OSM') {
7967
+ getElementByID(this.element.id + '_Layer_Collections') && !this.isTileMap) {
7727
7968
  for (var i = 0; i < templateElements.length; i++) {
7728
7969
  var offSetLetValue = 0;
7729
7970
  var offSetTopValue = 0;
@@ -7758,10 +7999,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7758
7999
  var mainLayer = this.layersCollection[0];
7759
8000
  var padding = 0;
7760
8001
  if (mainLayer.isBaseLayer && (mainLayer.layerType === 'OSM' || mainLayer.layerType === 'Bing' ||
7761
- mainLayer.layerType === 'GoogleStaticMap' || mainLayer.layerType === 'Google')) {
7762
- if (mainLayer.layerType === 'Google') {
7763
- mainLayer.urlTemplate = 'https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level';
7764
- }
8002
+ mainLayer.layerType === 'GoogleStaticMap' || mainLayer.layerType === 'Google' || (!isNullOrUndefined(mainLayer.urlTemplate) && mainLayer.urlTemplate !== ''))) {
7765
8003
  removeElement(this.element.id + '_tile_parent');
7766
8004
  removeElement(this.element.id + '_tiles');
7767
8005
  removeElement('animated_tiles');
@@ -7809,7 +8047,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7809
8047
  var baseLayer = mainLayers[i];
7810
8048
  if (baseLayer.visible && baseIndex === i) {
7811
8049
  baseLayer.isBaseLayer = true;
7812
- this.isTileMap = (baseLayer.layerType === 'Geometry') ? false : true;
8050
+ this.isTileMap = (baseLayer.layerType === 'Geometry' && !isNullOrUndefined(baseLayer.shapeData)) ? false : true;
7813
8051
  this.layersCollection.push(baseLayer);
7814
8052
  break;
7815
8053
  }
@@ -7856,12 +8094,19 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7856
8094
  * @private
7857
8095
  */
7858
8096
  Maps.prototype.renderTitle = function (title, type, bounds, groupEle) {
7859
- var style = title.textStyle;
8097
+ var style = {
8098
+ size: title.textStyle.size,
8099
+ color: title.textStyle.color,
8100
+ fontFamily: title.textStyle.fontFamily,
8101
+ fontWeight: title.textStyle.fontWeight,
8102
+ fontStyle: title.textStyle.fontStyle,
8103
+ opacity: title.textStyle.opacity
8104
+ };
7860
8105
  var height;
7861
8106
  var width = Math.abs((this.margin.left + this.margin.right) - this.availableSize.width);
7862
- style.fontFamily = this.themeStyle.fontFamily || style.fontFamily;
8107
+ style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
7863
8108
  style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
7864
- style.size = this.themeStyle.titleFontSize || style.size;
8109
+ style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || Theme.mapsSubTitleFont.size);
7865
8110
  if (title.text) {
7866
8111
  if (isNullOrUndefined(groupEle)) {
7867
8112
  groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
@@ -7874,6 +8119,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7874
8119
  var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
7875
8120
  var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
7876
8121
  element.setAttribute('aria-label', this.description || title.text);
8122
+ element.setAttribute('role', '');
7877
8123
  if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
7878
8124
  height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
7879
8125
  this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
@@ -8031,6 +8277,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8031
8277
  var id = event.target['id'];
8032
8278
  event.preventDefault();
8033
8279
  if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
8280
+ this.mapAreaRect = this.legendModule.initialMapAreaRect;
8034
8281
  this.legendModule.currentPage = (id.indexOf('_Left_Page_') > -1) ? (this.legendModule.currentPage - 1) :
8035
8282
  (this.legendModule.currentPage + 1);
8036
8283
  this.legendModule.legendGroup = this.renderer.createGroup({ id: this.element.id + '_Legend_Group' });
@@ -8095,33 +8342,47 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8095
8342
  latitude: latitude, longitude: longitude,
8096
8343
  isShapeSelected: this.SelectedElement(targetEle)
8097
8344
  };
8098
- this.trigger('click', eventArgs_1, function (mouseArgs) {
8099
- if (targetEle.id.indexOf('shapeIndex') > -1) {
8100
- _this.mergeCluster();
8101
- if (getElement(_this.element.id + '_mapsTooltip') &&
8102
- _this.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_') > -1) {
8103
- removeElement(_this.element.id + '_mapsTooltip');
8104
- }
8105
- }
8106
- if (_this.markerModule) {
8107
- _this.markerModule.markerClusterClick(e);
8108
- }
8109
- if (!eventArgs_1.cancel) {
8110
- _this.notify(click, targetEle);
8111
- }
8112
- if (!eventArgs_1.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
8113
- var layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
8114
- var shapeSelectedEventArgs = triggerShapeEvent(targetId, _this.layers[layerIndex].selectionSettings, _this, shapeSelected);
8115
- if (!shapeSelectedEventArgs.cancel && _this.selectionModule && !isNullOrUndefined(_this.shapeSelected)) {
8116
- customizeStyle(_this.selectionModule.selectionType + 'selectionMap', _this.selectionModule.selectionType + 'selectionMapStyle', shapeSelectedEventArgs);
8117
- }
8118
- else if (shapeSelectedEventArgs.cancel && _this.selectionModule
8119
- && isNullOrUndefined(shapeSelectedEventArgs['data'])) {
8120
- removeClass(targetEle);
8121
- _this.selectionModule.removedSelectionList(targetEle);
8122
- }
8123
- }
8124
- });
8345
+ if (this.onclick) {
8346
+ eventArgs_1.name = onclick;
8347
+ this.trigger('onclick', eventArgs_1, function (mouseArgs) {
8348
+ _this.clickHandler(e, eventArgs_1, targetEle);
8349
+ });
8350
+ }
8351
+ else {
8352
+ this.trigger('click', eventArgs_1, function (mouseArgs) {
8353
+ _this.clickHandler(e, eventArgs_1, targetEle);
8354
+ });
8355
+ }
8356
+ }
8357
+ };
8358
+ Maps.prototype.clickHandler = function (e, eventArgs, targetEle) {
8359
+ if (targetEle.id.indexOf('shapeIndex') > -1) {
8360
+ this.mergeCluster();
8361
+ if (getElement(this.element.id + '_mapsTooltip') &&
8362
+ this.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_') > -1) {
8363
+ removeElement(this.element.id + '_mapsTooltip');
8364
+ }
8365
+ }
8366
+ if (this.markerModule) {
8367
+ this.markerModule.markerClusterClick(e);
8368
+ }
8369
+ if (!eventArgs.cancel) {
8370
+ this.notify(click, targetEle);
8371
+ }
8372
+ if (!eventArgs.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
8373
+ this.triggerShapeSelection(targetEle);
8374
+ }
8375
+ };
8376
+ Maps.prototype.triggerShapeSelection = function (targetEle) {
8377
+ var layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
8378
+ var shapeSelectedEventArgs = triggerShapeEvent(targetEle.id, this.layers[layerIndex].selectionSettings, this, shapeSelected);
8379
+ if (!shapeSelectedEventArgs.cancel && this.selectionModule && !isNullOrUndefined(this.shapeSelected)) {
8380
+ customizeStyle(this.selectionModule.selectionType + 'selectionMap', this.selectionModule.selectionType + 'selectionMapStyle', shapeSelectedEventArgs);
8381
+ }
8382
+ else if (shapeSelectedEventArgs.cancel && this.selectionModule
8383
+ && isNullOrUndefined(shapeSelectedEventArgs['data'])) {
8384
+ removeClass(targetEle);
8385
+ this.selectionModule.removedSelectionList(targetEle);
8125
8386
  }
8126
8387
  };
8127
8388
  Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y) {
@@ -8209,13 +8470,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8209
8470
  latitude = latLongValue.latitude;
8210
8471
  longitude = latLongValue.longitude;
8211
8472
  }
8212
- var eventArgs = {
8213
- cancel: false, name: click, target: targetId, x: e.clientX, y: e.clientY,
8214
- latitude: latitude, longitude: longitude, isShapeSelected: this.SelectedElement(targetEle)
8215
- };
8216
- // eslint-disable-next-line @typescript-eslint/no-empty-function
8217
- this.trigger('click', eventArgs, function (mouseArgs) {
8218
- });
8219
8473
  }
8220
8474
  this.titleTooltip(e, pageX, pageY, true);
8221
8475
  if (!isNullOrUndefined(this.legendModule)) {
@@ -8223,7 +8477,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8223
8477
  }
8224
8478
  }
8225
8479
  this.notify(Browser.touchEndEvent, e);
8226
- if (e.cancelable) {
8480
+ if (e.cancelable && !this.isTouch) {
8227
8481
  e.preventDefault();
8228
8482
  }
8229
8483
  return false;
@@ -8245,6 +8499,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8245
8499
  var markerModule = this.markerModule;
8246
8500
  if (element.id.indexOf('shapeIndex') > -1 || element.id.indexOf('Tile') > -1) {
8247
8501
  this.mergeCluster();
8502
+ if (element.id.indexOf('shapeIndex') > -1) {
8503
+ this.triggerShapeSelection(element);
8504
+ }
8248
8505
  }
8249
8506
  if (markerModule) {
8250
8507
  markerModule.markerClick(e);
@@ -8374,14 +8631,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8374
8631
  removeElement(this.element.id + '_EJ2_LegendTitle_Tooltip');
8375
8632
  }
8376
8633
  if ((targetId === (this.element.id + '_Map_title')) && (event.target.textContent.indexOf('...') > -1)) {
8377
- showTooltip(this.titleSettings.text, this.titleSettings.textStyle.size, x, y, this.element.offsetWidth, this.element.offsetHeight, this.element.id + '_EJ2_Title_Tooltip', getElement(this.element.id + '_Secondary_Element'), isTouch);
8634
+ showTooltip(this.titleSettings.text, this.titleSettings.textStyle.size || this.themeStyle.titleFontSize, x, y, this.element.offsetWidth, this.element.offsetHeight, this.element.id + '_EJ2_Title_Tooltip', getElement(this.element.id + '_Secondary_Element'), isTouch);
8378
8635
  }
8379
8636
  else {
8380
8637
  removeElement(this.element.id + '_EJ2_Title_Tooltip');
8381
8638
  }
8382
8639
  };
8383
8640
  /*
8384
-
8641
+
8385
8642
  /**
8386
8643
  * This method is used to perform operations while resizing the window.
8387
8644
  *
@@ -8409,6 +8666,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8409
8666
  _this.refreshing = true;
8410
8667
  _this.wireEVents();
8411
8668
  _this.render();
8669
+ _this.refreshing = false;
8412
8670
  }, 500);
8413
8671
  }
8414
8672
  }
@@ -8439,7 +8697,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8439
8697
  this.scale = zoomFactor;
8440
8698
  this.translatePoint.x = ((mapRect.left < svgRect.left ? x : 0) + (size.width / 2) - (position.x * zoomFactor)) / zoomFactor;
8441
8699
  this.translatePoint.y = ((mapRect.top < svgRect.top ? y : 0) + (size.height / 2) - (position.y * zoomFactor)) / zoomFactor;
8442
- this.zoomModule.applyTransform();
8700
+ this.zoomModule.applyTransform(this);
8443
8701
  }
8444
8702
  else {
8445
8703
  position = { x: size.width / 2, y: size.height / 2 };
@@ -8485,8 +8743,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8485
8743
  * @param {Object} layer - Specifies the layer for the maps.
8486
8744
  */
8487
8745
  Maps.prototype.addLayer = function (layer) {
8488
- this.layers.push(new LayerSettings(this.layers[0], 'layers', layer));
8489
- this.refresh();
8746
+ var mapsLayer = this.layers;
8747
+ mapsLayer.push(layer);
8748
+ this.isAddLayer = true;
8749
+ this.layers = mapsLayer;
8490
8750
  };
8491
8751
  /**
8492
8752
  * This method is used to remove a layer from map.
@@ -8495,8 +8755,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8495
8755
  * @returns {void}
8496
8756
  */
8497
8757
  Maps.prototype.removeLayer = function (index) {
8498
- this.layers.splice(index, 1);
8499
- this.refresh();
8758
+ var mapsLayer = this.layers;
8759
+ mapsLayer.splice(index, 1);
8760
+ this.layers = mapsLayer;
8500
8761
  };
8501
8762
  /**
8502
8763
  * This method is used to add markers dynamically in the maps.
@@ -8515,7 +8776,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8515
8776
  this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
8516
8777
  }
8517
8778
  var markerModule = new Marker(this);
8518
- markerModule.markerRender(layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
8779
+ markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
8519
8780
  this.arrangeTemplate();
8520
8781
  }
8521
8782
  };
@@ -8722,7 +8983,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8722
8983
  Zoom: 'Zoom',
8723
8984
  ZoomOut: 'Zoom out',
8724
8985
  Pan: 'Pan',
8725
- Reset: 'Reset'
8986
+ Reset: 'Reset',
8987
+ ImageNotFound: 'Image Not Found'
8726
8988
  };
8727
8989
  };
8728
8990
  /**
@@ -8730,6 +8992,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8730
8992
  */
8731
8993
  Maps.prototype.destroy = function () {
8732
8994
  this.unWireEVents();
8995
+ _super.prototype.destroy.call(this);
8733
8996
  this.shapeSelectionItem = [];
8734
8997
  this.toggledShapeElementId = [];
8735
8998
  this.toggledLegendId = [];
@@ -8744,11 +9007,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8744
9007
  this.zoomLabelPositions = [];
8745
9008
  this.mouseDownEvent = { x: null, y: null };
8746
9009
  this.mouseClickEvent = { x: null, y: null };
9010
+ this.formatFunction = null;
9011
+ //TODO: Calling the below code throws spec issue.
9012
+ //this.renderer = null;
9013
+ this.availableSize = new Size(0, 0);
8747
9014
  if (document.getElementById('mapsmeasuretext')) {
8748
9015
  document.getElementById('mapsmeasuretext').remove();
8749
9016
  }
8750
9017
  this.removeSvg();
8751
- _super.prototype.destroy.call(this);
8752
9018
  };
8753
9019
  /**
8754
9020
  * Gets component name
@@ -8781,6 +9047,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8781
9047
  Maps.prototype.onPropertyChanged = function (newProp, oldProp) {
8782
9048
  var render = false;
8783
9049
  var isMarker = false;
9050
+ var isLayer = false;
8784
9051
  var isStaticMapType = false;
8785
9052
  var layerEle;
8786
9053
  if (newProp['layers']) {
@@ -8801,13 +9068,18 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8801
9068
  case 'legendSettings':
8802
9069
  case 'baseLayerIndex':
8803
9070
  if (prop === 'layers') {
9071
+ isLayer = true;
8804
9072
  var layerPropLength = Object.keys(newProp.layers).length;
8805
9073
  for (var x = 0; x < layerPropLength; x++) {
8806
9074
  if (!isNullOrUndefined(newProp.layers[x])) {
8807
9075
  var collection = Object.keys(newProp.layers[x]);
8808
9076
  for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
8809
9077
  var collectionProp = collection_1[_b];
8810
- if (collectionProp === 'markerSettings') {
9078
+ if ((collectionProp === 'layerType' && newProp.layers[x].layerType !== 'Geometry') || (isNullOrUndefined(this.layers[x].shapeData)
9079
+ && !isNullOrUndefined(this.layers[x].urlTemplate) && this.layers[x].urlTemplate !== '')) {
9080
+ this.isReset = true;
9081
+ }
9082
+ else if (collectionProp === 'markerSettings') {
8811
9083
  isMarker = true;
8812
9084
  }
8813
9085
  else if (collectionProp === 'staticMapType') {
@@ -8821,7 +9093,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8821
9093
  break;
8822
9094
  case 'zoomSettings':
8823
9095
  if (!isNullOrUndefined(oldProp.zoomSettings)) {
8824
- if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor) {
9096
+ if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor && !isLayer) {
8825
9097
  render = false;
8826
9098
  }
8827
9099
  else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
@@ -9058,7 +9330,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9058
9330
  */
9059
9331
  Maps.prototype.print = function (id) {
9060
9332
  if ((this.allowPrint) && (this.printModule)) {
9061
- this.printModule.print(id);
9333
+ this.printModule.print(this, id);
9062
9334
  }
9063
9335
  };
9064
9336
  /**
@@ -9077,16 +9349,38 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9077
9349
  }
9078
9350
  if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
9079
9351
  return new Promise(function (resolve, reject) {
9080
- resolve(_this.imageExportModule.export(type, fileName, allowDownload));
9352
+ resolve(_this.imageExportModule.export(_this, type, fileName, allowDownload));
9081
9353
  });
9082
9354
  }
9083
9355
  else if ((this.allowPdfExport) && (this.pdfExportModule)) {
9084
9356
  return new Promise(function (resolve, reject) {
9085
- resolve(_this.pdfExportModule.export(type, fileName, allowDownload, orientation));
9357
+ resolve(_this.pdfExportModule.export(_this, type, fileName, allowDownload, orientation));
9086
9358
  });
9087
9359
  }
9088
9360
  return null;
9089
9361
  };
9362
+ /**
9363
+ * This method is used to get the Bing maps URL.
9364
+ *
9365
+ * @param {string} url - Specifies the URL of the maps.
9366
+ * @returns {Promise<string>} - Returns the processed Bing URL as Promise.
9367
+ */
9368
+ Maps.prototype.getBingUrlTemplate = function (url) {
9369
+ var promise = new Promise(function (resolve, reject) {
9370
+ var ajax = new Ajax({
9371
+ url: url
9372
+ });
9373
+ ajax.onSuccess = function (json) {
9374
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9375
+ var jsonObject = JSON.parse(json);
9376
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9377
+ var resource = jsonObject['resourceSets'][0]['resources'][0];
9378
+ resolve(resource['imageUrl']);
9379
+ };
9380
+ ajax.send();
9381
+ });
9382
+ return promise;
9383
+ };
9090
9384
  /**
9091
9385
  * To find visibility of layers and markers for required modules load.
9092
9386
  *
@@ -9295,6 +9589,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9295
9589
  __decorate([
9296
9590
  Event()
9297
9591
  ], Maps.prototype, "click", void 0);
9592
+ __decorate([
9593
+ Event()
9594
+ ], Maps.prototype, "onclick", void 0);
9298
9595
  __decorate([
9299
9596
  Event()
9300
9597
  ], Maps.prototype, "doubleClick", void 0);
@@ -9441,12 +9738,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
9441
9738
  isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
9442
9739
  var shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
9443
9740
  ? shape[shapePath].toLowerCase() : shape[shapePath];
9444
- if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
9445
- if (layerData[i]['type'] === 'Point') {
9446
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9447
- shapePoints.push(this.getPoints(layerData[i], []));
9448
- }
9449
- else if (!layerData[i]['_isMultiPolygon']) {
9741
+ if (shapeDataLayerPathValue === shapePathValue && (layerData[i].type !== 'LineString' && layerData[i].type !== 'MultiLineString' && layerData[i]['type'] !== 'Point' && layerData[i]['type'] !== 'MultiPoint')) {
9742
+ if (!layerData[i]['_isMultiPolygon']) {
9450
9743
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9451
9744
  shapePoints.push(this.getPoints(layerData[i], []));
9452
9745
  currentLength = shapePoints[shapePoints.length - 1].length;
@@ -9530,7 +9823,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
9530
9823
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9531
9824
  var translate;
9532
9825
  var animate$$1 = layer.animationDuration !== 0 || isNullOrUndefined(_this.maps.zoomModule);
9533
- if (_this.maps.zoomSettings.zoomFactor > 1 && !isNullOrUndefined(_this.maps.zoomModule)) {
9826
+ if (_this.maps.zoomSettings.zoomFactor > 1 && !isNullOrUndefined(_this.maps.zoomModule) && !_this.maps.isTileMap) {
9534
9827
  translate = getZoomTranslate(_this.maps, layer, animate$$1);
9535
9828
  }
9536
9829
  else {
@@ -9647,14 +9940,13 @@ var Bubble = /** @__PURE__ @class */ (function () {
9647
9940
  /**
9648
9941
  * To destroy the bubble.
9649
9942
  *
9650
- * @param {Maps} maps - Specifies the instance of the maps.
9651
9943
  * @returns {void}
9652
9944
  * @private
9653
9945
  */
9654
- Bubble.prototype.destroy = function (maps) {
9655
- /**
9656
- * Destroy method performed here
9657
- */
9946
+ Bubble.prototype.destroy = function () {
9947
+ this.bubbleCollection = [];
9948
+ //TODO: Calling the below code throws spec issue.
9949
+ //this.maps = null;
9658
9950
  };
9659
9951
  return Bubble;
9660
9952
  }());
@@ -9753,7 +10045,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9753
10045
  var shapeWidth;
9754
10046
  var scaleZoomValue = !isNullOrUndefined(this.maps.scale) ? Math.floor(this.maps.scale) : 1;
9755
10047
  var zoomLabelsPosition = this.maps.zoomSettings.enable ? !isNullOrUndefined(this.maps.zoomShapeCollection) &&
9756
- this.maps.zoomShapeCollection.length > 0 : this.maps.zoomSettings.enable;
10048
+ this.maps.zoomShapeCollection.length > 0 && !this.maps.isAddLayer : this.maps.zoomSettings.enable;
9757
10049
  this.maps.translateType = 'labels';
9758
10050
  for (var j = 0; j < properties.length; j++) {
9759
10051
  if (shapeProperties[properties[j]]) {
@@ -9771,7 +10063,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9771
10063
  layer.dataSource, layer.shapeDataPath, shapeData['properties'][propertyPath], layer.shapeDataPath);
9772
10064
  if (!isNullOrUndefined(shapes['property'])) {
9773
10065
  shapePoint = [[]];
9774
- if (!layerData[index]['_isMultiPolygon'] && layerData[index]['type'] !== 'Point') {
10066
+ if (!layerData[index]['_isMultiPolygon'] && layerData[index]['type'] !== 'Point' && layerData[index]['type'] !== 'MultiPoint') {
9775
10067
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9776
10068
  shapePoint.push(this.getPoint(layerData[index], []));
9777
10069
  currentLength = shapePoint[shapePoint.length - 1].length;
@@ -9780,21 +10072,9 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9780
10072
  midIndex = shapePoint.length - 1;
9781
10073
  }
9782
10074
  }
9783
- else {
10075
+ else if (layerData[index]['type'] !== 'Point' && layerData[index]['type'] !== 'MultiPoint') {
9784
10076
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9785
10077
  var layer_1 = layerData[index];
9786
- if (layer_1['type'] === 'Point') {
9787
- isPoint = true;
9788
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9789
- var layerPoints = [];
9790
- layerPoints.push(this.getPoint(layerData, []));
9791
- shapePoint = layerPoints;
9792
- currentLength = shapePoint[shapePoint.length - 1].length;
9793
- if (pointsLength < currentLength) {
9794
- pointsLength = currentLength;
9795
- midIndex = shapePoint.length - 1;
9796
- }
9797
- }
9798
10078
  for (var j = 0; j < layer_1.length; j++) {
9799
10079
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9800
10080
  shapePoint.push(this.getPoint(layer_1[j], []));
@@ -9864,7 +10144,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9864
10144
  var eventargs_1 = {
9865
10145
  name: dataLabelRendering, maps: this.maps, cancel: false, border: { color: dataLabel.border.color,
9866
10146
  width: dataLabel.border.width, opacity: dataLabel.border.opacity }, datalabel: dataLabel,
9867
- fill: dataLabel.fill, template: dataLabel.template, text: text
10147
+ fill: dataLabel.fill, template: dataLabel.template, text: text, offsetX: 0, offsetY: 0
9868
10148
  };
9869
10149
  this.maps.trigger('dataLabelRendering', eventargs_1, function (labelArgs) {
9870
10150
  if (eventargs_1.cancel) {
@@ -9909,13 +10189,13 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9909
10189
  _this.value[index] = { rightWidth: xpositionEnds, leftWidth: xpositionStart, heightTop: start, heightBottom: end };
9910
10190
  var labelElement;
9911
10191
  if (eventargs_1.template !== '') {
9912
- templateFn = getTemplateFunction(eventargs_1.template);
10192
+ templateFn = getTemplateFunction(eventargs_1.template, _this.maps);
9913
10193
  var templateElement = templateFn ? templateFn(!isNullOrUndefined(datasrcObj) ?
9914
10194
  datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
9915
10195
  templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
9916
10196
  labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties'], index, _this.maps);
9917
- labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + 'px';
9918
- labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + 'px';
10197
+ labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
10198
+ labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
9919
10199
  labelTemplateElement.appendChild(labelElement);
9920
10200
  }
9921
10201
  else {
@@ -10003,26 +10283,26 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10003
10283
  y = ((location['y'] + transPoint['y']) * scale) - textSize['height'] / 2;
10004
10284
  }
10005
10285
  border_1.opacity = isNullOrUndefined(border_1.opacity) ? opacity : border_1.opacity;
10006
- var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border_1, opacity, new Rect(x, y, textSize['width'], textSize['height']), rx, ry);
10286
+ var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border_1, opacity, new Rect((x + labelArgs.offsetX), (y + labelArgs.offsetY), textSize['width'], textSize['height']), rx, ry);
10007
10287
  var rect = _this.maps.renderer.drawRectangle(rectOptions);
10008
10288
  group.appendChild(rect);
10009
10289
  }
10010
10290
  }
10011
10291
  element = renderTextElement(options, style, style.color || _this.maps.themeStyle.dataLabelFontColor, group);
10012
10292
  if (zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied) {
10013
- element.setAttribute('transform', 'translate( ' + ((location['x'])) + ' '
10014
- + (((location['y']))) + ' )');
10293
+ element.setAttribute('transform', 'translate( ' + ((location['x'] + labelArgs.offsetX)) + ' '
10294
+ + (((location['y'] + labelArgs.offsetY))) + ' )');
10015
10295
  location['x'] = locationX;
10016
10296
  location['y'] = locationY;
10017
10297
  }
10018
10298
  else {
10019
- element.setAttribute('transform', 'translate( ' + ((location['x'] + transPoint.x) * scale) + ' '
10020
- + (((location['y'] + transPoint.y) * scale) + (elementSize.height / 4)) + ' )');
10299
+ element.setAttribute('transform', 'translate( ' + (((location['x'] + transPoint.x) * scale) + labelArgs.offsetX) + ' '
10300
+ + ((((location['y'] + transPoint.y) * scale) + (elementSize.height / 4)) + labelArgs.offsetY) + ' )');
10021
10301
  }
10022
10302
  group.appendChild(element);
10023
10303
  }
10024
10304
  _this.dataLabelCollections.push({
10025
- location: { x: location['x'], y: location['y'] },
10305
+ location: { x: location['x'] + labelArgs.offsetX, y: location['y'] + labelArgs.offsetY },
10026
10306
  element: isNullOrUndefined(labelElement) ? element : labelElement,
10027
10307
  layerIndex: layerIndex,
10028
10308
  shapeIndex: sublayerIndexLabel ? oldIndex : index,
@@ -10039,10 +10319,21 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10039
10319
  };
10040
10320
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10041
10321
  DataLabel.prototype.getPoint = function (shapes, points) {
10042
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10043
- shapes.map(function (current, index) {
10044
- points.push(new Point(current['point']['x'], current['point']['y']));
10045
- });
10322
+ if (shapes['type'] === 'MultiLineString') {
10323
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10324
+ shapes.map(function (current) {
10325
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10326
+ current.map(function (shape) {
10327
+ points.push(new Point(shape['point']['x'], shape['point']['y']));
10328
+ });
10329
+ });
10330
+ }
10331
+ else {
10332
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10333
+ shapes.map(function (current, index) {
10334
+ points.push(new Point(current['point']['x'], current['point']['y']));
10335
+ });
10336
+ }
10046
10337
  return points;
10047
10338
  };
10048
10339
  /**
@@ -10054,16 +10345,14 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10054
10345
  return 'DataLabel';
10055
10346
  };
10056
10347
  /**
10057
- * To destroy the layers.
10058
10348
  *
10059
- * @param {Maps} maps - Specifies the instance of the maps.
10060
10349
  * @returns {void}
10061
10350
  * @private
10062
10351
  */
10063
- DataLabel.prototype.destroy = function (maps) {
10064
- /**
10065
- * Destroy method performed here
10066
- */
10352
+ DataLabel.prototype.destroy = function () {
10353
+ this.dataLabelCollections = [];
10354
+ this.value = null;
10355
+ this.maps = null;
10067
10356
  };
10068
10357
  return DataLabel;
10069
10358
  }());
@@ -10133,8 +10422,8 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10133
10422
  for (var j = 0; j < point['length'] - 1; j++) {
10134
10423
  angle = (-1 > angle) ? -1 : angle;
10135
10424
  angle = (1 < angle) ? 1 : angle;
10136
- var arcId_1 = this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationIndex_' + i + '_Line' + j + '';
10137
- var radius_1 = this.convertRadius(point[j], point[j + 1]);
10425
+ var arcId = this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationIndex_' + i + '_Line' + j + '';
10426
+ var radius = this.convertRadius(point[j], point[j + 1]);
10138
10427
  if (angle <= 1 && angle > 0) {
10139
10428
  direction = 0;
10140
10429
  if (point[j]['x'] > point[j + 1]['x']) {
@@ -10179,10 +10468,10 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10179
10468
  angle = Math.abs(angle);
10180
10469
  d = (angle === 0) ? 'M ' + point[j]['x'] + ',' + point[j]['y'] + 'L ' + point[j + 1]['x']
10181
10470
  + ',' + point[j + 1]['y'] + ' ' :
10182
- 'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius_1 / 2 + (1 - angle) * radius_1 / (angle * 10)) +
10183
- ' ' + (radius_1 / 2 + (1 - angle) * radius_1 / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
10471
+ 'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) +
10472
+ ' ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
10184
10473
  + direction + ' , ' + point[j + 1]['x'] + ',' + point[j + 1]['y'] + ' ';
10185
- pathOption = new PathOption(arcId_1, 'none', width, color, 1, 1, dashArray, d);
10474
+ pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
10186
10475
  navigationEle = this.maps.renderer.drawPath(pathOption);
10187
10476
  if (!isNullOrUndefined(arrowPosition)) {
10188
10477
  var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
@@ -10215,14 +10504,11 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10215
10504
  /**
10216
10505
  * To destroy the layers.
10217
10506
  *
10218
- * @param {Maps} maps - Specifies the instance of the map
10219
10507
  * @returns {void}
10220
10508
  * @private
10221
10509
  */
10222
- NavigationLine.prototype.destroy = function (maps) {
10223
- /**
10224
- * Destroy method performed here
10225
- */
10510
+ NavigationLine.prototype.destroy = function () {
10511
+ this.maps = null;
10226
10512
  };
10227
10513
  return NavigationLine;
10228
10514
  }());
@@ -10236,6 +10522,10 @@ var Legend = /** @__PURE__ @class */ (function () {
10236
10522
  * @private
10237
10523
  */
10238
10524
  this.legendBorderRect = new Rect(0, 0, 0, 0);
10525
+ /**
10526
+ * @private
10527
+ */
10528
+ this.initialMapAreaRect = new Rect(0, 0, 0, 0);
10239
10529
  /**
10240
10530
  * @private
10241
10531
  */
@@ -10294,6 +10584,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10294
10584
  this.heightIncrement = 0;
10295
10585
  this.defsElement = this.maps.renderer.createDefs();
10296
10586
  this.maps.svgObject.appendChild(this.defsElement);
10587
+ this.initialMapAreaRect = this.maps.mapAreaRect;
10297
10588
  this.calculateLegendBounds();
10298
10589
  this.drawLegend();
10299
10590
  };
@@ -10333,9 +10624,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10333
10624
  }
10334
10625
  }
10335
10626
  }
10336
- else {
10337
- _this.getMarkersLegendCollections(layerIndex, layer.markerSettings);
10338
- }
10627
+ }
10628
+ if (legend.type === 'Markers') {
10629
+ _this.getMarkersLegendCollections(layerIndex, layer.markerSettings);
10339
10630
  }
10340
10631
  });
10341
10632
  if (this.legendCollection.length > 0) {
@@ -10526,8 +10817,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10526
10817
  }
10527
10818
  }
10528
10819
  else {
10820
+ var padding = 10;
10529
10821
  shapeX = shapeLocation[j - 1].x;
10530
- shapeY = prevPositionY + topPadding + (shapeHeight / 2);
10822
+ shapeY = prevPositionY + padding + (shapeHeight / 2);
10531
10823
  }
10532
10824
  }
10533
10825
  }
@@ -10630,7 +10922,14 @@ var Legend = /** @__PURE__ @class */ (function () {
10630
10922
  var legend = map.legendSettings;
10631
10923
  var render = map.renderer;
10632
10924
  var textOptions;
10633
- var textFont = legend.textStyle;
10925
+ var textFont = {
10926
+ size: legend.textStyle.size,
10927
+ color: legend.textStyle.color,
10928
+ fontFamily: legend.textStyle.fontFamily,
10929
+ fontWeight: legend.textStyle.fontWeight,
10930
+ fontStyle: legend.textStyle.fontStyle,
10931
+ opacity: legend.textStyle.opacity
10932
+ };
10634
10933
  this.legendGroup = render.createGroup({ id: map.element.id + '_Legend_Group' });
10635
10934
  if (legend.mode === 'Interactive') {
10636
10935
  for (var i = 0; i < this.legendRenderingCollections.length; i++) {
@@ -10646,7 +10945,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10646
10945
  textFont.color = (textFont.color !== null) ? textFont.color : this.maps.themeStyle.legendTextColor;
10647
10946
  var rectOptions = new RectOption(itemId, item['fill'], item['shapeBorder'], legend.opacity, bounds);
10648
10947
  textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'middle', item['text'], '', '');
10649
- textFont.fontFamily = map.themeStyle.fontFamily || textFont.fontFamily;
10948
+ textFont.fontFamily = !isNullOrUndefined(textFont.fontFamily) ? textFont.fontFamily : this.maps.themeStyle.fontFamily;
10650
10949
  textFont.size = map.themeStyle.legendFontSize || textFont.size;
10651
10950
  renderTextElement(textOptions, textFont, textFont.color, this.legendGroup);
10652
10951
  this.legendGroup.appendChild(render.drawRectangle(rectOptions));
@@ -10701,7 +11000,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10701
11000
  };
10702
11001
  legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
10703
11002
  this.maps.themeStyle.legendTextColor;
10704
- legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
11003
+ legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily : this.maps.themeStyle.fontFamily;
10705
11004
  legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
10706
11005
  if (i === 0) {
10707
11006
  this.renderLegendBorder();
@@ -10777,7 +11076,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10777
11076
  'opacity': 1,
10778
11077
  'dominant-baseline': ''
10779
11078
  };
10780
- pagingGroup.appendChild(render.createText(pageTextOptions, pagingText));
11079
+ var pagingTextElement = render.createText(pageTextOptions, pagingText);
11080
+ pagingTextElement.setAttribute('style', 'user-select: none;');
11081
+ pagingGroup.appendChild(pagingTextElement);
10781
11082
  this.legendGroup.appendChild(pagingGroup);
10782
11083
  }
10783
11084
  this.legendToggle();
@@ -10789,6 +11090,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10789
11090
  var shapeIndex;
10790
11091
  var layerIndex;
10791
11092
  var dataIndex;
11093
+ var pointIndex;
10792
11094
  var legend = this.maps.legendSettings;
10793
11095
  var textEle = legend.mode === 'Default' ? document.getElementById(targetElement.id.replace('Shape', 'Text')) :
10794
11096
  document.getElementById(targetElement.id + '_Text');
@@ -10876,12 +11178,20 @@ var Legend = /** @__PURE__ @class */ (function () {
10876
11178
  }
10877
11179
  if (enable) {
10878
11180
  for (var j = 0; j < data.length; j++) {
11181
+ var shapeElement = void 0;
10879
11182
  shapeIndex = data[j]['shapeIndex'];
10880
11183
  layerIndex = data[j]['layerIndex'];
10881
11184
  dataIndex = data[j]['dataIndex'];
10882
- var shapeEle = document.getElementById(this.maps.element.id + '_LayerIndex_' +
10883
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
10884
- if (shapeEle !== null) {
11185
+ pointIndex = data[j]['pointIndex'];
11186
+ if (pointIndex === -1) {
11187
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11188
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11189
+ }
11190
+ else {
11191
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11192
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11193
+ }
11194
+ if (shapeElement !== null) {
10885
11195
  var shapeMatch = true;
10886
11196
  if (this.maps.legendSelectionCollection !== null) {
10887
11197
  for (var i_1 = 0; i_1 < this.maps.legendSelectionCollection.length; i_1++) {
@@ -10898,13 +11208,13 @@ var Legend = /** @__PURE__ @class */ (function () {
10898
11208
  }
10899
11209
  length = this.legendHighlightCollection.length;
10900
11210
  var legendHighlightColor = this.legendHighlightCollection[length - 1]['legendOldFill'];
10901
- this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeEle);
11211
+ this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeElement);
10902
11212
  var shapeItemCount = this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].length - 1;
10903
- var shapeOldFillColor = shapeEle.getAttribute('fill');
11213
+ var shapeOldFillColor = shapeElement.getAttribute('fill');
10904
11214
  this.legendHighlightCollection[length - 1]['shapeOldFillColor'].push(shapeOldFillColor);
10905
11215
  var shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
10906
11216
  this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
10907
- this.setColor(shapeEle, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11217
+ this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
10908
11218
  this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
10909
11219
  }
10910
11220
  else if (value === 'selection') {
@@ -10927,12 +11237,12 @@ var Legend = /** @__PURE__ @class */ (function () {
10927
11237
  }
10928
11238
  selectLength = this.maps.legendSelectionCollection.length;
10929
11239
  var legendSelectionColor = this.maps.legendSelectionCollection[selectLength - 1]['legendOldFill'];
10930
- this.maps.legendSelectionCollection[selectLength - 1]['MapShapeCollection']['Elements'].push(shapeEle);
11240
+ this.maps.legendSelectionCollection[selectLength - 1]['MapShapeCollection']['Elements'].push(shapeElement);
10931
11241
  this.maps.legendSelectionCollection[selectLength - 1]['shapeOldFillColor'] = this.shapePreviousColor;
10932
11242
  this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
10933
- this.setColor(shapeEle, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
10934
- if (this.maps.selectedElementId.indexOf(shapeEle.getAttribute('id')) === -1) {
10935
- this.maps.selectedElementId.push(shapeEle.getAttribute('id'));
11243
+ this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
11244
+ if (this.maps.selectedElementId.indexOf(shapeElement.getAttribute('id')) === -1) {
11245
+ this.maps.selectedElementId.push(shapeElement.getAttribute('id'));
10936
11246
  }
10937
11247
  if (j === data.length - 1) {
10938
11248
  this.maps.legendSelection = false;
@@ -10947,14 +11257,15 @@ var Legend = /** @__PURE__ @class */ (function () {
10947
11257
  }
10948
11258
  };
10949
11259
  Legend.prototype.setColor = function (element, fill, opacity, borderColor, borderWidth, type) {
11260
+ var isLineStringShape = (element.parentElement.id.indexOf('LineString') > -1);
10950
11261
  if (type === 'selection') {
10951
- maintainStyleClass('ShapeselectionMap', 'ShapeselectionMapStyle', fill, opacity, borderColor, borderWidth, this.maps);
10952
- element.setAttribute('class', 'ShapeselectionMapStyle');
11262
+ maintainStyleClass((isLineStringShape ? 'LineselectionMap' : 'ShapeselectionMap'), (isLineStringShape ? 'LineselectionMapStyle' : 'ShapeselectionMapStyle'), (isLineStringShape ? 'transparent' : fill), opacity, (isLineStringShape ? fill : borderColor), borderWidth, this.maps);
11263
+ element.setAttribute('class', isLineStringShape ? 'LineselectionMapStyle' : 'ShapeselectionMapStyle');
10953
11264
  }
10954
11265
  else {
10955
- element.setAttribute('fill', fill);
11266
+ element.setAttribute('fill', isLineStringShape ? 'transparent' : fill);
10956
11267
  element.setAttribute('fill-opacity', opacity);
10957
- element.setAttribute('stroke', borderColor);
11268
+ element.setAttribute('stroke', isLineStringShape ? fill : borderColor);
10958
11269
  element.setAttribute('stroke-width', (Number(borderWidth) / this.maps.scale).toString());
10959
11270
  }
10960
11271
  };
@@ -10997,7 +11308,8 @@ var Legend = /** @__PURE__ @class */ (function () {
10997
11308
  var dataCount = shapeElements.length;
10998
11309
  for (var j = 0; j < dataCount; j++) {
10999
11310
  var shapeElement = getElement(shapeElements[j]);
11000
- if (shapeElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11311
+ if (shapeElement.getAttribute('class') === 'ShapeselectionMapStyle' ||
11312
+ shapeElement.getAttribute('class') === 'LineselectionMapStyle') {
11001
11313
  removeClass(shapeElement);
11002
11314
  var selectedElementIdIndex = this.maps.selectedElementId.indexOf(shapeElement.id);
11003
11315
  if (selectedElementIdIndex !== -1) {
@@ -11075,12 +11387,14 @@ var Legend = /** @__PURE__ @class */ (function () {
11075
11387
  this.maps.legendSelectionClass = module;
11076
11388
  }
11077
11389
  else {
11078
- if ((checkSelection <= 1) && targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11390
+ if ((checkSelection <= 1) && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11391
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle')) {
11079
11392
  if (!this.maps.layers[layerIndex].selectionSettings.enableMultiSelect) {
11080
11393
  this.maps.selectedLegendElementId.splice(selectionIndex, 1);
11081
11394
  }
11082
11395
  else {
11083
- if (checkSelection <= 1 && targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11396
+ if (checkSelection <= 1 && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11397
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle')) {
11084
11398
  this.maps.selectedLegendElementId.splice(selectionIndex, 1);
11085
11399
  }
11086
11400
  }
@@ -11167,7 +11481,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11167
11481
  }
11168
11482
  }
11169
11483
  }
11170
- if (selectionEle && (selectionEle['IsSelected'] && targetElement.getAttribute('class') === 'ShapeselectionMapStyle')) {
11484
+ if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11485
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
11171
11486
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11172
11487
  var element = this.maps.legendSelectionCollection[selectionEle['SelectionIndex']];
11173
11488
  var multiSelection = 0;
@@ -11258,7 +11573,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11258
11573
  }
11259
11574
  for (var j = 0; j < this.maps.selectedLegendElementId.length; j++) {
11260
11575
  var idIndex = this.maps.legendSettings.mode === 'Interactive' ?
11261
- 'container_Legend_Index_' : 'container_Legend_Shape_Index_';
11576
+ this.maps.element.id + '_Legend_Index_' : this.maps.element.id + '_Legend_Shape_Index_';
11262
11577
  var selectedElement = idIndex + this.maps.selectedLegendElementId[j];
11263
11578
  var legendElement = document.getElementById(selectedElement);
11264
11579
  if (!isNullOrUndefined(legendElement)) {
@@ -11310,6 +11625,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11310
11625
  var shapeIndex;
11311
11626
  var layerIndex;
11312
11627
  var dataIndex;
11628
+ var pointIndex;
11313
11629
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11314
11630
  var collection = this.maps.legendModule.legendCollection;
11315
11631
  var legend = this.maps.legendSettings;
@@ -11322,15 +11638,23 @@ var Legend = /** @__PURE__ @class */ (function () {
11322
11638
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11323
11639
  var currentElement = { Elements: [] };
11324
11640
  for (var j = 0; j < data.length; j++) {
11641
+ var shapeElement = void 0;
11325
11642
  shapeIndex = data[j]['shapeIndex'];
11326
11643
  layerIndex = data[j]['layerIndex'];
11327
11644
  dataIndex = data[j]['dataIndex'];
11328
- var shapeEle = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11329
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11330
- if (targetElement === shapeEle) {
11645
+ pointIndex = data[j]['pointIndex'];
11646
+ if (pointIndex === -1) {
11647
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11648
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11649
+ }
11650
+ else {
11651
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11652
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11653
+ }
11654
+ if (targetElement === shapeElement) {
11331
11655
  process = true;
11332
11656
  }
11333
- elements.push(shapeEle);
11657
+ elements.push(shapeElement);
11334
11658
  }
11335
11659
  if (process) {
11336
11660
  if (isNullOrUndefined(currentElement['LegendEle'])) {
@@ -11348,16 +11672,25 @@ var Legend = /** @__PURE__ @class */ (function () {
11348
11672
  var shapeIndex;
11349
11673
  var layerIndex;
11350
11674
  var dataIndex;
11675
+ var pointIndex;
11351
11676
  var idIndex = parseFloat(targetElement.id.charAt(targetElement.id.length - 1));
11352
11677
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11353
11678
  var data = this.maps.legendModule.legendCollection[idIndex]['data'];
11354
11679
  var legendShapeElements = [];
11355
11680
  for (var i = 0; i < data.length; i++) {
11681
+ var shapeElement = void 0;
11356
11682
  shapeIndex = data[i]['shapeIndex'];
11357
11683
  layerIndex = data[i]['layerIndex'];
11358
11684
  dataIndex = data[i]['dataIndex'];
11359
- var shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11360
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11685
+ pointIndex = data[i]['pointIndex'];
11686
+ if (pointIndex === -1) {
11687
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11688
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11689
+ }
11690
+ else {
11691
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11692
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11693
+ }
11361
11694
  if (!isNullOrUndefined(shapeElement)) {
11362
11695
  legendShapeElements.push(shapeElement.id);
11363
11696
  }
@@ -11425,9 +11758,11 @@ var Legend = /** @__PURE__ @class */ (function () {
11425
11758
  var renderOptions = new RectOption(map.element.id + '_Legend_Border', legend.background, legendBorder, 1, this.legendBorderRect, null, null, '', '');
11426
11759
  this.legendGroup.appendChild(map.renderer.drawRectangle(renderOptions));
11427
11760
  this.getLegendAlignment(map, this.legendBorderRect.width, this.legendBorderRect.height, legend);
11428
- this.legendGroup.setAttribute('transform', 'translate( ' + (this.translate.x + (-(this.legendBorderRect.x))) + ' ' +
11761
+ this.legendGroup.setAttribute('transform', 'translate( ' + (this.translate.x + (-this.legendBorderRect.x)) + ' ' +
11429
11762
  (this.translate.y + (-(this.legendBorderRect.y))) + ' )');
11430
- map.svgObject.appendChild(this.legendGroup);
11763
+ if (legend.position !== 'Float') {
11764
+ map.svgObject.appendChild(this.legendGroup);
11765
+ }
11431
11766
  if (legendTitle) {
11432
11767
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
11433
11768
  textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
@@ -11439,7 +11774,16 @@ var Legend = /** @__PURE__ @class */ (function () {
11439
11774
  this.currentPage = (e.target.id.indexOf('_Left_Page_') > -1) ? (this.currentPage - 1) :
11440
11775
  (this.currentPage + 1);
11441
11776
  this.legendGroup = this.maps.renderer.createGroup({ id: this.maps.element.id + '_Legend_Group' });
11777
+ this.maps.mapAreaRect = this.initialMapAreaRect;
11442
11778
  this.drawLegendItem(this.currentPage);
11779
+ if (!isNullOrUndefined(this.maps.legendModule) && this.maps.legendSettings.position === 'Float') {
11780
+ if (this.maps.isTileMap) {
11781
+ this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.legendModule.legendGroup);
11782
+ }
11783
+ else {
11784
+ this.maps.svgObject.appendChild(this.maps.legendModule.legendGroup);
11785
+ }
11786
+ }
11443
11787
  if (querySelector(this.maps.element.id + '_Legend_Border', this.maps.element.id)) {
11444
11788
  querySelector(this.maps.element.id + '_Legend_Border', this.maps.element.id).style.pointerEvents = 'none';
11445
11789
  }
@@ -11457,53 +11801,60 @@ var Legend = /** @__PURE__ @class */ (function () {
11457
11801
  var areaWidth = totalRect.width;
11458
11802
  var totalWidth = map.availableSize.width;
11459
11803
  var totalHeight = map.availableSize.height;
11804
+ var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
11805
+ var locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
11460
11806
  if (legend.position === 'Float') {
11461
- this.translate = legend.location;
11807
+ this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) : new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
11808
+ this.legendTotalRect = map.mapAreaRect;
11462
11809
  }
11463
11810
  else {
11464
11811
  switch (legend.position) {
11465
11812
  case 'Top':
11466
11813
  case 'Bottom':
11467
- totalRect.height = (areaHeight - height);
11814
+ totalRect.height = (legend.position === 'Top') ? (areaHeight - height) : (areaHeight - height - (spacing * 2));
11468
11815
  x = (totalWidth / 2) - (width / 2);
11469
11816
  y = (legend.position === 'Top') ? areaY : (areaY + totalRect.height);
11470
- totalRect.y = (legend.position === 'Top') ? areaY + height + spacing : areaY;
11817
+ totalRect.y = (legend.position === 'Top') ? areaY + height + (map.isTileMap ? (spacing / 2) : spacing) : areaY - (spacing / 2);
11471
11818
  break;
11472
11819
  case 'Left':
11473
11820
  case 'Right':
11474
- totalRect.width = (areaWidth - width);
11475
- x = (legend.position === 'Left') ? areaX : (areaX + totalRect.width) - spacing;
11821
+ totalRect.width = (areaWidth - width - map.mapAreaRect.x);
11822
+ x = (legend.position === 'Left') ? areaX + (spacing / 2) : (areaX + totalRect.width + spacing);
11476
11823
  y = (totalHeight / 2) - (height / 2);
11477
- totalRect.x = (legend.position === 'Left') ? areaX + width : areaX;
11824
+ totalRect.x = (legend.position === 'Left') ? areaX + width + spacing : areaX;
11478
11825
  break;
11479
11826
  }
11480
11827
  switch (legend.alignment) {
11481
11828
  case 'Near':
11482
11829
  if (legend.position === 'Top' || legend.position === 'Bottom') {
11483
- x = totalRect.x;
11830
+ x = totalRect.x - (legend.mode === 'Interactive' ? spacing : 0);
11484
11831
  }
11485
11832
  else {
11486
- y = totalRect.y;
11833
+ y = totalRect.y - (!(legend.height && legend.width) && legend.mode === 'Interactive' ? map.mapAreaRect.x : 0);
11487
11834
  }
11488
11835
  break;
11489
11836
  case 'Far':
11490
11837
  if (legend.position === 'Top' || legend.position === 'Bottom') {
11491
- x = (totalWidth - width) - spacing;
11838
+ x = (totalWidth - width) - (legend.mode === 'Interactive' ? 0 : spacing);
11492
11839
  }
11493
11840
  else {
11494
- y = totalHeight - height;
11841
+ y = totalHeight - height - (legend.mode === 'Default' ? spacing : 0);
11495
11842
  }
11496
11843
  break;
11497
11844
  }
11498
11845
  if ((legend.height || legend.width) && legend.mode !== 'Interactive') {
11499
- this.legendTotalRect = map.totalRect = totalRect;
11846
+ this.legendTotalRect = map.mapAreaRect = map.totalRect = totalRect;
11500
11847
  }
11501
11848
  else {
11849
+ map.totalRect = null;
11502
11850
  if ((legend.height || legend.width) && legend.mode === 'Interactive') {
11503
11851
  map.totalRect = totalRect;
11504
11852
  }
11505
11853
  this.legendTotalRect = map.mapAreaRect = totalRect;
11506
11854
  }
11855
+ if (legend.position === 'Left') {
11856
+ map.mapAreaRect.width = totalRect.width;
11857
+ }
11507
11858
  this.translate = new Point(x, y);
11508
11859
  }
11509
11860
  };
@@ -11521,7 +11872,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11521
11872
  data[_this.maps.legendSettings.showLegendPath];
11522
11873
  if (marker$$1.visible && showLegend && (!isNullOrUndefined(data['latitude'])) && (!isNullOrUndefined(data['longitude']))) {
11523
11874
  if (marker$$1.template) {
11524
- templateFn = getTemplateFunction(marker$$1.template);
11875
+ templateFn = getTemplateFunction(marker$$1.template, _this.maps);
11525
11876
  var templateElement = templateFn(_this.maps);
11526
11877
  var markerEle = isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] :
11527
11878
  templateElement;
@@ -11632,6 +11983,13 @@ var Legend = /** @__PURE__ @class */ (function () {
11632
11983
  borderColor: legend.shapeBorder.color, borderWidth: legend.shapeBorder.width
11633
11984
  });
11634
11985
  }
11986
+ else {
11987
+ for (var i = 0; i < this.legendCollection.length; i++) {
11988
+ if (this.legendCollection[i]['text'] === legendText && this.legendCollection[i]['fill'] === legendFill) {
11989
+ this.legendCollection[i].data.push(newColllection[0]);
11990
+ }
11991
+ }
11992
+ }
11635
11993
  }
11636
11994
  };
11637
11995
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -11833,15 +12191,16 @@ var Legend = /** @__PURE__ @class */ (function () {
11833
12191
  var width = 10;
11834
12192
  var direction = (legend.orientation === 'None') ? (legend.position === 'Top' || legend.position === 'Bottom')
11835
12193
  ? 'Horizontal' : 'Vertical' : legend.orientation;
12194
+ rect.y = legend.position === 'Float' && this.maps.isTileMap ? rect.y - this.maps.mapAreaRect.y : rect.y;
11836
12195
  if (direction === 'Horizontal') {
11837
12196
  if (!legend.invertedPointer) {
11838
- locX = rect.x + (rect.width / 2);
12197
+ locX = rect.x + (rect.width / 2) - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11839
12198
  locY = rect.y;
11840
12199
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY - height) +
11841
12200
  ' L ' + (locX + width) + ' ' + (locY - height) + ' Z ';
11842
12201
  }
11843
12202
  else {
11844
- locX = rect.x + (rect.width / 2);
12203
+ locX = rect.x + (rect.width / 2) - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11845
12204
  locY = rect.y + (rect.height);
11846
12205
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY + height) +
11847
12206
  ' L ' + (locX + width) + ' ' + (locY + height) + ' Z ';
@@ -11849,20 +12208,25 @@ var Legend = /** @__PURE__ @class */ (function () {
11849
12208
  }
11850
12209
  else {
11851
12210
  if (!legend.invertedPointer) {
11852
- locX = rect.x + (rect.width);
12211
+ locX = rect.x + rect.width - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11853
12212
  locY = rect.y + (rect.height / 2);
11854
12213
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX + width) + ' ' + (locY - height) +
11855
12214
  ' L ' + (locX + width) + ' ' + (locY + height) + ' z ';
11856
12215
  }
11857
12216
  else {
11858
- locX = rect.x;
12217
+ locX = rect.x - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11859
12218
  locY = rect.y + (rect.height / 2);
11860
12219
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY - height) +
11861
12220
  ' L ' + (locX - width) + ' ' + (locY + height) + ' z ';
11862
12221
  }
11863
12222
  }
11864
12223
  var pathOptions = new PathOption(id, fill, strokeWidth, stroke, 1, 1, '', path);
11865
- this.maps.svgObject.appendChild(this.maps.renderer.drawPath(pathOptions));
12224
+ if (legend.position === 'Float' && this.maps.isTileMap) {
12225
+ this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(pathOptions));
12226
+ }
12227
+ else {
12228
+ this.maps.svgObject.appendChild(this.maps.renderer.drawPath(pathOptions));
12229
+ }
11866
12230
  };
11867
12231
  Legend.prototype.wireEvents = function (element) {
11868
12232
  EventHandler.add(element, Browser.touchStartEvent, this.changeNextPage, this);
@@ -11919,6 +12283,9 @@ var Legend = /** @__PURE__ @class */ (function () {
11919
12283
  '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11920
12284
  '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11921
12285
  if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
12286
+ mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
12287
+ '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'] + '_Group', this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
12288
+ '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'] + '_Group', this.maps.element.id);
11922
12289
  mapElement = mapElement.children[0];
11923
12290
  }
11924
12291
  if (isVisible && mapElement !== null) {
@@ -12060,6 +12427,9 @@ var Legend = /** @__PURE__ @class */ (function () {
12060
12427
  '_BubbleIndex_' + j + '_dataIndex_' + mapdata['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12061
12428
  '_MarkerIndex_' + j + '_dataIndex_' + mapdata['dataIndex'], this.maps.element.id);
12062
12429
  if (!isNullOrUndefined(mapdata['shape']) && mapdata['shape'] === 'Balloon') {
12430
+ LegendInteractive = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12431
+ '_BubbleIndex_' + j + '_dataIndex_' + mapdata['dataIndex'] + '_Group', this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12432
+ '_MarkerIndex_' + j + '_dataIndex_' + mapdata['dataIndex'] + '_Group', this.maps.element.id);
12063
12433
  LegendInteractive = LegendInteractive.children[0];
12064
12434
  }
12065
12435
  if (isVisible && LegendInteractive !== null) {
@@ -12223,10 +12593,20 @@ var Legend = /** @__PURE__ @class */ (function () {
12223
12593
  var shapeDataValueCase = !isNullOrUndefined(shapeData['properties'][shapePath])
12224
12594
  && isNaN(shapeData['properties'][shapePath]) ? shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12225
12595
  if (shapeDataValueCase === dataPathValueCase) {
12226
- legendData.push({
12227
- layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12228
- name: data[dataPath], value: value
12229
- });
12596
+ if (shapeData['geometry']['type'] != 'MultiPoint') {
12597
+ legendData.push({
12598
+ layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12599
+ name: data[dataPath], value: value, pointIndex: -1
12600
+ });
12601
+ }
12602
+ else {
12603
+ for (var j = 0; j < shapeData['geometry'].coordinates.length; j++) {
12604
+ legendData.push({
12605
+ layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12606
+ name: data[dataPath], value: value, pointIndex: j
12607
+ });
12608
+ }
12609
+ }
12230
12610
  }
12231
12611
  }
12232
12612
  }
@@ -12272,15 +12652,30 @@ var Legend = /** @__PURE__ @class */ (function () {
12272
12652
  /**
12273
12653
  * To destroy the legend.
12274
12654
  *
12275
- * @param {Maps} maps - Specifies the instance of the maps
12276
12655
  * @returns {void}
12277
12656
  * @private
12278
12657
  */
12279
- Legend.prototype.destroy = function (maps) {
12280
- /**
12281
- * Destroy method performed here
12282
- */
12658
+ Legend.prototype.destroy = function () {
12659
+ this.legendCollection = [];
12660
+ this.legendRenderingCollections = [];
12661
+ this.translate = null;
12662
+ this.legendBorderRect = null;
12663
+ this.initialMapAreaRect = null;
12664
+ this.legendTotalRect = null;
12665
+ this.totalPages = [];
12666
+ this.legendItemRect = null;
12667
+ this.legendGroup = null;
12668
+ this.shapeHighlightCollection = [];
12669
+ this.legendHighlightCollection = [];
12670
+ this.shapePreviousColor = [];
12671
+ this.selectedNonLegendShapes = [];
12672
+ this.legendLinearGradient = null;
12673
+ this.currentLayer = null;
12674
+ this.defsElement = null;
12675
+ this.legendElement = [];
12676
+ this.oldShapeElement = null;
12283
12677
  this.removeEventListener();
12678
+ this.maps = null;
12284
12679
  };
12285
12680
  return Legend;
12286
12681
  }());
@@ -12338,7 +12733,8 @@ var Highlight = /** @__PURE__ @class */ (function () {
12338
12733
  targetEle.getAttribute('class') !== 'ShapeselectionMapStyle' && !isTouch &&
12339
12734
  targetEle.getAttribute('class') !== 'MarkerselectionMapStyle' &&
12340
12735
  targetEle.getAttribute('class') !== 'BubbleselectionMapStyle' &&
12341
- targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle') {
12736
+ targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle' &&
12737
+ targetEle.getAttribute('class') !== 'LineselectionMapStyle') {
12342
12738
  layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
12343
12739
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12344
12740
  var shapeData = void 0;
@@ -12348,8 +12744,9 @@ var Highlight = /** @__PURE__ @class */ (function () {
12348
12744
  var dataIndex = void 0;
12349
12745
  if (targetEle.id.indexOf('shapeIndex') > -1) {
12350
12746
  shapeIn = parseInt(targetEle.id.split('_shapeIndex_')[1].split('_')[0], 10);
12351
- shapeData = this.maps.layers[layerIndex].shapeData['features'] ?
12352
- this.maps.layers[layerIndex].shapeData['features'][shapeIn]['properties'] : null;
12747
+ shapeData = this.maps.layers[layerIndex].shapeData['features'] &&
12748
+ !isNullOrUndefined(this.maps.layersCollection[layerIndex].layerData[shapeIn]) ?
12749
+ this.maps.layersCollection[layerIndex].layerData[shapeIn]['property'] : null;
12353
12750
  dataIndex = parseInt(targetEle.id.split('_dataIndex_')[1].split('_')[0], 10);
12354
12751
  data = isNullOrUndefined(dataIndex) ? null : this.maps.layers[layerIndex].dataSource[dataIndex];
12355
12752
  this.highlightSettings = this.maps.layers[layerIndex].highlightSettings;
@@ -12421,7 +12818,8 @@ var Highlight = /** @__PURE__ @class */ (function () {
12421
12818
  */
12422
12819
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12423
12820
  Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
12424
- if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule) {
12821
+ if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule
12822
+ && this.maps.legendSettings.type === 'Layers') {
12425
12823
  this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.highlightSettings, 'highlight', layerIndex);
12426
12824
  }
12427
12825
  var selectHighLight = targetElement.id.indexOf('shapeIndex') > -1 && (this.maps.legendSettings.visible && this.maps.legendModule) ?
@@ -12440,7 +12838,7 @@ var Highlight = /** @__PURE__ @class */ (function () {
12440
12838
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
12441
12839
  }
12442
12840
  var border = {
12443
- color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
12841
+ color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color),
12444
12842
  width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
12445
12843
  opacity: this.highlightSettings.border.opacity
12446
12844
  };
@@ -12496,15 +12894,13 @@ var Highlight = /** @__PURE__ @class */ (function () {
12496
12894
  /**
12497
12895
  * To destroy the highlight.
12498
12896
  *
12499
- * @param {Maps} maps - Specifies the maps instance
12500
12897
  * @returns {void}
12501
12898
  * @private
12502
12899
  */
12503
- Highlight.prototype.destroy = function (maps) {
12504
- /**
12505
- * Destroy method performed here
12506
- */
12900
+ Highlight.prototype.destroy = function () {
12901
+ this.highlightSettings = null;
12507
12902
  this.removeEventListener();
12903
+ this.maps = null;
12508
12904
  };
12509
12905
  return Highlight;
12510
12906
  }());
@@ -12525,7 +12921,6 @@ var Selection = /** @__PURE__ @class */ (function () {
12525
12921
  Selection.prototype.addEventListener = function () {
12526
12922
  if (!this.maps.isDestroyed) {
12527
12923
  this.maps.on(click, this.mouseClick, this);
12528
- this.maps.on(Browser.touchEndEvent, this.mouseClick, this);
12529
12924
  }
12530
12925
  };
12531
12926
  /**
@@ -12538,7 +12933,6 @@ var Selection = /** @__PURE__ @class */ (function () {
12538
12933
  return;
12539
12934
  }
12540
12935
  this.maps.off(click, this.mouseClick);
12541
- this.maps.off(Browser.touchEndEvent, this.mouseClick);
12542
12936
  };
12543
12937
  Selection.prototype.mouseClick = function (targetElement) {
12544
12938
  if (!isNullOrUndefined(targetElement['type']) && targetElement['type'].indexOf('touch') !== -1 &&
@@ -12556,8 +12950,12 @@ var Selection = /** @__PURE__ @class */ (function () {
12556
12950
  var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12557
12951
  if (targetElement.id.indexOf('shapeIndex') > -1) {
12558
12952
  shapeIndex = parseInt(targetElement.id.split('_shapeIndex_')[1].split('_')[0], 10);
12559
- shapeData = this.maps.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
12560
- this.maps.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
12953
+ shapeData = !isNullOrUndefined(this.maps.layers[layerIndex].shapeData['features'])
12954
+ && this.maps.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
12955
+ this.maps.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] :
12956
+ !isNullOrUndefined(this.maps.layers[layerIndex].shapeData['geometries'])
12957
+ && this.maps.layers[layerIndex].shapeData['geometries']['length'] > shapeIndex ?
12958
+ this.maps.layers[layerIndex].shapeData['geometries'][shapeIndex]['properties'] : null;
12561
12959
  dataIndex = parseInt(targetElement.id.split('_dataIndex_')[1].split('_')[0], 10);
12562
12960
  data = isNullOrUndefined(dataIndex) ? null : this.maps.layers[layerIndex].dataSource[dataIndex];
12563
12961
  this.selectionsettings = this.maps.layers[layerIndex].selectionSettings;
@@ -12638,15 +13036,17 @@ var Selection = /** @__PURE__ @class */ (function () {
12638
13036
  Selection.prototype.selectMap = function (targetElement, shapeData, data) {
12639
13037
  var _this = this;
12640
13038
  var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
13039
+ var isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
12641
13040
  var selectionsettings = this.selectionsettings;
12642
13041
  var border = {
12643
- color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
12644
- width: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)) : (this.selectionsettings.border.width / this.maps.scale),
13042
+ color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) : this.selectionsettings.border.color,
13043
+ width: isLineStringShape ? (this.selectionsettings.border.width / this.maps.scale) :
13044
+ (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)),
12645
13045
  opacity: this.selectionsettings.border.opacity
12646
13046
  };
12647
13047
  var eventArgs = {
12648
13048
  opacity: this.selectionsettings.opacity,
12649
- fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
13049
+ fill: isLineStringShape ? 'transparent' : (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none'),
12650
13050
  border: border,
12651
13051
  name: itemSelection,
12652
13052
  target: targetElement.id,
@@ -12658,7 +13058,8 @@ var Selection = /** @__PURE__ @class */ (function () {
12658
13058
  this.maps.trigger('itemSelection', eventArgs, function (observedArgs) {
12659
13059
  eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ? _this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
12660
13060
  if (!eventArgs.cancel) {
12661
- if (targetElement.getAttribute('class') === _this.selectionType + 'selectionMapStyle') {
13061
+ if (targetElement.getAttribute('class') === _this.selectionType + 'selectionMapStyle'
13062
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle') {
12662
13063
  removeClass(targetElement);
12663
13064
  _this.removedSelectionList(targetElement);
12664
13065
  for (var m = 0; m < _this.maps.shapeSelectionItem.length; m++) {
@@ -12677,7 +13078,8 @@ var Selection = /** @__PURE__ @class */ (function () {
12677
13078
  else {
12678
13079
  var layetElement = getElementByID(_this.maps.element.id + '_Layer_Collections');
12679
13080
  if (!_this.selectionsettings.enableMultiSelect &&
12680
- layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length > 0) {
13081
+ (layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length > 0 ||
13082
+ layetElement.getElementsByClassName('LineselectionMapStyle').length > 0)) {
12681
13083
  var eleCount = layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length;
12682
13084
  var ele = void 0;
12683
13085
  for (var k = 0; k < eleCount; k++) {
@@ -12685,6 +13087,14 @@ var Selection = /** @__PURE__ @class */ (function () {
12685
13087
  removeClass(ele);
12686
13088
  _this.removedSelectionList(ele);
12687
13089
  }
13090
+ if (layetElement.getElementsByClassName('LineselectionMapStyle').length > 0) {
13091
+ eleCount = layetElement.getElementsByClassName('LineselectionMapStyle').length;
13092
+ for (var k = 0; k < eleCount; k++) {
13093
+ ele = layetElement.getElementsByClassName('LineselectionMapStyle')[0];
13094
+ removeClass(ele);
13095
+ _this.removedSelectionList(ele);
13096
+ }
13097
+ }
12688
13098
  if (_this.selectionType === 'Shape') {
12689
13099
  _this.maps.shapeSelectionItem = [];
12690
13100
  var selectionLength = _this.maps.selectedElementId.length;
@@ -12702,13 +13112,24 @@ var Selection = /** @__PURE__ @class */ (function () {
12702
13112
  ele.setAttribute('stroke', _this.maps.layers[layerIndex_2].navigationLineSettings[index].color);
12703
13113
  }
12704
13114
  }
12705
- if (!getElement(_this.selectionType + 'selectionMap')) {
12706
- document.body.appendChild(createStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs));
13115
+ if (!isLineStringShape) {
13116
+ if (!getElement(_this.selectionType + 'selectionMap')) {
13117
+ document.body.appendChild(createStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs));
13118
+ }
13119
+ else {
13120
+ customizeStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs);
13121
+ }
13122
+ targetElement.setAttribute('class', _this.selectionType + 'selectionMapStyle');
12707
13123
  }
12708
13124
  else {
12709
- customizeStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs);
13125
+ if (!getElement('LineselectionMap')) {
13126
+ document.body.appendChild(createStyle('LineselectionMap', 'LineselectionMapStyle', eventArgs));
13127
+ }
13128
+ else {
13129
+ customizeStyle('LineselectionMap', 'LineselectionMapStyle', eventArgs);
13130
+ }
13131
+ targetElement.setAttribute('class', 'LineselectionMapStyle');
12710
13132
  }
12711
- targetElement.setAttribute('class', _this.selectionType + 'selectionMapStyle');
12712
13133
  if (targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
12713
13134
  _this.maps.shapeSelectionClass = getElement(_this.selectionType + 'selectionMap');
12714
13135
  _this.maps.selectedElementId.push(targetElement.getAttribute('id'));
@@ -12777,15 +13198,13 @@ var Selection = /** @__PURE__ @class */ (function () {
12777
13198
  /**
12778
13199
  * To destroy the selection.
12779
13200
  *
12780
- * @param {Maps} maps - Specifies the maps instance.
12781
13201
  * @returns {void}
12782
13202
  * @private
12783
13203
  */
12784
- Selection.prototype.destroy = function (maps) {
12785
- /**
12786
- * Destroy method performed here
12787
- */
13204
+ Selection.prototype.destroy = function () {
13205
+ this.selectionsettings = null;
12788
13206
  this.removeEventListener();
13207
+ this.maps = null;
12789
13208
  };
12790
13209
  return Selection;
12791
13210
  }());
@@ -12970,7 +13389,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
12970
13389
  options: tooltipOption,
12971
13390
  fill: option.fill,
12972
13391
  maps: this.maps,
12973
- element: target, eventArgs: e
13392
+ element: target, eventArgs: e, content: !isNullOrUndefined(currentData) ? currentData.toString() : ''
12974
13393
  };
12975
13394
  this.maps.trigger(tooltipRender, tooltipArgs, function (args) {
12976
13395
  if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
@@ -12988,7 +13407,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
12988
13407
  header: '',
12989
13408
  data: option['data'],
12990
13409
  template: option['template'],
12991
- content: [currentData.toString()],
13410
+ content: tooltipArgs.content.toString() != currentData.toString() ? [tooltipArgs.content.toString()] : [currentData.toString()],
12992
13411
  shapes: [],
12993
13412
  location: option['location'],
12994
13413
  palette: [markerFill],
@@ -13004,7 +13423,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13004
13423
  header: '',
13005
13424
  data: tooltipArgs.options['data'],
13006
13425
  template: tooltipArgs.options['template'],
13007
- content: [currentData.toString()],
13426
+ content: tooltipArgs.content.toString() != currentData.toString() ? [tooltipArgs.content.toString()] : [currentData.toString()],
13008
13427
  shapes: [],
13009
13428
  location: tooltipArgs.options['location'],
13010
13429
  palette: [markerFill],
@@ -13014,6 +13433,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13014
13433
  fill: tooltipArgs.fill || _this.maps.themeStyle.tooltipFillColor
13015
13434
  });
13016
13435
  }
13436
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13437
+ if (_this.maps.isVue || _this.maps.isVue3) {
13438
+ _this.svgTooltip.controlInstance = _this.maps;
13439
+ }
13017
13440
  _this.svgTooltip.opacity = _this.maps.themeStyle.tooltipFillOpacity || _this.svgTooltip.opacity;
13018
13441
  _this.svgTooltip.appendTo(tooltipEle);
13019
13442
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -13027,9 +13450,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13027
13450
  }
13028
13451
  }
13029
13452
  else {
13030
- _this.removeTooltip();
13031
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13032
- _this.maps.clearTemplate();
13453
+ _this.clearTooltip();
13033
13454
  }
13034
13455
  });
13035
13456
  if (this.svgTooltip) {
@@ -13044,9 +13465,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13044
13465
  });
13045
13466
  }
13046
13467
  else {
13047
- this.removeTooltip();
13048
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13049
- this.maps.clearTemplate();
13468
+ this.clearTooltip();
13050
13469
  }
13051
13470
  }
13052
13471
  else {
@@ -13056,9 +13475,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13056
13475
  this.maps.notify(click, this);
13057
13476
  }
13058
13477
  else {
13059
- this.removeTooltip();
13060
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13061
- this.maps.clearTemplate();
13478
+ this.clearTooltip();
13062
13479
  }
13063
13480
  }
13064
13481
  };
@@ -13104,8 +13521,18 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13104
13521
  }
13105
13522
  };
13106
13523
  MapsTooltip.prototype.removeTooltip = function () {
13524
+ var isTooltipRemoved = false;
13107
13525
  if (document.getElementsByClassName('EJ2-maps-Tooltip').length > 0) {
13108
13526
  remove(document.getElementsByClassName('EJ2-maps-Tooltip')[0]);
13527
+ isTooltipRemoved = true;
13528
+ }
13529
+ return isTooltipRemoved;
13530
+ };
13531
+ MapsTooltip.prototype.clearTooltip = function () {
13532
+ var isTooltipRemoved = this.removeTooltip();
13533
+ if (isTooltipRemoved) {
13534
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13535
+ this.maps.clearTemplate();
13109
13536
  }
13110
13537
  };
13111
13538
  // eslint-disable-next-line valid-jsdoc
@@ -13154,12 +13581,17 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13154
13581
  /**
13155
13582
  * To destroy the tooltip.
13156
13583
  *
13157
- * @param {Maps} maps Specifies the maps instance
13158
13584
  * @returns {void}
13159
13585
  * @private
13160
13586
  */
13161
- MapsTooltip.prototype.destroy = function (maps) {
13587
+ MapsTooltip.prototype.destroy = function () {
13588
+ if (!isNullOrUndefined(this.svgTooltip)) {
13589
+ this.svgTooltip.destroy();
13590
+ }
13591
+ this.svgTooltip = null;
13162
13592
  this.removeEventListener();
13593
+ //TODO: Calling the below code throws spec issue.
13594
+ //this.maps = null;
13163
13595
  };
13164
13596
  return MapsTooltip;
13165
13597
  }());
@@ -13173,7 +13605,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
13173
13605
  this.mouseEnter = false;
13174
13606
  this.isTouch = false;
13175
13607
  this.rectZoomingStart = false;
13176
- this.pinchRect = new Rect(0, 0, 0, 0);
13177
13608
  this.browserName = Browser.info.name;
13178
13609
  // eslint-disable-next-line @typescript-eslint/ban-types
13179
13610
  this.isPointer = Browser.isPointer;
@@ -13182,8 +13613,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
13182
13613
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13183
13614
  this.startTouches = [];
13184
13615
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13185
- this.shapeZoomLocation = [];
13186
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13187
13616
  this.intersect = [];
13188
13617
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13189
13618
  this.mouseDownLatLong = { x: 0, y: 0 };
@@ -13199,7 +13628,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
13199
13628
  this.selectionColor = this.maps.zoomSettings.selectionColor;
13200
13629
  this.fillColor = this.maps.zoomSettings.color;
13201
13630
  this.addEventListener();
13202
- this.groupElements = [];
13203
13631
  }
13204
13632
  /**
13205
13633
  * To perform zooming for maps
@@ -13223,7 +13651,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
13223
13651
  var minZoom = map.zoomSettings.minZoom;
13224
13652
  newZoomFactor = (minZoom > newZoomFactor && type === 'ZoomIn') ? minZoom + 1 : newZoomFactor;
13225
13653
  var prevTilePoint = map.tileTranslatePoint;
13226
- if ((!map.isTileMap) && (type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)) {
13654
+ if ((!map.isTileMap) && ((type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)
13655
+ || map.isReset)) {
13227
13656
  var availSize = map.mapAreaRect;
13228
13657
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13229
13658
  var minBounds = map.baseMapRectBounds['min'];
@@ -13231,16 +13660,34 @@ var Zoom = /** @__PURE__ @class */ (function () {
13231
13660
  var maxBounds = map.baseMapRectBounds['max'];
13232
13661
  var mapTotalWidth = Math.abs(minBounds['x'] - maxBounds['x']);
13233
13662
  var mapTotalHeight = Math.abs(minBounds['y'] - maxBounds['y']);
13234
- var point = map.translatePoint;
13235
- var translatePointX = point.x - (((availSize.width / scale) - (availSize.width / newZoomFactor)) / (availSize.width / position.x));
13236
- var translatePointY = point.y - (((availSize.height / scale) - (availSize.height / newZoomFactor)) / (availSize.height / position.y));
13237
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * newZoomFactor;
13238
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13239
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13240
- map.translatePoint = new Point(translatePointX, translatePointY);
13663
+ var translatePointX = void 0;
13664
+ var translatePointY = void 0;
13665
+ if (newZoomFactor < 1.2 && map.projectionType !== 'Eckert5') {
13666
+ if (mapTotalWidth === 0 || mapTotalHeight === 0 || mapTotalWidth === mapTotalHeight) {
13667
+ mapTotalWidth = availSize.width / 2;
13668
+ mapTotalHeight = availSize.height;
13669
+ }
13670
+ newZoomFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13671
+ newZoomFactor = newZoomFactor > 1.05 ? 1 : newZoomFactor;
13672
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13673
+ }
13674
+ else {
13675
+ var point = map.translatePoint;
13676
+ translatePointX = point.x - (((availSize.width / scale) - (availSize.width / newZoomFactor)) / (availSize.width / position.x));
13677
+ translatePointY = point.y - (((availSize.height / scale) - (availSize.height / newZoomFactor)) / (availSize.height / position.y));
13678
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * newZoomFactor;
13679
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13680
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13681
+ map.translatePoint = new Point(translatePointX, translatePointY);
13682
+ }
13241
13683
  map.scale = newZoomFactor;
13242
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
13243
- this.applyTransform();
13684
+ if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
13685
+ map.translatePoint = map.previousPoint;
13686
+ map.scale = map.mapScaleValue = map.previousScale;
13687
+ }
13688
+ else {
13689
+ this.applyTransform(map);
13690
+ }
13244
13691
  }
13245
13692
  else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
13246
13693
  this.getTileTranslatePosition(prevLevel, newZoomFactor, position, type);
@@ -13257,34 +13704,49 @@ var Zoom = /** @__PURE__ @class */ (function () {
13257
13704
  }
13258
13705
  map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
13259
13706
  map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
13260
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
13261
- if (document.querySelector('.GroupElement')) {
13262
- document.querySelector('.GroupElement').style.display = 'none';
13707
+ if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
13708
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
13709
+ map.scale = map.previousScale;
13710
+ map.tileZoomLevel = prevLevel;
13711
+ map.zoomSettings.zoomFactor = map.previousScale;
13263
13712
  }
13264
- if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13265
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
13713
+ else {
13714
+ if (document.querySelector('.GroupElement')) {
13715
+ document.querySelector('.GroupElement').style.display = 'none';
13716
+ }
13717
+ if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13718
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
13719
+ }
13720
+ this.markerLineAnimation(map);
13721
+ map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
13722
+ var element1 = document.getElementById(this.maps.element.id + '_tiles');
13723
+ var animationDuration = this.maps.layersCollection[0].animationDuration;
13724
+ setTimeout(function () {
13725
+ // if (type === 'ZoomOut') {
13726
+ // element1.removeChild(element1.children[element1.childElementCount - 1]);
13727
+ // if (element1.childElementCount) {
13728
+ // element1.removeChild(element1.children[element1.childElementCount - 1]);
13729
+ // } else {
13730
+ // element1 = element1;
13731
+ // }
13732
+ // }
13733
+ _this.applyTransform(_this.maps);
13734
+ if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
13735
+ document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13736
+ }
13737
+ }, animationDuration);
13266
13738
  }
13267
- this.markerLineAnimation(map);
13268
- map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
13269
- var element1 = document.getElementById(this.maps.element.id + '_tiles');
13270
- var animationDuration = this.maps.layersCollection[0].animationDuration;
13271
- setTimeout(function () {
13272
- // if (type === 'ZoomOut') {
13273
- // element1.removeChild(element1.children[element1.childElementCount - 1]);
13274
- // if (element1.childElementCount) {
13275
- // element1.removeChild(element1.children[element1.childElementCount - 1]);
13276
- // } else {
13277
- // element1 = element1;
13278
- // }
13279
- // }
13280
- _this.applyTransform();
13281
- if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
13282
- document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13283
- }
13284
- }, animationDuration);
13285
13739
  }
13286
13740
  this.maps.zoomNotApplied = false;
13287
13741
  };
13742
+ Zoom.prototype.calculateInitalZoomTranslatePoint = function (newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map) {
13743
+ mapTotalWidth *= newZoomFactor;
13744
+ mapTotalHeight *= newZoomFactor;
13745
+ var widthDiff = minBounds['x'] !== 0 && map.translateType === 'layers' ? map.availableSize.width - availSize.width : 0;
13746
+ var translatePointX = availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2))) - widthDiff;
13747
+ var translatePointY = availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)));
13748
+ return new Point(translatePointX, translatePointY);
13749
+ };
13288
13750
  Zoom.prototype.triggerZoomEvent = function (prevTilePoint, prevLevel, type) {
13289
13751
  var map = this.maps;
13290
13752
  var zoomArgs;
@@ -13303,6 +13765,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13303
13765
  };
13304
13766
  }
13305
13767
  map.trigger('zoom', zoomArgs);
13768
+ return zoomArgs.cancel;
13306
13769
  };
13307
13770
  Zoom.prototype.getTileTranslatePosition = function (prevLevel, currentLevel, position, type) {
13308
13771
  var map = this.maps;
@@ -13328,6 +13791,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13328
13791
  var zoomRect = this.zoomingRect;
13329
13792
  var maxZoom = map.zoomSettings.maxZoom;
13330
13793
  var minZoom = map.zoomSettings.minZoom;
13794
+ var isZoomCancelled;
13331
13795
  if (zoomRect.height > 0 && zoomRect.width > 0) {
13332
13796
  var x = this.zoomingRect.x + (this.zoomingRect.width / 2);
13333
13797
  var y = this.zoomingRect.y + (this.zoomingRect.height / 2);
@@ -13340,7 +13804,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
13340
13804
  var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
13341
13805
  map.translatePoint = new Point(translatePointX, translatePointY);
13342
13806
  map.scale = zoomCalculationFactor;
13343
- this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13807
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13808
+ if (isZoomCancelled) {
13809
+ map.translatePoint = map.previousPoint;
13810
+ map.scale = map.previousScale;
13811
+ }
13344
13812
  }
13345
13813
  else {
13346
13814
  zoomCalculationFactor = prevLevel + (Math.round(prevLevel + (((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2)));
@@ -13353,13 +13821,21 @@ var Zoom = /** @__PURE__ @class */ (function () {
13353
13821
  map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, zoomCalculationFactor))) /
13354
13822
  (Math.pow(2, zoomCalculationFactor));
13355
13823
  map.scale = (Math.pow(2, zoomCalculationFactor));
13356
- this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13357
- map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
13824
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13825
+ if (isZoomCancelled) {
13826
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
13827
+ map.scale = map.tileZoomLevel = map.zoomSettings.zoomFactor = prevLevel;
13828
+ }
13829
+ else {
13830
+ map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
13831
+ }
13832
+ }
13833
+ if (!isZoomCancelled) {
13834
+ map.mapScaleValue = zoomCalculationFactor;
13835
+ this.applyTransform(map, true);
13836
+ this.maps.zoomNotApplied = false;
13837
+ this.zoomingRect = null;
13358
13838
  }
13359
- map.mapScaleValue = zoomCalculationFactor;
13360
- this.applyTransform(true);
13361
- this.maps.zoomNotApplied = false;
13362
- this.zoomingRect = null;
13363
13839
  }
13364
13840
  };
13365
13841
  Zoom.prototype.setInteraction = function (newInteraction) {
@@ -13388,6 +13864,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13388
13864
  this.pinchFactor *= newScale;
13389
13865
  this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
13390
13866
  var zoomCalculationFactor = this.pinchFactor;
13867
+ var isZoomCancelled;
13391
13868
  if (!map.isTileMap) {
13392
13869
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13393
13870
  var minBounds = map.baseMapRectBounds['min'];
@@ -13396,14 +13873,31 @@ var Zoom = /** @__PURE__ @class */ (function () {
13396
13873
  var mapTotalHeight = Math.abs(minBounds['y'] - maxBounds['y']);
13397
13874
  var mapTotalWidth = Math.abs(minBounds['x'] - maxBounds['x']);
13398
13875
  var translatePoint = map.translatePoint;
13399
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomCalculationFactor;
13400
- var translatePointX = translatePoint.x - (((availSize.width / map.scale) - (availSize.width / zoomCalculationFactor)) / (availSize.width / touchCenter.x));
13401
- var translatePointY = translatePoint.y - (((availSize.height / map.scale) - (availSize.height / zoomCalculationFactor)) / (availSize.height / touchCenter.y));
13402
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13403
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13404
- map.translatePoint = new Point(translatePointX, translatePointY);
13876
+ var translatePointX = void 0;
13877
+ var translatePointY = void 0;
13878
+ if (zoomCalculationFactor < 1.2 && map.projectionType !== 'Eckert5') {
13879
+ if (mapTotalWidth === 0 || mapTotalHeight === 0 || mapTotalWidth === mapTotalHeight) {
13880
+ mapTotalWidth = availSize.width / 2;
13881
+ mapTotalHeight = availSize.height;
13882
+ }
13883
+ zoomCalculationFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13884
+ zoomCalculationFactor = zoomCalculationFactor > 1.05 ? 1 : zoomCalculationFactor;
13885
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomCalculationFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13886
+ }
13887
+ else {
13888
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomCalculationFactor;
13889
+ translatePointX = translatePoint.x - (((availSize.width / map.scale) - (availSize.width / zoomCalculationFactor)) / (availSize.width / touchCenter.x));
13890
+ translatePointY = translatePoint.y - (((availSize.height / map.scale) - (availSize.height / zoomCalculationFactor)) / (availSize.height / touchCenter.y));
13891
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13892
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13893
+ map.translatePoint = new Point(translatePointX, translatePointY);
13894
+ }
13405
13895
  map.scale = zoomCalculationFactor;
13406
- this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13896
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13897
+ if (isZoomCancelled) {
13898
+ map.translatePoint = map.previousPoint;
13899
+ map.scale = map.previousScale;
13900
+ }
13407
13901
  }
13408
13902
  else {
13409
13903
  var newTileFactor = zoomCalculationFactor;
@@ -13414,10 +13908,20 @@ var Zoom = /** @__PURE__ @class */ (function () {
13414
13908
  map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
13415
13909
  (Math.pow(2, newTileFactor));
13416
13910
  map.scale = (Math.pow(2, newTileFactor));
13417
- this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13418
- map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
13911
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13912
+ if (isZoomCancelled) {
13913
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
13914
+ map.scale = map.previousScale;
13915
+ map.tileZoomLevel = prevLevel;
13916
+ map.zoomSettings.zoomFactor = map.previousScale;
13917
+ }
13918
+ else {
13919
+ map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
13920
+ }
13921
+ }
13922
+ if (!isZoomCancelled) {
13923
+ this.applyTransform(map);
13419
13924
  }
13420
- this.applyTransform();
13421
13925
  };
13422
13926
  Zoom.prototype.drawZoomRectangle = function () {
13423
13927
  var map = this.maps;
@@ -13463,17 +13967,17 @@ var Zoom = /** @__PURE__ @class */ (function () {
13463
13967
  zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13464
13968
  }
13465
13969
  };
13466
- Zoom.prototype.applyTransform = function (animate$$1) {
13970
+ Zoom.prototype.applyTransform = function (maps, animate$$1) {
13467
13971
  var layerIndex;
13468
13972
  this.templateCount = 0;
13469
13973
  var markerStyle;
13470
- var scale = this.maps.scale;
13471
- var x = this.maps.translatePoint.x;
13472
- var y = this.maps.translatePoint.y;
13974
+ var scale = maps.scale;
13975
+ var x = maps.translatePoint.x;
13976
+ var y = maps.translatePoint.y;
13473
13977
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13474
- this.maps.zoomShapeCollection = [];
13475
- if (document.getElementById(this.maps.element.id + '_mapsTooltip')) {
13476
- removeElement(this.maps.element.id + '_mapsTooltip');
13978
+ maps.zoomShapeCollection = [];
13979
+ if (document.getElementById(maps.element.id + '_mapsTooltip')) {
13980
+ removeElement(maps.element.id + '_mapsTooltip');
13477
13981
  }
13478
13982
  if (this.layerCollectionEle) {
13479
13983
  for (var i_1 = 0; i_1 < this.layerCollectionEle.childElementCount; i_1++) {
@@ -13481,30 +13985,29 @@ var Zoom = /** @__PURE__ @class */ (function () {
13481
13985
  if (layerElement.tagName === 'g') {
13482
13986
  this.templateCount++;
13483
13987
  this.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
13484
- this.currentLayer = this.maps.layersCollection[this.index];
13485
- var factor = this.maps.mapLayerPanel.calculateFactor(this.currentLayer);
13988
+ this.currentLayer = maps.layersCollection[this.index];
13989
+ var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
13486
13990
  for (var j = 0; j < layerElement.childElementCount; j++) {
13487
13991
  var currentEle = layerElement.childNodes[j];
13488
13992
  if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
13489
13993
  && (!(currentEle.id.indexOf('_dataLableIndex_Group') > -1))) {
13490
- if (this.maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
13994
+ if (maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
13491
13995
  currentEle.remove();
13492
13996
  if (layerElement.children.length > 0 && layerElement.children[0]) {
13493
- layerElement.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index), layerElement.children[0]);
13997
+ layerElement.insertBefore(maps.navigationLineModule.renderNavigation(this.currentLayer, maps.tileZoomLevel, this.index), layerElement.children[1]);
13494
13998
  }
13495
13999
  else {
13496
- layerElement.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index));
14000
+ layerElement.appendChild(maps.navigationLineModule.renderNavigation(this.currentLayer, maps.tileZoomLevel, this.index));
13497
14001
  }
13498
14002
  }
13499
- else {
13500
- changeBorderWidth(currentEle, this.index, scale, this.maps);
13501
- this.maps.zoomTranslatePoint = this.maps.translatePoint;
14003
+ else if (currentEle.id.indexOf('Legend') == -1) {
14004
+ changeBorderWidth(currentEle, this.index, scale, maps);
14005
+ maps.zoomTranslatePoint = maps.translatePoint;
13502
14006
  this.animateTransform(currentEle, animate$$1, x, y, scale);
13503
- this.shapeZoomLocation = currentEle.childNodes;
13504
14007
  }
13505
14008
  }
13506
14009
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
13507
- if (!this.isPanning) {
14010
+ if (!this.isPanning && !isNullOrUndefined(currentEle.childNodes[0])) {
13508
14011
  this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
13509
14012
  }
13510
14013
  currentEle = layerElement.childNodes[j];
@@ -13523,11 +14026,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
13523
14026
  markerSelectionValues['latitude'] ||
13524
14027
  this.currentLayer.markerSettings[markerIndex].initialMarkerSelection[x_1]['longitude'] ===
13525
14028
  markerSelectionValues['longitude']) {
13526
- this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
14029
+ maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
13527
14030
  }
13528
14031
  }
13529
- if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
13530
- if (this.maps.isTileMap) {
14032
+ if ((this.currentLayer.animationDuration > 0 || (maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
14033
+ if (maps.isTileMap) {
13531
14034
  var groupElement = document.querySelector('.GroupElement');
13532
14035
  if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
13533
14036
  groupElement.style.display = 'none';
@@ -13539,29 +14042,29 @@ var Zoom = /** @__PURE__ @class */ (function () {
13539
14042
  }
13540
14043
  }
13541
14044
  }
13542
- if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
13543
- clusterSeparate(this.maps.markerModule.sameMarkerData, this.maps, currentEle, true);
14045
+ if (this.isPanning && maps.markerModule.sameMarkerData.length > 0) {
14046
+ clusterSeparate(maps.markerModule.sameMarkerData, maps, currentEle, true);
13544
14047
  }
13545
- else if (this.maps.markerModule.sameMarkerData.length > 0) {
13546
- this.maps.markerModule.sameMarkerData = [];
13547
- if (document.getElementById(this.maps.element.id + '_mapsTooltip')) {
13548
- removeElement(this.maps.element.id + '_mapsTooltip');
14048
+ else if (maps.markerModule.sameMarkerData.length > 0) {
14049
+ maps.markerModule.sameMarkerData = [];
14050
+ if (document.getElementById(maps.element.id + '_mapsTooltip')) {
14051
+ removeElement(maps.element.id + '_mapsTooltip');
13549
14052
  }
13550
14053
  }
13551
- if (document.getElementById(this.maps.element.id + '_mapsTooltip') && this.maps.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_')
14054
+ if (document.getElementById(maps.element.id + '_mapsTooltip') && maps.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_')
13552
14055
  && !this.isPanning) {
13553
- var mapsTooltip = this.maps.mapsTooltipModule;
14056
+ var mapsTooltip = maps.mapsTooltipModule;
13554
14057
  var tooltipElement = currentEle.querySelector('#' + mapsTooltip.tooltipTargetID);
13555
14058
  if (!isNullOrUndefined(tooltipElement)) {
13556
14059
  if (tooltipElement['style']['visibility'] === 'hidden') {
13557
- removeElement(this.maps.element.id + '_mapsTooltip');
14060
+ removeElement(maps.element.id + '_mapsTooltip');
13558
14061
  }
13559
14062
  else {
13560
14063
  var x_2 = parseFloat(tooltipElement.getAttribute('transform').split('(')[1].split(')')[0].split(' ')[1]);
13561
14064
  var y_1 = parseFloat(tooltipElement.getAttribute('transform').split('(')[1].split(')')[0].split(' ')[2]);
13562
- if (this.maps.isTileMap) {
13563
- x_2 += +getElement(this.maps.element.id + '_tile_parent')['style']['left'].split('px')[0];
13564
- y_1 += +getElement(this.maps.element.id + '_tile_parent')['style']['top'].split('px')[0];
14065
+ if (maps.isTileMap) {
14066
+ x_2 += +getElement(maps.element.id + '_tile_parent')['style']['left'].split('px')[0];
14067
+ y_1 += +getElement(maps.element.id + '_tile_parent')['style']['top'].split('px')[0];
13565
14068
  }
13566
14069
  mapsTooltip.svgTooltip.location.x = x_2;
13567
14070
  mapsTooltip.svgTooltip.location.y = y_1;
@@ -13579,9 +14082,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
13579
14082
  layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
13580
14083
  var bubleIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[0]);
13581
14084
  var dataIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[2]);
13582
- for (var l = 0; l < this.maps.bubbleModule.bubbleCollection.length; l++) {
14085
+ for (var l = 0; l < maps.bubbleModule.bubbleCollection.length; l++) {
13583
14086
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13584
- var bubbleCollection = this.maps.bubbleModule.bubbleCollection[l];
14087
+ var bubbleCollection = maps.bubbleModule.bubbleCollection[l];
13585
14088
  if (bubbleCollection['LayerIndex'] === layerIndex && bubbleCollection['BubbleIndex'] === bubleIndex &&
13586
14089
  bubbleCollection['DataIndex'] === dataIndex) {
13587
14090
  var centerX = bubbleCollection['center']['x'];
@@ -13600,24 +14103,25 @@ var Zoom = /** @__PURE__ @class */ (function () {
13600
14103
  }
13601
14104
  }
13602
14105
  }
13603
- else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1) {
14106
+ else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(maps.layers[this.index])) {
13604
14107
  this.intersect = [];
13605
- this.maps.zoomLabelPositions = [];
13606
- this.maps.zoomLabelPositions = this.maps.dataLabelModule.dataLabelCollections;
14108
+ maps.zoomLabelPositions = [];
14109
+ maps.zoomLabelPositions = maps.dataLabelModule.dataLabelCollections;
14110
+ var labelAnimate = !maps.isTileMap && animate$$1;
13607
14111
  for (var k = 0; k < currentEle.childElementCount; k++) {
13608
14112
  if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
13609
14113
  var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
13610
- this.zoomshapewidth = this.shapeZoomLocation[labelIndex].getBoundingClientRect();
13611
- this.maps.zoomShapeCollection.push(this.zoomshapewidth);
13612
- this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', animate$$1);
13613
- var dataLabel = this.maps.layers[this.index].dataLabelSettings;
14114
+ this.zoomshapewidth = currentEle.childNodes[k].getBoundingClientRect();
14115
+ maps.zoomShapeCollection.push(this.zoomshapewidth);
14116
+ this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', labelAnimate);
14117
+ var dataLabel = maps.layers[this.index].dataLabelSettings;
13614
14118
  var border = dataLabel.border;
13615
14119
  if (k > 0 && border['width'] > 1) {
13616
- if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1) {
13617
- var labelX = ((this.maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
13618
- var labelY = ((this.maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
14120
+ if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1 && !isNullOrUndefined(maps.zoomLabelPositions[labelIndex])) {
14121
+ var labelX = ((maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
14122
+ var labelY = ((maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
13619
14123
  var zoomtext = currentEle.childNodes[k]['innerHTML'];
13620
- var style = this.maps.layers[this.index].dataLabelSettings.textStyle;
14124
+ var style = maps.layers[this.index].dataLabelSettings.textStyle;
13621
14125
  var zoomtextSize = measureText(zoomtext, style);
13622
14126
  var padding = 5;
13623
14127
  var rectElement = currentEle.childNodes[k - 1];
@@ -13632,11 +14136,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
13632
14136
  }
13633
14137
  }
13634
14138
  }
13635
- this.maps.arrangeTemplate();
14139
+ maps.arrangeTemplate();
13636
14140
  }
13637
14141
  if (!isNullOrUndefined(this.currentLayer)) {
13638
- if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
13639
- this.processTemplate(x, y, scale, this.maps);
14142
+ if (!animate$$1 || this.currentLayer.animationDuration === 0 || maps.isTileMap) {
14143
+ this.processTemplate(x, y, scale, maps);
13640
14144
  }
13641
14145
  }
13642
14146
  }
@@ -13696,10 +14200,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
13696
14200
  }
13697
14201
  var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
13698
14202
  Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
13699
- parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : 0;
14203
+ parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
13700
14204
  var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
13701
14205
  Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
13702
- parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : 0;
14206
+ parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
13703
14207
  var offset = markerSettings.offset;
13704
14208
  if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
13705
14209
  var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
@@ -13719,10 +14223,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
13719
14223
  nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
13720
14224
  markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
13721
14225
  markerCounts += (eventArgs.cancel) ? 1 : 0;
13722
- _this.maps.markerNullCount = (!isNullOrUndefined(lati) || !isNullOrUndefined(long))
13723
- ? _this.maps.markerNullCount : _this.maps.markerNullCount + 1;
14226
+ _this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
14227
+ ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
13724
14228
  var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
13725
- if (markerSVGObject.childElementCount === (markerDatas.length - markerTemplateCounts - nullCount) && (type !== 'Template')) {
14229
+ if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
13726
14230
  layerElement.appendChild(markerSVGObject);
13727
14231
  if (currentLayers.markerClusterSettings.allowClustering) {
13728
14232
  _this.maps.svgObject.appendChild(markerSVGObject);
@@ -13730,7 +14234,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13730
14234
  clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
13731
14235
  }
13732
14236
  }
13733
- if (markerTemplateElements.childElementCount === (markerDatas.length - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
14237
+ if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
13734
14238
  getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
13735
14239
  if (scale >= 1) {
13736
14240
  if (currentLayers.markerClusterSettings.allowClustering) {
@@ -13826,7 +14330,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13826
14330
  }
13827
14331
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Hide') {
13828
14332
  if (scale > 1) {
13829
- text = (this.zoomshapewidth['width'] >= zoomtextSize['width']) ? zoomtext : '';
14333
+ text = ((this.maps.dataLabelShape[l] * scale) >= zoomtextSize['width']) ? zoomtext : '';
13830
14334
  element.innerHTML = text;
13831
14335
  }
13832
14336
  else {
@@ -13836,7 +14340,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13836
14340
  }
13837
14341
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Trim') {
13838
14342
  if (scale > 1) {
13839
- zoomtrimLabel = textTrim(this.zoomshapewidth['width'], zoomtext, style);
14343
+ zoomtrimLabel = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
13840
14344
  text = zoomtrimLabel;
13841
14345
  element.innerHTML = text;
13842
14346
  }
@@ -13874,7 +14378,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13874
14378
  || textLocations['heightTop'] > this.intersect[j]['heightBottom']) {
13875
14379
  trimmedLable = !isNullOrUndefined(text) ? text : zoomtext;
13876
14380
  if (scale > 1) {
13877
- trimmedLable = textTrim(this.zoomshapewidth['width'], trimmedLable, style);
14381
+ trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), trimmedLable, style);
13878
14382
  }
13879
14383
  element.innerHTML = trimmedLable;
13880
14384
  }
@@ -13900,11 +14404,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
13900
14404
  }
13901
14405
  this.intersect.push(textLocations);
13902
14406
  if (isNullOrUndefined(trimmedLable)) {
13903
- trimmedLable = textTrim(this.zoomshapewidth['width'], zoomtext, style);
14407
+ trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
13904
14408
  element.innerHTML = trimmedLable;
13905
14409
  }
13906
14410
  }
13907
- else {
14411
+ if (animate$$1 || duration > 0) {
13908
14412
  smoothTranslate(element, 0, duration, new MapLocation(labelX, labelY));
13909
14413
  }
13910
14414
  }
@@ -14026,7 +14530,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14026
14530
  var layerRect = getElementByID(map.element.id + '_Layer_Collections').getBoundingClientRect();
14027
14531
  var elementRect = getElementByID(map.element.id + '_svg').getBoundingClientRect();
14028
14532
  var panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
14029
- ((layerRect.left + layerRect.width) >= (elementRect.left + elementRect.width) + map.mapAreaRect.x + map.margin.left)));
14533
+ ((layerRect.left + layerRect.width + map.mapAreaRect.x) >= (elementRect.width))));
14030
14534
  var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
14031
14535
  ((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
14032
14536
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -14040,15 +14544,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
14040
14544
  if (!panArgs.cancel) {
14041
14545
  if (panningXDirection && panningYDirection) {
14042
14546
  map.translatePoint = new Point(x, y);
14043
- this.applyTransform();
14547
+ this.applyTransform(map);
14044
14548
  }
14045
14549
  else if (panningXDirection) {
14046
14550
  map.translatePoint = new Point(x, map.translatePoint.y);
14047
- this.applyTransform();
14551
+ this.applyTransform(map);
14048
14552
  }
14049
14553
  else if (panningYDirection) {
14050
14554
  map.translatePoint = new Point(map.translatePoint.x, y);
14051
- this.applyTransform();
14555
+ this.applyTransform(map);
14052
14556
  }
14053
14557
  }
14054
14558
  this.maps.zoomNotApplied = false;
@@ -14076,7 +14580,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14076
14580
  };
14077
14581
  map.trigger(pan, panArgs);
14078
14582
  map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint, 'Pan');
14079
- this.applyTransform();
14583
+ this.applyTransform(map);
14080
14584
  }
14081
14585
  map.zoomTranslatePoint = map.translatePoint;
14082
14586
  this.mouseDownPoints = this.mouseMovePoints;
@@ -14088,7 +14592,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14088
14592
  (this.distanceX / this.maps.scale)) : this.maps.translatePoint.x;
14089
14593
  this.maps.translatePoint.y = !isNullOrUndefined(this.distanceY) ? this.maps.translatePoint.y -
14090
14594
  (this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
14091
- this.applyTransform(false);
14595
+ this.applyTransform(this.maps, false);
14092
14596
  };
14093
14597
  Zoom.prototype.toolBarZooming = function (zoomFactor, type) {
14094
14598
  var _this = this;
@@ -14118,18 +14622,36 @@ var Zoom = /** @__PURE__ @class */ (function () {
14118
14622
  var max = map.baseMapRectBounds['max'];
14119
14623
  var mapWidth = Math.abs(max['x'] - min['x']);
14120
14624
  var mapHeight = Math.abs(min['y'] - max['y']);
14121
- var translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomFactor)) / 2);
14122
- var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomFactor)) / 2);
14123
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomFactor;
14124
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))))
14125
- : translatePointX;
14126
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2))))
14127
- : translatePointY;
14128
- map.translatePoint = new Point(translatePointX, translatePointY);
14625
+ var translatePointX = void 0;
14626
+ var translatePointY = void 0;
14627
+ if (zoomFactor < 1.2 && map.projectionType !== 'Eckert5') {
14628
+ if (mapHeight === 0 || mapWidth === 0 || mapHeight === mapWidth) {
14629
+ mapWidth = size.width / 2;
14630
+ mapHeight = size.height;
14631
+ }
14632
+ zoomFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
14633
+ zoomFactor = zoomFactor > 1.05 ? 1 : zoomFactor;
14634
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomFactor, mapWidth, mapHeight, size, min, map);
14635
+ }
14636
+ else {
14637
+ translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomFactor)) / 2);
14638
+ translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomFactor)) / 2);
14639
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomFactor;
14640
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))))
14641
+ : translatePointX;
14642
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2))))
14643
+ : translatePointY;
14644
+ map.translatePoint = new Point(translatePointX, translatePointY);
14645
+ }
14129
14646
  map.zoomTranslatePoint = map.translatePoint;
14130
14647
  map.scale = zoomFactor;
14131
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
14132
- this.applyTransform(true);
14648
+ if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
14649
+ map.translatePoint = map.zoomTranslatePoint = map.previousPoint;
14650
+ map.scale = map.previousScale;
14651
+ }
14652
+ else {
14653
+ this.applyTransform(map, true);
14654
+ }
14133
14655
  }
14134
14656
  else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
14135
14657
  var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
@@ -14146,34 +14668,44 @@ var Zoom = /** @__PURE__ @class */ (function () {
14146
14668
  map.tileTranslatePoint.y = map.initialTileTranslate.y;
14147
14669
  tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
14148
14670
  }
14149
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
14150
- map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
14151
- map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
14152
- if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
14153
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
14671
+ if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
14672
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
14673
+ map.scale = map.previousScale;
14674
+ map.tileZoomLevel = prevLevel;
14675
+ map.zoomSettings.zoomFactor = map.previousScale;
14154
14676
  }
14155
- if (document.querySelector('.GroupElement')) {
14156
- document.querySelector('.GroupElement').style.display = 'none';
14157
- }
14158
- this.markerLineAnimation(map);
14159
- map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
14160
- var element1 = document.getElementById(this.maps.element.id + '_tiles');
14161
- var animationDuration = this.maps.layersCollection[0].animationDuration;
14162
- setTimeout(function () {
14163
- _this.applyTransform(true);
14164
- if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
14165
- document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
14677
+ else {
14678
+ map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
14679
+ map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
14680
+ if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
14681
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
14166
14682
  }
14167
- }, animationDuration);
14683
+ if (document.querySelector('.GroupElement')) {
14684
+ document.querySelector('.GroupElement').style.display = 'none';
14685
+ }
14686
+ this.markerLineAnimation(map);
14687
+ map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
14688
+ var element1 = document.getElementById(this.maps.element.id + '_tiles');
14689
+ var animationDuration = this.maps.layersCollection[0].animationDuration;
14690
+ setTimeout(function () {
14691
+ _this.applyTransform(_this.maps, true);
14692
+ if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
14693
+ document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
14694
+ }
14695
+ _this.maps.isAddLayer = false;
14696
+ }, animationDuration);
14697
+ }
14168
14698
  }
14169
14699
  this.maps.zoomNotApplied = false;
14170
14700
  }
14171
14701
  };
14172
14702
  Zoom.prototype.createZoomingToolbars = function () {
14173
14703
  var map = this.maps;
14704
+ var zoomInElements;
14705
+ var zoomOutElements;
14174
14706
  this.toolBarGroup = map.renderer.createGroup({
14175
14707
  id: map.element.id + '_Zooming_KitCollection',
14176
- opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
14708
+ opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
14177
14709
  });
14178
14710
  var kitHeight = 16;
14179
14711
  var kitWidth = 16;
@@ -14188,7 +14720,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
14188
14720
  var toolBarLength = map.zoomSettings.toolbars.length;
14189
14721
  var toolWidth = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (toolBarLength * kitWidth) + (toolBarLength * padding) : (kitWidth * 2);
14190
14722
  var toolHeight = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (kitHeight * 2) : (toolBarLength * kitHeight) + (toolBarLength * padding);
14191
- this.toolBarGroup.appendChild(map.renderer.drawRectangle(new RectOption(map.element.id + '_Zooming_Rect', 'transparent', { color: 'transparent', width: 1 }, 1, new Rect(0, 0, toolWidth, toolHeight), 0, 0)));
14192
14723
  var defElement = map.renderer.createDefs();
14193
14724
  defElement.innerHTML = shadowElement;
14194
14725
  this.toolBarGroup.appendChild(defElement);
@@ -14237,13 +14768,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
14237
14768
  case 'zoomin':
14238
14769
  direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
14239
14770
  this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Path', fill, 3, this.maps.themeStyle.zoomFillColor, 1, 1, null, direction)));
14240
- this.zoomInElements = this.currentToolbarEle;
14771
+ zoomInElements = this.currentToolbarEle;
14241
14772
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14242
14773
  break;
14243
14774
  case 'zoomout':
14244
14775
  direction = 'M 0, 8 L 16, 8';
14245
14776
  this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fill, 3, this.maps.themeStyle.zoomFillColor, 1, 1, null, direction)));
14246
- this.zoomOutElements = this.currentToolbarEle;
14777
+ zoomOutElements = this.currentToolbarEle;
14247
14778
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14248
14779
  break;
14249
14780
  case 'pan': {
@@ -14428,7 +14959,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
14428
14959
  x = (size.width / 2) - (toolBarSize.width / 2);
14429
14960
  break;
14430
14961
  case 'Far':
14431
- x = (size.width - toolBarSize.width) - padding;
14962
+ if (!isNullOrUndefined(map.legendModule) && map.legendSettings.position === 'Left') {
14963
+ x = size.width + size.x - toolBarSize.width - padding;
14964
+ }
14965
+ else {
14966
+ x = (size.width - toolBarSize.width) - padding;
14967
+ }
14432
14968
  break;
14433
14969
  }
14434
14970
  var extraPosition = map.getExtraPosition();
@@ -14484,6 +15020,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14484
15020
  }
14485
15021
  else {
14486
15022
  map.mapScaleValue = value - delta;
15023
+ map.isReset = (map.mapScaleValue < 1) ? true : false;
14487
15024
  map.staticMapZoom = map.tileZoomLevel;
14488
15025
  if (map.mapScaleValue === 1) {
14489
15026
  map.markerCenterLatitude = null;
@@ -14577,14 +15114,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
14577
15114
  if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
14578
15115
  if (!this.maps.zoomSettings.enablePanning) {
14579
15116
  if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
14580
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14581
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
15117
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
15118
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
14582
15119
  }
14583
15120
  }
14584
15121
  }
14585
15122
  }
14586
15123
  else {
14587
- getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
15124
+ getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
14588
15125
  if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
14589
15126
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
14590
15127
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
@@ -14734,15 +15271,30 @@ var Zoom = /** @__PURE__ @class */ (function () {
14734
15271
  /**
14735
15272
  * To destroy the zoom.
14736
15273
  *
14737
- * @param {Maps} maps - Specifies the instance of the maps.
14738
15274
  * @returns {void}
14739
15275
  * @private
14740
15276
  */
14741
- Zoom.prototype.destroy = function (maps) {
15277
+ Zoom.prototype.destroy = function () {
15278
+ this.toolBarGroup = null;
15279
+ this.currentToolbarEle = null;
15280
+ this.zoomingRect = null;
15281
+ this.zoomElements = null;
15282
+ this.panElements = null;
15283
+ this.baseTranslatePoint = null;
15284
+ this.touchStartList = null;
15285
+ this.touchMoveList = null;
15286
+ this.previousTouchMoveList = null;
15287
+ this.mouseDownPoints = null;
15288
+ this.mouseMovePoints = null;
15289
+ this.startTouches = [];
15290
+ this.zoomshapewidth = null;
15291
+ this.intersect = [];
15292
+ this.mouseDownLatLong = null;
15293
+ this.mouseMoveLatLong = null;
14742
15294
  this.removeEventListener();
14743
- /**
14744
- * Destroy method performed here
14745
- */
15295
+ //TODO: Calling the below code throws spec issue.
15296
+ //this.maps = null;
15297
+ this.currentLayer = null;
14746
15298
  };
14747
15299
  return Zoom;
14748
15300
  }());
@@ -14760,7 +15312,6 @@ var Print = /** @__PURE__ @class */ (function () {
14760
15312
  * @param {Maps} control - Specifies the instance of the map
14761
15313
  */
14762
15314
  function Print(control) {
14763
- this.control = control;
14764
15315
  }
14765
15316
  /**
14766
15317
  * To print the Maps
@@ -14769,17 +15320,16 @@ var Print = /** @__PURE__ @class */ (function () {
14769
15320
  * @returns {void}
14770
15321
  * @private
14771
15322
  */
14772
- Print.prototype.print = function (elements) {
14773
- var _this = this;
14774
- this.printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
14775
- this.printWindow.moveTo(0, 0);
14776
- this.printWindow.resizeTo(screen.availWidth, screen.availHeight);
15323
+ Print.prototype.print = function (maps, elements) {
15324
+ var printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
15325
+ printWindow.moveTo(0, 0);
15326
+ printWindow.resizeTo(screen.availWidth, screen.availHeight);
14777
15327
  var argsData = {
14778
- cancel: false, htmlContent: this.getHTMLContent(elements), name: beforePrint
15328
+ cancel: false, htmlContent: this.getHTMLContent(maps, elements), name: beforePrint
14779
15329
  };
14780
- this.control.trigger('beforePrint', argsData, function (beforePrintArgs) {
15330
+ maps.trigger('beforePrint', argsData, function (beforePrintArgs) {
14781
15331
  if (!argsData.cancel) {
14782
- print(argsData.htmlContent, _this.printWindow);
15332
+ print(argsData.htmlContent, printWindow);
14783
15333
  }
14784
15334
  });
14785
15335
  };
@@ -14790,8 +15340,29 @@ var Print = /** @__PURE__ @class */ (function () {
14790
15340
  * @returns {Element} - Returns the div element
14791
15341
  * @private
14792
15342
  */
14793
- Print.prototype.getHTMLContent = function (elements) {
15343
+ Print.prototype.getHTMLContent = function (maps, elements) {
14794
15344
  var div = createElement('div');
15345
+ var divElement = maps.element.cloneNode(true);
15346
+ if (maps.isTileMap) {
15347
+ for (var i = 0; i < divElement.childElementCount; i++) {
15348
+ if (divElement.children[i].id === maps.element.id + '_tile_parent') {
15349
+ divElement.children[i].style.removeProperty('height');
15350
+ divElement.children[i].style.removeProperty('width');
15351
+ divElement.children[i].style.removeProperty('top');
15352
+ divElement.children[i].style.removeProperty('left');
15353
+ divElement.children[i].style.removeProperty('right');
15354
+ divElement.children[i].style.removeProperty('overflow');
15355
+ var svgElement = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
15356
+ divElement.children[i].children[0].style.overflow = 'hidden';
15357
+ divElement.children[i].children[0].style.position = 'absolute';
15358
+ divElement.children[i].children[0].style.height = svgElement.style.height;
15359
+ divElement.children[i].children[0].style.width = svgElement.style.width;
15360
+ divElement.children[i].children[0].style.left = svgElement.style.left;
15361
+ divElement.children[i].children[0].style.top = svgElement.style.top;
15362
+ break;
15363
+ }
15364
+ }
15365
+ }
14795
15366
  if (elements) {
14796
15367
  if (elements instanceof Array) {
14797
15368
  Array.prototype.forEach.call(elements, function (value) {
@@ -14806,7 +15377,7 @@ var Print = /** @__PURE__ @class */ (function () {
14806
15377
  }
14807
15378
  }
14808
15379
  else {
14809
- div.appendChild(this.control.element.cloneNode(true));
15380
+ div.appendChild(divElement);
14810
15381
  }
14811
15382
  return div;
14812
15383
  };
@@ -14821,15 +15392,10 @@ var Print = /** @__PURE__ @class */ (function () {
14821
15392
  /**
14822
15393
  * To destroy the print.
14823
15394
  *
14824
- * @param {Maps} maps - Specifies the instance of the maps
14825
15395
  * @returns {void}
14826
15396
  * @private
14827
15397
  */
14828
- Print.prototype.destroy = function (maps) {
14829
- /**
14830
- * Destroy method performed here
14831
- */
14832
- };
15398
+ Print.prototype.destroy = function () { };
14833
15399
  return Print;
14834
15400
  }());
14835
15401
 
@@ -14846,7 +15412,6 @@ var ImageExport = /** @__PURE__ @class */ (function () {
14846
15412
  * @param {Maps} control - Specifies the instance of the map
14847
15413
  */
14848
15414
  function ImageExport(control) {
14849
- this.control = control;
14850
15415
  }
14851
15416
  /**
14852
15417
  * To export the file as image/svg format
@@ -14857,32 +15422,33 @@ var ImageExport = /** @__PURE__ @class */ (function () {
14857
15422
  * @returns {Promise<string>} - Returns the promise string.
14858
15423
  * @private
14859
15424
  */
14860
- ImageExport.prototype.export = function (type, fileName, allowDownload) {
14861
- var _this = this;
15425
+ ImageExport.prototype.export = function (maps, type, fileName, allowDownload) {
14862
15426
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14863
15427
  var promise = new Promise(function (resolve, reject) {
14864
15428
  var imageCanvasElement = createElement('canvas', {
14865
15429
  id: 'ej2-canvas',
14866
15430
  attrs: {
14867
- 'width': _this.control.availableSize.width.toString(),
14868
- 'height': _this.control.availableSize.height.toString()
15431
+ 'width': maps.availableSize.width.toString(),
15432
+ 'height': maps.availableSize.height.toString()
14869
15433
  }
14870
15434
  });
14871
15435
  var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
14872
- var toolbarEle = document.getElementById(_this.control.element.id + '_ToolBar');
14873
- var svgParent = document.getElementById(_this.control.element.id + '_Tile_SVG_Parent');
15436
+ var toolbarEle = document.getElementById(maps.element.id + '_ToolBar');
15437
+ var svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
14874
15438
  var svgDataElement;
14875
- if (!_this.control.isTileMap) {
15439
+ var tileSvg;
15440
+ var svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
15441
+ if (!maps.isTileMap) {
14876
15442
  svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
14877
- _this.control.svgObject.outerHTML + '</svg>';
15443
+ maps.svgObject.outerHTML + '</svg>';
14878
15444
  }
14879
15445
  else {
14880
- var tileSvg = document.getElementById(_this.control.element.id + '_Tile_SVG');
15446
+ tileSvg = getElementByID(maps.element.id + '_Tile_SVG').cloneNode(true);
14881
15447
  svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
14882
- _this.control.svgObject.outerHTML + tileSvg.outerHTML + '</svg>';
15448
+ svgObject.outerHTML + tileSvg.outerHTML + '</svg>';
14883
15449
  }
14884
15450
  var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgDataElement] :
14885
- [(new XMLSerializer()).serializeToString(_this.control.svgObject)], { type: 'image/svg+xml' }));
15451
+ [(new XMLSerializer()).serializeToString(svgObject)], { type: 'image/svg+xml' }));
14886
15452
  if (type === 'SVG') {
14887
15453
  if (allowDownload) {
14888
15454
  triggerDownload(fileName, type, url, isDownload);
@@ -14894,7 +15460,7 @@ var ImageExport = /** @__PURE__ @class */ (function () {
14894
15460
  else {
14895
15461
  var image_1 = new Image();
14896
15462
  var ctxt_1 = imageCanvasElement.getContext('2d');
14897
- if (!_this.control.isTileMap) {
15463
+ if (!maps.isTileMap) {
14898
15464
  image_1.onload = (function () {
14899
15465
  ctxt_1.drawImage(image_1, 0, 0);
14900
15466
  window.URL.revokeObjectURL(url);
@@ -14913,31 +15479,37 @@ var ImageExport = /** @__PURE__ @class */ (function () {
14913
15479
  image_1.src = url;
14914
15480
  }
14915
15481
  else {
15482
+ var svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
15483
+ var top_1 = parseFloat(svgParentElement.getAttribute('y'));
15484
+ var left_1 = parseFloat(svgParentElement.getAttribute('x'));
14916
15485
  var imgxHttp = new XMLHttpRequest();
14917
- var imgTileLength_1 = _this.control.mapLayerPanel.tiles.length;
15486
+ var imgTileLength_1 = maps.mapLayerPanel.tiles.length;
14918
15487
  var _loop_1 = function (i) {
14919
- var tile = document.getElementById(_this.control.element.id + '_tile_' + (i - 1));
15488
+ var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
14920
15489
  var exportTileImg = new Image();
14921
15490
  exportTileImg.crossOrigin = 'Anonymous';
14922
- ctxt_1.fillStyle = _this.control.background ? _this.control.background : '#FFFFFF';
14923
- ctxt_1.fillRect(0, 0, _this.control.availableSize.width, _this.control.availableSize.height);
14924
- ctxt_1.font = _this.control.titleSettings.textStyle.size + ' Arial';
14925
- ctxt_1.fillStyle = document.getElementById(_this.control.element.id + '_Map_title').getAttribute('fill');
14926
- ctxt_1.fillText(_this.control.titleSettings.text, parseFloat(document.getElementById(_this.control.element.id + '_Map_title').getAttribute('x')), parseFloat(document.getElementById(_this.control.element.id + '_Map_title').getAttribute('y')));
15491
+ ctxt_1.fillStyle = maps.background ? maps.background : '#FFFFFF';
15492
+ ctxt_1.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
15493
+ ctxt_1.font = maps.titleSettings.textStyle.size + ' Arial';
15494
+ var titleElement = document.getElementById(maps.element.id + '_Map_title');
15495
+ if (!isNullOrUndefined(titleElement)) {
15496
+ ctxt_1.fillStyle = titleElement.getAttribute('fill');
15497
+ ctxt_1.fillText(maps.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15498
+ }
14927
15499
  exportTileImg.onload = (function () {
14928
15500
  if (i === 0 || i === imgTileLength_1 + 1) {
14929
15501
  if (i === 0) {
14930
15502
  ctxt_1.setTransform(1, 0, 0, 1, 0, 0);
14931
- ctxt_1.rect(0, parseFloat(svgParent.style.top), parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
15503
+ ctxt_1.rect(0, top_1, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
14932
15504
  ctxt_1.clip();
14933
15505
  }
14934
15506
  else {
14935
- ctxt_1.setTransform(1, 0, 0, 1, parseFloat(svgParent.style.left), parseFloat(svgParent.style.top));
15507
+ ctxt_1.setTransform(1, 0, 0, 1, left_1, top_1);
14936
15508
  }
14937
15509
  }
14938
15510
  else {
14939
- ctxt_1.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + 10, parseFloat(tile.style.top) +
14940
- (parseFloat(document.getElementById(_this.control.element.id + '_tile_parent').style.top)));
15511
+ ctxt_1.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) +
15512
+ top_1);
14941
15513
  }
14942
15514
  ctxt_1.drawImage(exportTileImg, 0, 0);
14943
15515
  if (i === imgTileLength_1 + 1) {
@@ -14963,7 +15535,7 @@ var ImageExport = /** @__PURE__ @class */ (function () {
14963
15535
  }
14964
15536
  else {
14965
15537
  setTimeout(function () {
14966
- exportTileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(document.getElementById(_this.control.element.id + '_Tile_SVG'))], { type: 'image/svg+xml' }));
15538
+ exportTileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(tileSvg)], { type: 'image/svg+xml' }));
14967
15539
  }, 300);
14968
15540
  }
14969
15541
  }
@@ -14992,15 +15564,10 @@ var ImageExport = /** @__PURE__ @class */ (function () {
14992
15564
  /**
14993
15565
  * To destroy the ImageExport.
14994
15566
  *
14995
- * @param {Maps} maps - Specifies the instance of the maps.
14996
15567
  * @returns {void}
14997
15568
  * @private
14998
15569
  */
14999
- ImageExport.prototype.destroy = function (maps) {
15000
- /**
15001
- * Destroy method performed here
15002
- */
15003
- };
15570
+ ImageExport.prototype.destroy = function () { };
15004
15571
  return ImageExport;
15005
15572
  }());
15006
15573
 
@@ -15016,8 +15583,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15016
15583
  *
15017
15584
  * @param {Maps} control Specifies the instance of the map
15018
15585
  */
15019
- function PdfExport(control) {
15020
- this.control = control;
15586
+ function PdfExport() {
15021
15587
  }
15022
15588
  /**
15023
15589
  * To export the file as image/svg format
@@ -15029,25 +15595,24 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15029
15595
  * @returns {Promise<string>} - Returns the promise string
15030
15596
  * @private
15031
15597
  */
15032
- PdfExport.prototype.export = function (type, fileName, allowDownload, orientation) {
15033
- var _this = this;
15598
+ PdfExport.prototype.export = function (maps, type, fileName, allowDownload, orientation) {
15034
15599
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15035
15600
  var promise = new Promise(function (resolve, reject) {
15036
15601
  var canvasElement = createElement('canvas', {
15037
15602
  id: 'ej2-canvas',
15038
15603
  attrs: {
15039
- 'width': _this.control.availableSize.width.toString(),
15040
- 'height': _this.control.availableSize.height.toString()
15604
+ 'width': maps.availableSize.width.toString(),
15605
+ 'height': maps.availableSize.height.toString()
15041
15606
  }
15042
15607
  });
15043
15608
  orientation = isNullOrUndefined(orientation) ? PdfPageOrientation.Landscape : orientation;
15044
- var svgParent = document.getElementById(_this.control.element.id + '_Tile_SVG_Parent');
15609
+ var svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
15045
15610
  var svgData;
15046
- var exportElement = _this.control.svgObject.cloneNode(true);
15611
+ var exportElement = maps.svgObject.cloneNode(true);
15047
15612
  var backgroundElement = exportElement.childNodes[0];
15048
15613
  var backgroundColor = backgroundElement.getAttribute('fill');
15049
- if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark')
15050
- && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
15614
+ if ((maps.theme === 'Tailwind' || maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5' || maps.theme === 'Bootstrap5Dark'
15615
+ || maps.theme === 'Fluent' || maps.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
15051
15616
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
15052
15617
  }
15053
15618
  var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
@@ -15055,7 +15620,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15055
15620
  var pdfDocument = new PdfDocument();
15056
15621
  var image = new Image();
15057
15622
  var ctx = canvasElement.getContext('2d');
15058
- if (!_this.control.isTileMap) {
15623
+ if (!maps.isTileMap) {
15059
15624
  image.onload = (function () {
15060
15625
  ctx.drawImage(image, 0, 0);
15061
15626
  window.URL.revokeObjectURL(url);
@@ -15063,7 +15628,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15063
15628
  var imageString = canvasElement.toDataURL('image/jpeg').replace('image/jpeg', 'image/octet-stream');
15064
15629
  pdfDocument.pageSettings.orientation = orientation;
15065
15630
  imageString = imageString.slice(imageString.indexOf(',') + 1);
15066
- pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, (_this.control.availableSize.width - 60), _this.control.availableSize.height);
15631
+ pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
15067
15632
  if (allowDownload) {
15068
15633
  pdfDocument.save(fileName + '.pdf');
15069
15634
  pdfDocument.destroy();
@@ -15076,31 +15641,36 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15076
15641
  image.src = url;
15077
15642
  }
15078
15643
  else {
15644
+ var svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
15645
+ var top_1 = parseFloat(svgParentElement.getAttribute('y'));
15646
+ var left_1 = parseFloat(svgParentElement.getAttribute('x'));
15079
15647
  var xHttp = new XMLHttpRequest();
15080
- var tileLength_1 = _this.control.mapLayerPanel.tiles.length;
15648
+ var tileLength_1 = maps.mapLayerPanel.tiles.length;
15081
15649
  var _loop_1 = function (i) {
15082
- var tile = document.getElementById(_this.control.element.id + '_tile_' + (i - 1));
15650
+ var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
15083
15651
  var tileImg = new Image();
15084
15652
  tileImg.crossOrigin = 'Anonymous';
15085
- ctx.fillStyle = _this.control.background ? _this.control.background : '#FFFFFF';
15086
- ctx.fillRect(0, 0, _this.control.availableSize.width, _this.control.availableSize.height);
15087
- ctx.font = _this.control.titleSettings.textStyle.size + ' Arial';
15088
- ctx.fillStyle = document.getElementById(_this.control.element.id + '_Map_title').getAttribute('fill');
15089
- ctx.fillText(_this.control.titleSettings.text, parseFloat(document.getElementById(_this.control.element.id + '_Map_title').getAttribute('x')), parseFloat(document.getElementById(_this.control.element.id + '_Map_title').getAttribute('y')));
15653
+ ctx.fillStyle = maps.background ? maps.background : '#FFFFFF';
15654
+ ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
15655
+ ctx.font = maps.titleSettings.textStyle.size + ' Arial';
15656
+ var titleElement = document.getElementById(maps.element.id + '_Map_title');
15657
+ if (!isNullOrUndefined(titleElement)) {
15658
+ ctx.fillStyle = titleElement.getAttribute('fill');
15659
+ ctx.fillText(maps.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15660
+ }
15090
15661
  tileImg.onload = (function () {
15091
15662
  if (i === 0 || i === tileLength_1 + 1) {
15092
15663
  if (i === 0) {
15093
15664
  ctx.setTransform(1, 0, 0, 1, 0, 0);
15094
- ctx.rect(0, parseFloat(svgParent.style.top), parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
15665
+ ctx.rect(0, top_1, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
15095
15666
  ctx.clip();
15096
15667
  }
15097
15668
  else {
15098
- ctx.setTransform(1, 0, 0, 1, parseFloat(svgParent.style.left), parseFloat(svgParent.style.top));
15669
+ ctx.setTransform(1, 0, 0, 1, left_1, top_1);
15099
15670
  }
15100
15671
  }
15101
15672
  else {
15102
- ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + 10, parseFloat(tile.style.top) +
15103
- (parseFloat(document.getElementById(_this.control.element.id + '_tile_parent').style.top)));
15673
+ ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) + top_1);
15104
15674
  }
15105
15675
  ctx.drawImage(tileImg, 0, 0);
15106
15676
  if (i === tileLength_1 + 1) {
@@ -15109,7 +15679,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15109
15679
  var x = localStorage.getItem('saved-image-example');
15110
15680
  pdfDocument.pageSettings.orientation = orientation;
15111
15681
  x = x.slice(x.indexOf(',') + 1);
15112
- pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (_this.control.availableSize.width - 60), _this.control.availableSize.height);
15682
+ pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
15113
15683
  if (allowDownload) {
15114
15684
  pdfDocument.save(fileName + '.pdf');
15115
15685
  pdfDocument.destroy();
@@ -15126,7 +15696,8 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15126
15696
  }
15127
15697
  else {
15128
15698
  setTimeout(function () {
15129
- tileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(document.getElementById(_this.control.element.id + '_Tile_SVG'))], { type: 'image/svg+xml' }));
15699
+ var tileSvg = document.getElementById(maps.element.id + '_Tile_SVG');
15700
+ tileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(tileSvg)], { type: 'image/svg+xml' }));
15130
15701
  }, 300);
15131
15702
  }
15132
15703
  }
@@ -15152,17 +15723,12 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15152
15723
  return 'PdfExport';
15153
15724
  };
15154
15725
  /**
15155
- * To destroy the PdfExports.
15726
+ * To destroy the PdfExport.
15156
15727
  *
15157
- * @param {Maps} maps - Specifies the instance of the maps.
15158
15728
  * @returns {void}
15159
15729
  * @private
15160
15730
  */
15161
- PdfExport.prototype.destroy = function (maps) {
15162
- /**
15163
- * Destroy method performed here
15164
- */
15165
- };
15731
+ PdfExport.prototype.destroy = function () { };
15166
15732
  return PdfExport;
15167
15733
  }());
15168
15734
 
@@ -15174,5 +15740,5 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15174
15740
  * exporting all modules from maps index
15175
15741
  */
15176
15742
 
15177
- export { Maps, load, loaded, click, rightClick, doubleClick, resize, tooltipRender, shapeSelected, shapeHighlight, mousemove, mouseup, mousedown, layerRendering, shapeRendering, markerRendering, markerClusterRendering, markerClick, markerClusterClick, markerMouseMove, markerClusterMouseMove, dataLabelRendering, bubbleRendering, bubbleClick, bubbleMouseMove, animationComplete, legendRendering, annotationRendering, itemSelection, itemHighlight, beforePrint, zoomIn, zoomOut, pan, Annotation, Arrow, Font, Border, CenterPosition, TooltipSettings, Margin, ConnectorLineSettings, MarkerClusterSettings, MarkerClusterData, ColorMappingSettings, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, SelectionSettings, HighlightSettings, NavigationLineSettings, BubbleSettings, CommonTitleSettings, SubTitleSettings, TitleSettings, ZoomSettings, ToggleLegendSettings, LegendSettings, DataLabelSettings, ShapeSettings, MarkerBase, MarkerSettings, LayerSettings, Tile, MapsAreaSettings, Size, stringToNumber, calculateSize, createSvg, getMousePosition, degreesToRadians, radiansToDegrees, convertGeoToPoint, convertTileLatLongToPoint, xToCoordinate, yToCoordinate, aitoff, roundTo, sinci, acos, calculateBound, triggerDownload, Point, MinMax, GeoLocation, measureText, TextOption, PathOption, ColorValue, RectOption, CircleOption, PolygonOption, PolylineOption, LineOption, Line, MapLocation, Rect, PatternOptions, renderTextElement, convertElement, formatValue, convertStringToValue, convertElementFromLabel, drawSymbols, getValueFromObject, markerColorChoose, markerShapeChoose, clusterTemplate, mergeSeparateCluster, clusterSeparate, marker, markerTemplate, maintainSelection, maintainStyleClass, appendShape, drawCircle, drawRectangle, drawPath, drawPolygon, drawPolyline, drawLine, calculateShapes, drawDiamond, drawTriangle, drawCross, drawHorizontalLine, drawVerticalLine, drawStar, drawBalloon, drawPattern, getFieldData, checkShapeDataFields, checkPropertyPath, filter, getRatioOfBubble, findMidPointOfPolygon, isCustomPath, textTrim, findPosition, removeElement, calculateCenterFromPixel, getTranslate, getZoomTranslate, fixInitialScaleForTile, getElementByID, Internalize, getTemplateFunction, getElement, getShapeData, triggerShapeEvent, getElementsByClassName, querySelector, getTargetElement, createStyle, customizeStyle, triggerItemSelectionEvent, removeClass, elementAnimate, timeout, showTooltip, wordWrap, createTooltip, drawSymbol, renderLegendShape, getElementOffset, changeBorderWidth, changeNavaigationLineWidth, targetTouches, calculateScale, getDistance, getTouches, getTouchCenter, sum, zoomAnimate, animate, MapAjax, smoothTranslate, compareZoomFactor, calculateZoomLevel, processResult, LayerPanel, Bubble, BingMap, Marker, ColorMapping, DataLabel, NavigationLine, Legend, Highlight, Selection, MapsTooltip, Zoom, Annotations, Print, ImageExport, PdfExport };
15743
+ export { Maps, load, loaded, click, onclick, rightClick, doubleClick, resize, tooltipRender, shapeSelected, shapeHighlight, mousemove, mouseup, mousedown, layerRendering, shapeRendering, markerRendering, markerClusterRendering, markerClick, markerClusterClick, markerMouseMove, markerClusterMouseMove, dataLabelRendering, bubbleRendering, bubbleClick, bubbleMouseMove, animationComplete, legendRendering, annotationRendering, itemSelection, itemHighlight, beforePrint, zoomIn, zoomOut, pan, Annotation, Arrow, Font, Border, CenterPosition, TooltipSettings, Margin, ConnectorLineSettings, MarkerClusterSettings, MarkerClusterData, ColorMappingSettings, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, SelectionSettings, HighlightSettings, NavigationLineSettings, BubbleSettings, CommonTitleSettings, SubTitleSettings, TitleSettings, ZoomSettings, ToggleLegendSettings, LegendSettings, DataLabelSettings, ShapeSettings, MarkerBase, MarkerSettings, LayerSettings, Tile, MapsAreaSettings, Size, stringToNumber, calculateSize, createSvg, getMousePosition, degreesToRadians, radiansToDegrees, convertGeoToPoint, convertTileLatLongToPoint, xToCoordinate, yToCoordinate, aitoff, roundTo, sinci, acos, calculateBound, triggerDownload, Point, MinMax, GeoLocation, measureText, TextOption, PathOption, ColorValue, RectOption, CircleOption, PolygonOption, PolylineOption, LineOption, Line, MapLocation, Rect, PatternOptions, renderTextElement, convertElement, formatValue, convertStringToValue, convertElementFromLabel, drawSymbols, getValueFromObject, markerColorChoose, markerShapeChoose, clusterTemplate, mergeSeparateCluster, clusterSeparate, marker, markerTemplate, maintainSelection, maintainStyleClass, appendShape, drawCircle, drawRectangle, drawPath, drawPolygon, drawPolyline, drawLine, calculateShapes, drawDiamond, drawTriangle, drawCross, drawHorizontalLine, drawVerticalLine, drawStar, drawBalloon, drawPattern, getFieldData, checkShapeDataFields, checkPropertyPath, filter, getRatioOfBubble, findMidPointOfPolygon, isCustomPath, textTrim, findPosition, removeElement, calculateCenterFromPixel, getTranslate, getZoomTranslate, fixInitialScaleForTile, getElementByID, getClientElement, Internalize, getTemplateFunction, getElement, getShapeData, triggerShapeEvent, getElementsByClassName, querySelector, getTargetElement, createStyle, customizeStyle, triggerItemSelectionEvent, removeClass, elementAnimate, timeout, showTooltip, wordWrap, createTooltip, drawSymbol, renderLegendShape, getElementOffset, changeBorderWidth, changeNavaigationLineWidth, targetTouches, calculateScale, getDistance, getTouches, getTouchCenter, sum, zoomAnimate, animate, MapAjax, smoothTranslate, compareZoomFactor, calculateZoomLevel, processResult, LayerPanel, Bubble, BingMap, Marker, ColorMapping, DataLabel, NavigationLine, Legend, Highlight, Selection, MapsTooltip, Zoom, Annotations, Print, ImageExport, PdfExport };
15178
15744
  //# sourceMappingURL=ej2-maps.es5.js.map