@syncfusion/ej2-maps 20.1.59 → 20.2.43

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.
@@ -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,7 +1087,7 @@ 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
  }
@@ -2022,6 +2024,10 @@ function getTranslate(mapObject, layer, animate) {
2022
2024
  }
2023
2025
  else {
2024
2026
  if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
2027
+ if (mapHeight === 0 || mapWidth === 0 || mapHeight === mapWidth) {
2028
+ mapWidth = size.width / 2;
2029
+ mapHeight = size.height;
2030
+ }
2025
2031
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2026
2032
  mapWidth *= scaleFactor;
2027
2033
  mapHeight *= scaleFactor;
@@ -2071,7 +2077,7 @@ function getTranslate(mapObject, layer, animate) {
2071
2077
  mapObject.zoomTranslatePoint.y = y;
2072
2078
  }
2073
2079
  else {
2074
- if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
2080
+ if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1 || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
2075
2081
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2076
2082
  mapWidth *= scaleFactor;
2077
2083
  x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
@@ -2229,6 +2235,8 @@ function getZoomTranslate(mapObject, layer, animate) {
2229
2235
  }
2230
2236
  }
2231
2237
  scaleFactor = (mapObject.enablePersistence) ? (mapObject.mapScaleValue === 0 ? 1 : mapObject.mapScaleValue) : scaleFactor;
2238
+ mapObject.widthBeforeRefresh = mapObject.availableSize.width;
2239
+ mapObject.heightBeforeRefresh = mapObject.availableSize.height;
2232
2240
  return { scale: animate ? 1 : scaleFactor, location: new Point(x, y) };
2233
2241
  }
2234
2242
  /**
@@ -2895,6 +2903,7 @@ function changeBorderWidth(element, index, scale, maps) {
2895
2903
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2896
2904
  var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
2897
2905
  var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
2906
+ var circleRadius = maps.layersCollection[index].shapeSettings.circleRadius;
2898
2907
  if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
2899
2908
  value = checkShapeDataFields(
2900
2909
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2915,8 +2924,8 @@ function changeBorderWidth(element, index, scale, maps) {
2915
2924
  currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2916
2925
  }
2917
2926
  childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
2918
- if (element.id.indexOf('_LineString') > -1 && isNullOrUndefined(currentStroke)) {
2919
- childNode.setAttribute('stroke-width', (1 / scale).toString());
2927
+ if (element.id.indexOf('_Point') > -1 || element.id.indexOf('_MultiPoint') > -1) {
2928
+ childNode.setAttribute('r', (circleRadius / scale).toString());
2920
2929
  }
2921
2930
  }
2922
2931
  }
@@ -3110,7 +3119,11 @@ function animate(element, delay, duration, process, end) {
3110
3119
  else {
3111
3120
  window.cancelAnimationFrame(clearAnimation);
3112
3121
  end.call(_this, { element: element });
3113
- element.setAttribute('style', markerStyle);
3122
+ if (element.id.indexOf('Marker') > -1) {
3123
+ console.log(element);
3124
+ var markerElement = getElementByID(element.id.split('_')[0] + '_Markers_Group');
3125
+ markerElement.setAttribute('style', markerStyle);
3126
+ }
3114
3127
  }
3115
3128
  };
3116
3129
  clearAnimation = window.requestAnimationFrame(startAnimation);
@@ -3583,6 +3596,7 @@ function getThemeStyle(theme) {
3583
3596
  backgroundColor: color,
3584
3597
  areaBackgroundColor: color,
3585
3598
  titleFontColor: '#FFFFFF',
3599
+ titleFontSize: '14px',
3586
3600
  subTitleFontColor: '#FFFFFF',
3587
3601
  legendTitleFontColor: '#DADADA',
3588
3602
  legendTextColor: '#DADADA',
@@ -3602,6 +3616,7 @@ function getThemeStyle(theme) {
3602
3616
  backgroundColor: '#000000',
3603
3617
  areaBackgroundColor: '#000000',
3604
3618
  titleFontColor: '#FFFFFF',
3619
+ titleFontSize: '14px',
3605
3620
  subTitleFontColor: '#FFFFFF',
3606
3621
  legendTitleFontColor: '#FFFFFF',
3607
3622
  legendTextColor: '#FFFFFF',
@@ -3782,6 +3797,7 @@ function getThemeStyle(theme) {
3782
3797
  backgroundColor: '#FFFFFF',
3783
3798
  areaBackgroundColor: '#FFFFFF',
3784
3799
  titleFontColor: '#424242',
3800
+ titleFontSize: '14px',
3785
3801
  subTitleFontColor: '#424242',
3786
3802
  legendTitleFontColor: '#757575',
3787
3803
  legendTextColor: '#757575',
@@ -4306,7 +4322,7 @@ var SubTitleSettings = /** @__PURE__ @class */ (function (_super) {
4306
4322
  return _super !== null && _super.apply(this, arguments) || this;
4307
4323
  }
4308
4324
  __decorate$1([
4309
- Complex({ size: Theme.mapsSubTitleFont.size, fontWeight: null }, Font)
4325
+ Complex({ size: null, fontWeight: null, fontFamily: null }, Font)
4310
4326
  ], SubTitleSettings.prototype, "textStyle", void 0);
4311
4327
  __decorate$1([
4312
4328
  Property('Center')
@@ -4322,7 +4338,7 @@ var TitleSettings = /** @__PURE__ @class */ (function (_super) {
4322
4338
  return _super !== null && _super.apply(this, arguments) || this;
4323
4339
  }
4324
4340
  __decorate$1([
4325
- Complex({ size: Theme.mapsTitleFont.size, fontWeight: null }, Font)
4341
+ Complex({ size: null, fontWeight: null, fontFamily: null }, Font)
4326
4342
  ], TitleSettings.prototype, "textStyle", void 0);
4327
4343
  __decorate$1([
4328
4344
  Property('Center')
@@ -4466,7 +4482,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
4466
4482
  Property('')
4467
4483
  ], LegendSettings.prototype, "height", void 0);
4468
4484
  __decorate$1([
4469
- Complex({}, Font)
4485
+ Complex({ fontFamily: null }, Font)
4470
4486
  ], LegendSettings.prototype, "textStyle", void 0);
4471
4487
  __decorate$1([
4472
4488
  Property(15)
@@ -4487,7 +4503,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
4487
4503
  Complex({}, CommonTitleSettings)
4488
4504
  ], LegendSettings.prototype, "title", void 0);
4489
4505
  __decorate$1([
4490
- Complex(Theme.legendTitleFont, Font)
4506
+ Complex({ size: Theme.legendTitleFont.size, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: Theme.legendTitleFont.fontWeight, fontFamily: null }, Font)
4491
4507
  ], LegendSettings.prototype, "titleStyle", void 0);
4492
4508
  __decorate$1([
4493
4509
  Property('Bottom')
@@ -4750,7 +4766,7 @@ var LayerSettings = /** @__PURE__ @class */ (function (_super) {
4750
4766
  Property('Geometry')
4751
4767
  ], LayerSettings.prototype, "layerType", void 0);
4752
4768
  __decorate$1([
4753
- Property('https://a.tile.openstreetmap.org/level/tileX/tileY.png')
4769
+ Property('')
4754
4770
  ], LayerSettings.prototype, "urlTemplate", void 0);
4755
4771
  __decorate$1([
4756
4772
  Property(true)
@@ -4921,11 +4937,12 @@ var Marker = /** @__PURE__ @class */ (function () {
4921
4937
  if (currentLayer.markerClusterSettings.allowClustering) {
4922
4938
  _this.maps.svgObject.appendChild(_this.markerSVGObject);
4923
4939
  _this.maps.element.appendChild(_this.maps.svgObject);
4924
- if (currentLayer.layerType !== 'OSM' || !_this.maps.zoomSettings.enable) {
4925
- clusterTemplate(currentLayer, _this.markerSVGObject, _this.maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
4940
+ if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
4941
+ && _this.maps.zoomSettings.enable) {
4942
+ layerElement.appendChild(_this.markerSVGObject);
4926
4943
  }
4927
4944
  else {
4928
- layerElement.appendChild(_this.markerSVGObject);
4945
+ clusterTemplate(currentLayer, _this.markerSVGObject, _this.maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
4929
4946
  }
4930
4947
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4931
4948
  _this.maps.renderReactTemplates();
@@ -5283,6 +5300,12 @@ var loaded = 'loaded';
5283
5300
  * @private
5284
5301
  */
5285
5302
  var click = 'click';
5303
+ /**
5304
+ * Specifies the maps onclick event name.
5305
+ *
5306
+ * @private
5307
+ */
5308
+ var onclick = 'onclick';
5286
5309
  /**
5287
5310
  * Specifies the maps right click event name.
5288
5311
  *
@@ -5477,9 +5500,14 @@ var BingMap = /** @__PURE__ @class */ (function () {
5477
5500
  }
5478
5501
  quadKey = quadKey + '' + digit;
5479
5502
  }
5480
- var subDomain = subDomains[Math.min(parseInt(quadKey.substr(quadKey.length - 1, 1), 10), subDomains.length)];
5481
- imageUrl = imageUrl.replace('{quadkey}', quadKey).replace('{subdomain}', subDomain);
5482
- return imageUrl += '&mkt=' + language + '&ur=IN&Key=' + key;
5503
+ if (!isNullOrUndefined(subDomains)) {
5504
+ var subDomain = subDomains[Math.min(parseInt(quadKey.substr(quadKey.length - 1, 1), 10), subDomains.length)];
5505
+ imageUrl = imageUrl.replace('{quadkey}', quadKey).replace('{subdomain}', subDomain);
5506
+ return imageUrl += '&mkt=' + language + '&ur=IN&Key=' + key;
5507
+ }
5508
+ else {
5509
+ return '';
5510
+ }
5483
5511
  };
5484
5512
  return BingMap;
5485
5513
  }());
@@ -5752,8 +5780,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5752
5780
  else {
5753
5781
  this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption(this.mapObject.element.id + '_MapArea_ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
5754
5782
  x: this.mapObject.isTileMap ? 0 : areaRect.x, y: this.mapObject.isTileMap ? 0 : areaRect.y,
5755
- width: areaRect.width, height: (areaRect.height < 0) ? 0 : !isNullOrUndefined(this.mapObject.legendModule) &&
5756
- this.mapObject.legendModule.totalPages.length > 0 ? this.mapObject.legendModule.legendTotalRect.height : areaRect.height
5783
+ width: areaRect.width, height: areaRect.height
5757
5784
  }));
5758
5785
  }
5759
5786
  this.layerGroup.appendChild(this.clipRectElement);
@@ -5764,6 +5791,14 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5764
5791
  _this.currentLayer = layer;
5765
5792
  _this.processLayers(layer, index);
5766
5793
  });
5794
+ if (!isNullOrUndefined(this.mapObject.legendModule) && this.mapObject.legendSettings.position === 'Float') {
5795
+ if (this.mapObject.isTileMap) {
5796
+ this.layerGroup.appendChild(this.mapObject.legendModule.legendGroup);
5797
+ }
5798
+ else {
5799
+ this.mapObject.svgObject.appendChild(this.mapObject.legendModule.legendGroup);
5800
+ }
5801
+ }
5767
5802
  };
5768
5803
  /**
5769
5804
  * Tile rendering
@@ -5923,9 +5958,21 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5923
5958
  };
5924
5959
  this.mapObject.trigger('layerRendering', eventArgs, function (observedArgs) {
5925
5960
  if (!eventArgs.cancel && eventArgs.visible) {
5926
- if (layer.layerType !== 'Geometry') {
5961
+ if (layer.layerType === 'OSM') {
5962
+ layer.urlTemplate = 'https://a.tile.openstreetmap.org/level/tileX/tileY.png';
5963
+ }
5964
+ if (layer.layerType === 'Google') {
5965
+ layer.urlTemplate = 'https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level';
5966
+ }
5967
+ if (layer.layerType !== 'Geometry' || (isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
5927
5968
  if (layer.layerType !== 'Bing' || _this.bing) {
5928
- _this.renderTileLayer(_this, layer, layerIndex);
5969
+ if (!isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate.indexOf('quadkey') > -1) {
5970
+ var bing = new BingMap(_this.mapObject);
5971
+ _this.bingMapCalculation(layer, layerIndex, _this, bing);
5972
+ }
5973
+ else {
5974
+ _this.renderTileLayer(_this, layer, layerIndex);
5975
+ }
5929
5976
  }
5930
5977
  else if (layer.key && layer.key.length > 1) {
5931
5978
  // eslint-disable-next-line @typescript-eslint/no-this-alias
@@ -5994,6 +6041,17 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5994
6041
  this.mapObject.baseMapBounds = null;
5995
6042
  }
5996
6043
  };
6044
+ LayerPanel.prototype.bingMapCalculation = function (layer, layerIndex, proxy, bing) {
6045
+ bing.imageUrl = layer.urlTemplate;
6046
+ bing.subDomains = ['t0', 't1', 't2', 't3'];
6047
+ bing.maxZoom = '21';
6048
+ proxy.mapObject['bingMap'] = bing;
6049
+ proxy.renderTileLayer(proxy, layer, layerIndex, bing);
6050
+ this.mapObject.arrangeTemplate();
6051
+ if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
6052
+ this.mapObject.zoomModule.applyTransform(true);
6053
+ }
6054
+ };
5997
6055
  LayerPanel.prototype.bubbleCalculation = function (bubbleSettings, range) {
5998
6056
  if (bubbleSettings.dataSource != null && bubbleSettings != null) {
5999
6057
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6186,60 +6244,66 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6186
6244
  }
6187
6245
  break;
6188
6246
  case 'LineString':
6189
- path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
6190
6247
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6191
- currentShapeData.map(function (lineData) {
6192
- path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6248
+ currentShapeData.map(function (lineData, index) {
6249
+ if (index === 0) {
6250
+ path += 'M ' + (lineData['point']['x']) + ' ' + (lineData['point']['y']);
6251
+ }
6252
+ else {
6253
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6254
+ }
6193
6255
  });
6194
6256
  if (path.length > 3) {
6195
- pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6257
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, !isNullOrUndefined(eventArgs.fill) ? eventArgs.fill :
6258
+ eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6259
+ pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6260
+ }
6261
+ break;
6262
+ case 'MultiLineString':
6263
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6264
+ currentShapeData.map(function (multilineData) {
6265
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6266
+ multilineData.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
+ });
6275
+ if (path.length > 3) {
6276
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, !isNullOrUndefined(eventArgs.fill) ? eventArgs.fill :
6277
+ eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6196
6278
  pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6197
6279
  }
6198
6280
  break;
6199
6281
  case 'Point':
6200
6282
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6201
6283
  var pointData = currentShapeData['point'];
6202
- var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / _this.currentFactor;
6203
- circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, null);
6284
+ var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
6285
+ circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6204
6286
  pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6205
6287
  break;
6288
+ case 'MultiPoint':
6289
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6290
+ currentShapeData.map(function (multiPointData, index) {
6291
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6292
+ var pointData = multiPointData['point'];
6293
+ var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
6294
+ circleOptions = new CircleOption((shapeID + "_multiLine_" + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6295
+ pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6296
+ _this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6297
+ });
6298
+ break;
6206
6299
  case 'Path':
6207
6300
  path = currentShapeData['point'];
6208
6301
  pathOptions = new PathOption(shapeID, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6209
6302
  pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6210
6303
  break;
6211
6304
  }
6212
- if (!isNullOrUndefined(pathEle)) {
6213
- var property = (Object.prototype.toString.call(_this.currentLayer.shapePropertyPath) === '[object Array]' ?
6214
- _this.currentLayer.shapePropertyPath : [_this.currentLayer.shapePropertyPath]);
6215
- var properties = void 0;
6216
- for (var j = 0; j < property.length; j++) {
6217
- if (!isNullOrUndefined(currentShapeData['property'])) {
6218
- properties = property[j];
6219
- break;
6220
- }
6221
- }
6222
- pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6223
- (currentShapeData['property'][properties]) : ''));
6224
- pathEle.setAttribute('tabindex', (_this.mapObject.tabIndex + i + 3).toString());
6225
- if (drawingType === 'LineString') {
6226
- pathEle.setAttribute('style', 'outline:none');
6227
- }
6228
- maintainSelection(_this.mapObject.selectedElementId, _this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
6229
- if (_this.mapObject.toggledShapeElementId) {
6230
- for (var j = 0; j < _this.mapObject.toggledShapeElementId.length; j++) {
6231
- var styleProperty = _this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings ?
6232
- _this.currentLayer.shapeSettings : _this.mapObject.legendSettings.toggleLegendSettings;
6233
- if (_this.mapObject.toggledShapeElementId[j] === pathEle.id) {
6234
- pathEle.setAttribute('fill', styleProperty.fill);
6235
- pathEle.setAttribute('stroke', styleProperty.border.color);
6236
- pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
6237
- pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
6238
- pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
6239
- }
6240
- }
6241
- }
6242
- groupElement.appendChild(pathEle);
6305
+ if (!isNullOrUndefined(pathEle) && drawingType !== 'MultiPoint') {
6306
+ _this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6243
6307
  }
6244
6308
  if (i === _this.currentLayer.layerData.length - 1) {
6245
6309
  _this.layerFeatures(layerIndex, colors, renderData, labelTemplateEle);
@@ -6257,6 +6321,49 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6257
6321
  this.layerFeatures(layerIndex, colors, renderData, labelTemplateEle);
6258
6322
  }
6259
6323
  };
6324
+ /**
6325
+ * layer features as bubble, marker, datalabel, navigation line.
6326
+ *
6327
+ * @param {groupElement} Element - Specifies the element to append the group
6328
+ * @param {pathEle} Element - Specifies the svg element
6329
+ * @param {drawingType} string - Specifies the data type
6330
+ * @param {currentShapeData} any - Specifies the layer of shapedata.
6331
+ * @param {index} number - Specifies the tab index.
6332
+ * @returns {void}
6333
+ */
6334
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6335
+ LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType, currentShapeData, index) {
6336
+ var property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
6337
+ this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
6338
+ var properties;
6339
+ for (var j = 0; j < property.length; j++) {
6340
+ if (!isNullOrUndefined(currentShapeData['property'])) {
6341
+ properties = property[j];
6342
+ break;
6343
+ }
6344
+ }
6345
+ pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6346
+ (currentShapeData['property'][properties]) : ''));
6347
+ pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + index + 3).toString());
6348
+ if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
6349
+ pathEle.setAttribute('style', 'outline:none');
6350
+ }
6351
+ maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
6352
+ if (this.mapObject.toggledShapeElementId) {
6353
+ for (var j = 0; j < this.mapObject.toggledShapeElementId.length; j++) {
6354
+ var styleProperty = this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings ?
6355
+ this.currentLayer.shapeSettings : this.mapObject.legendSettings.toggleLegendSettings;
6356
+ if (this.mapObject.toggledShapeElementId[j] === pathEle.id) {
6357
+ pathEle.setAttribute('fill', styleProperty.fill);
6358
+ pathEle.setAttribute('stroke', styleProperty.border.color);
6359
+ pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
6360
+ pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
6361
+ pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
6362
+ }
6363
+ }
6364
+ }
6365
+ groupElement.appendChild(pathEle);
6366
+ };
6260
6367
  /**
6261
6368
  * layer features as bubble, marker, datalabel, navigation line.
6262
6369
  *
@@ -6444,7 +6551,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6444
6551
  break;
6445
6552
  case 'linestring':
6446
6553
  var extraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6447
- this.currentLayer.shapeSettings.border.width : 1;
6554
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6555
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
6448
6556
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6449
6557
  coordinates.map(function (points, index) {
6450
6558
  latitude = points[1];
@@ -6459,31 +6567,61 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6459
6567
  newData['type'] = type;
6460
6568
  this.currentLayer.layerData.push(newData);
6461
6569
  break;
6462
- case 'point': {
6463
- var arrayCollections_1 = false;
6464
- var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6465
- this.currentLayer.shapeSettings.border.width : 1) + (this.currentLayer.shapeSettings.circleRadius * 2);
6570
+ case 'multilinestring':
6571
+ var extraSpaces_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6572
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6573
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
6574
+ var multiLineData_1 = [];
6466
6575
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6467
- coordinates.map(function (points, index) {
6468
- if (Object.prototype.toString.call(points) === '[object Array]') {
6576
+ coordinates.map(function (multiPoints) {
6577
+ newData = [];
6578
+ multiPoints.map(function (points) {
6469
6579
  latitude = points[1];
6470
6580
  longitude = points[0];
6471
- arrayCollections_1 = true;
6472
6581
  var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
6473
- _this.currentLayer.layerData.push({
6474
- point: point, type: type, lat: latitude, lng: longitude, property: properties
6582
+ _this.calculateBox(point, extraSpaces_1);
6583
+ newData.push({
6584
+ point: point, lat: latitude, lng: longitude
6475
6585
  });
6476
- }
6586
+ });
6587
+ multiLineData_1.push(newData);
6588
+ });
6589
+ multiLineData_1['property'] = properties;
6590
+ multiLineData_1['type'] = type;
6591
+ this.currentLayer.layerData.push(multiLineData_1);
6592
+ break;
6593
+ case 'point':
6594
+ var pointExtraSpace = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6595
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6596
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
6597
+ (this.currentLayer.shapeSettings.circleRadius * 2);
6598
+ latitude = coordinates[1];
6599
+ longitude = coordinates[0];
6600
+ var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6601
+ this.calculateBox(point, pointExtraSpace);
6602
+ this.currentLayer.layerData.push({
6603
+ point: point, type: type, lat: latitude, lng: longitude, property: properties
6477
6604
  });
6478
- if (!arrayCollections_1) {
6479
- latitude = coordinates[1];
6480
- longitude = coordinates[0];
6481
- var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6482
- this.calculateBox(point, extraSpace_2);
6483
- this.currentLayer.layerData.push({
6484
- point: point, type: type, lat: latitude, lng: longitude, property: properties
6605
+ break;
6606
+ case 'multipoint': {
6607
+ var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6608
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6609
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
6610
+ (this.currentLayer.shapeSettings.circleRadius * 2);
6611
+ newData = [];
6612
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6613
+ coordinates.map(function (points) {
6614
+ latitude = points[1];
6615
+ longitude = points[0];
6616
+ var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
6617
+ _this.calculateBox(point, extraSpace_2);
6618
+ newData.push({
6619
+ point: point, lat: latitude, lng: longitude
6485
6620
  });
6486
- }
6621
+ });
6622
+ newData['property'] = properties;
6623
+ newData['type'] = type;
6624
+ this.currentLayer.layerData.push(newData);
6487
6625
  break;
6488
6626
  }
6489
6627
  case 'path':
@@ -6495,12 +6633,12 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6495
6633
  };
6496
6634
  LayerPanel.prototype.calculateBox = function (point, extraSpace) {
6497
6635
  if (isNullOrUndefined(this.rectBounds)) {
6498
- this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
6636
+ this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace, y: point.y + extraSpace } };
6499
6637
  }
6500
6638
  else {
6501
- this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
6639
+ this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x - extraSpace);
6502
6640
  this.rectBounds['min']['y'] = Math.min(this.rectBounds['min']['y'], point.y - extraSpace);
6503
- this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x);
6641
+ this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x + extraSpace);
6504
6642
  this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
6505
6643
  }
6506
6644
  };
@@ -6518,6 +6656,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6518
6656
  var end = convertGeoToPoint(bounds.latitude.max, bounds.longitude.max, null, layer, this.mapObject);
6519
6657
  mapHeight = end.y - start.y;
6520
6658
  mapWidth = end.x - start.x;
6659
+ if (mapHeight === 0 || mapWidth === 0) {
6660
+ mapWidth = mapSize.width / 2;
6661
+ mapHeight = mapSize.height;
6662
+ }
6521
6663
  }
6522
6664
  else {
6523
6665
  mapHeight = mapWidth = 500;
@@ -6612,15 +6754,28 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6612
6754
  _this.calculateRectBox(point[0]);
6613
6755
  });
6614
6756
  break;
6757
+ case 'multilinestring':
6758
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6759
+ coordinates.map(function (multiPoint, index) {
6760
+ multiPoint.map(function (point, index) {
6761
+ _this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
6762
+ });
6763
+ });
6764
+ break;
6615
6765
  case 'linestring':
6616
6766
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6617
6767
  coordinates.map(function (point, index) {
6618
- _this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
6768
+ _this.calculateRectBox(point, 'linestring', index === 0 ? true : false);
6619
6769
  });
6620
6770
  break;
6621
6771
  case 'point':
6622
6772
  _this.calculateRectBox(coordinates, 'point');
6623
6773
  break;
6774
+ case 'multipoint':
6775
+ coordinates.map(function (point, index) {
6776
+ _this.calculateRectBox(point, 'multipoint', index === 0 ? true : false);
6777
+ });
6778
+ break;
6624
6779
  }
6625
6780
  }
6626
6781
  });
@@ -6659,7 +6814,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6659
6814
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6660
6815
  LayerPanel.prototype.calculateRectBox = function (coordinates, type, isFirstItem) {
6661
6816
  var _this = this;
6662
- if (type !== 'LineString' && type !== 'point') {
6817
+ if ((type !== 'linestring' && type !== 'multilinestring') && (type !== 'point' && type !== 'multipoint')) {
6663
6818
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6664
6819
  Array.prototype.forEach.call(coordinates, function (currentCoords) {
6665
6820
  if (isNullOrUndefined(_this.mapObject.baseMapBounds)) {
@@ -6728,7 +6883,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6728
6883
  var tile = new Tile(tileI % ycount, j);
6729
6884
  tile.left = x;
6730
6885
  tile.top = y;
6731
- if (baseLayer.layerType === 'Bing') {
6886
+ if (baseLayer.layerType === 'Bing' || (bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
6732
6887
  var key = baseLayer.key;
6733
6888
  tile.src = bing.getBingMap(tile, key, baseLayer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
6734
6889
  }
@@ -6757,11 +6912,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6757
6912
  if (!(layer.type === 'SubLayer' && layer.visible)) {
6758
6913
  continue;
6759
6914
  }
6760
- if (layer.layerType === 'OSM' || layer.layerType === 'Bing') {
6915
+ if ((layer.layerType !== 'Geometry' && layer.layerType !== 'GoogleStaticMap') || (layer.layerType === 'Geometry' &&
6916
+ isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
6761
6917
  for (var _b = 0, proxTiles_1 = proxTiles; _b < proxTiles_1.length; _b++) {
6762
6918
  var baseTile = proxTiles_1[_b];
6763
6919
  var subtile = extend({}, baseTile, {}, true);
6764
6920
  if (layer.layerType === 'Bing') {
6921
+ bing = new BingMap(this.mapObject);
6765
6922
  subtile.src = bing.getBingMap(subtile, layer.key, layer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
6766
6923
  }
6767
6924
  else {
@@ -6807,7 +6964,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6807
6964
  else {
6808
6965
  if (type !== 'Pan' && element1 && element) {
6809
6966
  element1.appendChild(element.children[0]);
6810
- if (!isNullOrUndefined(document.getElementById(_this.mapObject.element.id + '_animated_tiles'))) {
6967
+ if (!_this.mapObject.isAddLayer && !isNullOrUndefined(document.getElementById(_this.mapObject.element.id + '_animated_tiles'))) {
6811
6968
  document.getElementById(_this.mapObject.element.id + '_animated_tiles').id =
6812
6969
  _this.mapObject.element.id + '_animated_tiles_old';
6813
6970
  }
@@ -6821,6 +6978,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6821
6978
  var id = 0;
6822
6979
  var _loop_3 = function (tile) {
6823
6980
  var imgElement = createElement('img');
6981
+ imgElement.setAttribute('height', '256px');
6982
+ imgElement.setAttribute('width', '256px');
6824
6983
  imgElement.setAttribute('src', tile.src);
6825
6984
  var mapId = _this.mapObject.element.id;
6826
6985
  imgElement.onload = function () {
@@ -7334,6 +7493,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7334
7493
  this.renderArea();
7335
7494
  this.processRequestJsonData();
7336
7495
  this.renderComplete();
7496
+ this.isAddLayer = !this.isTileMap ? false : this.isAddLayer;
7337
7497
  };
7338
7498
  /**
7339
7499
  * To Initialize the control rendering.
@@ -7474,16 +7634,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7474
7634
  };
7475
7635
  Maps.prototype.renderMap = function () {
7476
7636
  if (this.legendModule && this.legendSettings.visible) {
7477
- if (!this.isTileMap) {
7478
- this.legendModule.renderLegend();
7479
- }
7480
- else {
7481
- var layerCount = this.layersCollection.length - 1;
7482
- if (!this.layersCollection[layerCount].isBaseLayer) {
7483
- this.isTileMapSubLayer = true;
7484
- this.legendModule.renderLegend();
7485
- }
7486
- }
7637
+ this.legendModule.renderLegend();
7487
7638
  }
7488
7639
  this.createTile();
7489
7640
  if (this.zoomSettings.enable && this.zoomModule) {
@@ -7566,12 +7717,16 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7566
7717
  bottom = svg.bottom - tile.bottom - element.offsetTop;
7567
7718
  top_1 = parseFloat(tileElement.style.top) + element.offsetTop;
7568
7719
  }
7569
- top_1 = (bottom <= 11) ? top_1 : (top_1 * 2);
7570
- left = (bottom <= 11) ? left : (left * 2);
7720
+ top_1 = (bottom <= 11) ? top_1 : (!isNullOrUndefined(this.legendModule) && this.legendSettings.position === 'Bottom') ? this.mapAreaRect.y : (top_1 * 2);
7721
+ left = (bottom <= 11) ? left : !isNullOrUndefined(this.legendModule) ? left : (left * 2);
7571
7722
  tileElement.style.top = top_1 + 'px';
7572
7723
  tileElement.style.left = left + 'px';
7573
7724
  tileElement1.style.top = top_1 + 'px';
7574
7725
  tileElement1.style.left = left + 'px';
7726
+ if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
7727
+ tileElement.style.height = tileElement1.style.height = this.legendModule.legendTotalRect.height + 'px';
7728
+ tileElement.style.width = tileElement1.style.width = this.legendModule.legendTotalRect.width + 'px';
7729
+ }
7575
7730
  }
7576
7731
  this.arrangeTemplate();
7577
7732
  if (this.annotationsModule) {
@@ -7697,12 +7852,21 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7697
7852
  this.zoomModule.layerCollectionEle = getElementByID(this.element.id + '_Layer_Collections');
7698
7853
  }
7699
7854
  if (this.isTileMap && getElementByID(this.element.id + '_Tile_SVG') && getElementByID(this.element.id + '_tile_parent')) {
7700
- var tileRect = getElementByID(this.element.id + '_tile_parent').getBoundingClientRect();
7701
- var tileSvgRect = getElementByID(this.element.id + '_Tile_SVG').getBoundingClientRect();
7855
+ var tileElement = getElementByID(this.element.id + '_tile_parent');
7856
+ var tileSvgElement = getElementByID(this.element.id + '_Tile_SVG');
7857
+ var tileSvgParentElement = getElementByID(this.element.id + '_Tile_SVG_Parent');
7858
+ var tileRect = tileElement.getBoundingClientRect();
7859
+ var tileSvgRect = tileSvgElement.getBoundingClientRect();
7702
7860
  left = (tileRect.left - tileSvgRect.left);
7703
7861
  top = (tileRect.top - tileSvgRect.top);
7704
- getElementByID(this.element.id + '_Tile_SVG_Parent').style.left = left + 'px';
7705
- getElementByID(this.element.id + '_Tile_SVG_Parent').style.top = top + 'px';
7862
+ tileSvgParentElement.style.left = left + 'px';
7863
+ tileSvgParentElement.style.top = top + 'px';
7864
+ if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
7865
+ tileElement.style.width = tileSvgElement.style.width = this.legendModule.legendTotalRect.width.toString();
7866
+ tileElement.style.height = tileSvgElement.style.height = this.legendModule.legendTotalRect.height.toString();
7867
+ tileSvgParentElement.style.width = this.legendModule.legendTotalRect.width + 'px';
7868
+ tileSvgParentElement.style.height = this.legendModule.legendTotalRect.height + 'px';
7869
+ }
7706
7870
  var markerTemplateElements = document.getElementsByClassName('template');
7707
7871
  if (!isNullOrUndefined(markerTemplateElements) && markerTemplateElements.length > 0) {
7708
7872
  for (var i = 0; i < markerTemplateElements.length; i++) {
@@ -7720,7 +7884,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7720
7884
  if (!isNullOrUndefined(elements) && elements.childElementCount > 0) {
7721
7885
  for (var i = 0; i < elements.childNodes.length; i++) {
7722
7886
  var childElement = elements.childNodes[i];
7723
- if (childElement.tagName === 'g') {
7887
+ if (childElement.tagName === 'g' && childElement.id.indexOf('_Legend_Group') == -1) {
7724
7888
  var layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
7725
7889
  for (var j = 0; j < childElement.childNodes.length; j++) {
7726
7890
  var childNode = childElement.childNodes[j];
@@ -7757,7 +7921,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7757
7921
  }
7758
7922
  var templateElements = document.getElementsByClassName(this.element.id + '_template');
7759
7923
  if (!isNullOrUndefined(templateElements) && templateElements.length > 0 &&
7760
- getElementByID(this.element.id + '_Layer_Collections') && this.layers[this.layers.length - 1].layerType !== 'OSM') {
7924
+ getElementByID(this.element.id + '_Layer_Collections') && !this.isTileMap) {
7761
7925
  for (var i = 0; i < templateElements.length; i++) {
7762
7926
  var offSetLetValue = 0;
7763
7927
  var offSetTopValue = 0;
@@ -7792,10 +7956,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7792
7956
  var mainLayer = this.layersCollection[0];
7793
7957
  var padding = 0;
7794
7958
  if (mainLayer.isBaseLayer && (mainLayer.layerType === 'OSM' || mainLayer.layerType === 'Bing' ||
7795
- mainLayer.layerType === 'GoogleStaticMap' || mainLayer.layerType === 'Google')) {
7796
- if (mainLayer.layerType === 'Google') {
7797
- mainLayer.urlTemplate = 'https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level';
7798
- }
7959
+ mainLayer.layerType === 'GoogleStaticMap' || mainLayer.layerType === 'Google' || (!isNullOrUndefined(mainLayer.urlTemplate) && mainLayer.urlTemplate !== ''))) {
7799
7960
  removeElement(this.element.id + '_tile_parent');
7800
7961
  removeElement(this.element.id + '_tiles');
7801
7962
  removeElement('animated_tiles');
@@ -7843,7 +8004,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7843
8004
  var baseLayer = mainLayers[i];
7844
8005
  if (baseLayer.visible && baseIndex === i) {
7845
8006
  baseLayer.isBaseLayer = true;
7846
- this.isTileMap = (baseLayer.layerType === 'Geometry') ? false : true;
8007
+ this.isTileMap = (baseLayer.layerType === 'Geometry' && !isNullOrUndefined(baseLayer.shapeData)) ? false : true;
7847
8008
  this.layersCollection.push(baseLayer);
7848
8009
  break;
7849
8010
  }
@@ -7890,12 +8051,19 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7890
8051
  * @private
7891
8052
  */
7892
8053
  Maps.prototype.renderTitle = function (title, type, bounds, groupEle) {
7893
- var style = title.textStyle;
8054
+ var style = {
8055
+ size: title.textStyle.size,
8056
+ color: title.textStyle.color,
8057
+ fontFamily: title.textStyle.fontFamily,
8058
+ fontWeight: title.textStyle.fontWeight,
8059
+ fontStyle: title.textStyle.fontStyle,
8060
+ opacity: title.textStyle.opacity
8061
+ };
7894
8062
  var height;
7895
8063
  var width = Math.abs((this.margin.left + this.margin.right) - this.availableSize.width);
7896
- style.fontFamily = this.themeStyle.fontFamily || style.fontFamily;
8064
+ style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
7897
8065
  style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
7898
- style.size = this.themeStyle.titleFontSize || style.size;
8066
+ style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || Theme.mapsSubTitleFont.size);
7899
8067
  if (title.text) {
7900
8068
  if (isNullOrUndefined(groupEle)) {
7901
8069
  groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
@@ -8065,6 +8233,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8065
8233
  var id = event.target['id'];
8066
8234
  event.preventDefault();
8067
8235
  if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
8236
+ this.mapAreaRect = this.legendModule.initialMapAreaRect;
8068
8237
  this.legendModule.currentPage = (id.indexOf('_Left_Page_') > -1) ? (this.legendModule.currentPage - 1) :
8069
8238
  (this.legendModule.currentPage + 1);
8070
8239
  this.legendModule.legendGroup = this.renderer.createGroup({ id: this.element.id + '_Legend_Group' });
@@ -8129,24 +8298,35 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8129
8298
  latitude: latitude, longitude: longitude,
8130
8299
  isShapeSelected: this.SelectedElement(targetEle)
8131
8300
  };
8132
- this.trigger('click', eventArgs_1, function (mouseArgs) {
8133
- if (targetEle.id.indexOf('shapeIndex') > -1) {
8134
- _this.mergeCluster();
8135
- if (getElement(_this.element.id + '_mapsTooltip') &&
8136
- _this.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_') > -1) {
8137
- removeElement(_this.element.id + '_mapsTooltip');
8138
- }
8139
- }
8140
- if (_this.markerModule) {
8141
- _this.markerModule.markerClusterClick(e);
8142
- }
8143
- if (!eventArgs_1.cancel) {
8144
- _this.notify(click, targetEle);
8145
- }
8146
- if (!eventArgs_1.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
8147
- _this.triggerShapeSelection(targetEle);
8148
- }
8149
- });
8301
+ if (this.onclick) {
8302
+ eventArgs_1.name = onclick;
8303
+ this.trigger('onclick', eventArgs_1, function (mouseArgs) {
8304
+ _this.clickHandler(e, eventArgs_1, targetEle);
8305
+ });
8306
+ }
8307
+ else {
8308
+ this.trigger('click', eventArgs_1, function (mouseArgs) {
8309
+ _this.clickHandler(e, eventArgs_1, targetEle);
8310
+ });
8311
+ }
8312
+ }
8313
+ };
8314
+ Maps.prototype.clickHandler = function (e, eventArgs, targetEle) {
8315
+ if (targetEle.id.indexOf('shapeIndex') > -1) {
8316
+ this.mergeCluster();
8317
+ if (getElement(this.element.id + '_mapsTooltip') &&
8318
+ this.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_') > -1) {
8319
+ removeElement(this.element.id + '_mapsTooltip');
8320
+ }
8321
+ }
8322
+ if (this.markerModule) {
8323
+ this.markerModule.markerClusterClick(e);
8324
+ }
8325
+ if (!eventArgs.cancel) {
8326
+ this.notify(click, targetEle);
8327
+ }
8328
+ if (!eventArgs.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
8329
+ this.triggerShapeSelection(targetEle);
8150
8330
  }
8151
8331
  };
8152
8332
  Maps.prototype.triggerShapeSelection = function (targetEle) {
@@ -8246,13 +8426,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8246
8426
  latitude = latLongValue.latitude;
8247
8427
  longitude = latLongValue.longitude;
8248
8428
  }
8249
- var eventArgs = {
8250
- cancel: false, name: click, target: targetId, x: e.clientX, y: e.clientY,
8251
- latitude: latitude, longitude: longitude, isShapeSelected: this.SelectedElement(targetEle)
8252
- };
8253
- // eslint-disable-next-line @typescript-eslint/no-empty-function
8254
- this.trigger('click', eventArgs, function (mouseArgs) {
8255
- });
8256
8429
  }
8257
8430
  this.titleTooltip(e, pageX, pageY, true);
8258
8431
  if (!isNullOrUndefined(this.legendModule)) {
@@ -8260,7 +8433,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8260
8433
  }
8261
8434
  }
8262
8435
  this.notify(Browser.touchEndEvent, e);
8263
- if (e.cancelable) {
8436
+ if (e.cancelable && !this.isTouch) {
8264
8437
  e.preventDefault();
8265
8438
  }
8266
8439
  return false;
@@ -8414,7 +8587,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8414
8587
  removeElement(this.element.id + '_EJ2_LegendTitle_Tooltip');
8415
8588
  }
8416
8589
  if ((targetId === (this.element.id + '_Map_title')) && (event.target.textContent.indexOf('...') > -1)) {
8417
- 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);
8590
+ 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);
8418
8591
  }
8419
8592
  else {
8420
8593
  removeElement(this.element.id + '_EJ2_Title_Tooltip');
@@ -8526,8 +8699,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8526
8699
  * @param {Object} layer - Specifies the layer for the maps.
8527
8700
  */
8528
8701
  Maps.prototype.addLayer = function (layer) {
8529
- this.layers.push(new LayerSettings(this.layers[0], 'layers', layer));
8530
- this.refresh();
8702
+ var mapsLayer = this.layers;
8703
+ mapsLayer.push(layer);
8704
+ this.isAddLayer = true;
8705
+ this.layers = mapsLayer;
8531
8706
  };
8532
8707
  /**
8533
8708
  * This method is used to remove a layer from map.
@@ -8536,8 +8711,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8536
8711
  * @returns {void}
8537
8712
  */
8538
8713
  Maps.prototype.removeLayer = function (index) {
8539
- this.layers.splice(index, 1);
8540
- this.refresh();
8714
+ var mapsLayer = this.layers;
8715
+ mapsLayer.splice(index, 1);
8716
+ this.layers = mapsLayer;
8541
8717
  };
8542
8718
  /**
8543
8719
  * This method is used to add markers dynamically in the maps.
@@ -8822,6 +8998,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8822
8998
  Maps.prototype.onPropertyChanged = function (newProp, oldProp) {
8823
8999
  var render = false;
8824
9000
  var isMarker = false;
9001
+ var isLayer = false;
8825
9002
  var isStaticMapType = false;
8826
9003
  var layerEle;
8827
9004
  if (newProp['layers']) {
@@ -8842,13 +9019,15 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8842
9019
  case 'legendSettings':
8843
9020
  case 'baseLayerIndex':
8844
9021
  if (prop === 'layers') {
9022
+ isLayer = true;
8845
9023
  var layerPropLength = Object.keys(newProp.layers).length;
8846
9024
  for (var x = 0; x < layerPropLength; x++) {
8847
9025
  if (!isNullOrUndefined(newProp.layers[x])) {
8848
9026
  var collection = Object.keys(newProp.layers[x]);
8849
9027
  for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
8850
9028
  var collectionProp = collection_1[_b];
8851
- if (collectionProp === 'layerType' && newProp.layers[x].layerType === 'OSM') {
9029
+ if ((collectionProp === 'layerType' && newProp.layers[x].layerType !== 'Geometry') || (isNullOrUndefined(this.layers[x].shapeData)
9030
+ && !isNullOrUndefined(this.layers[x].urlTemplate) && this.layers[x].urlTemplate !== '')) {
8852
9031
  this.isReset = true;
8853
9032
  }
8854
9033
  else if (collectionProp === 'markerSettings') {
@@ -8865,7 +9044,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8865
9044
  break;
8866
9045
  case 'zoomSettings':
8867
9046
  if (!isNullOrUndefined(oldProp.zoomSettings)) {
8868
- if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor) {
9047
+ if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor && !isLayer) {
8869
9048
  render = false;
8870
9049
  }
8871
9050
  else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
@@ -9131,6 +9310,28 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9131
9310
  }
9132
9311
  return null;
9133
9312
  };
9313
+ /**
9314
+ * This method is used to get the Bing maps URL.
9315
+ *
9316
+ * @param {string} url - Specifies the URL of the maps.
9317
+ * @returns {Promise<string>} - Returns the processed Bing URL as Promise.
9318
+ */
9319
+ Maps.prototype.getBingUrlTemplate = function (url) {
9320
+ var promise = new Promise(function (resolve, reject) {
9321
+ var ajax = new Ajax({
9322
+ url: url
9323
+ });
9324
+ ajax.onSuccess = function (json) {
9325
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9326
+ var jsonObject = JSON.parse(json);
9327
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9328
+ var resource = jsonObject['resourceSets'][0]['resources'][0];
9329
+ resolve(resource['imageUrl']);
9330
+ };
9331
+ ajax.send();
9332
+ });
9333
+ return promise;
9334
+ };
9134
9335
  /**
9135
9336
  * To find visibility of layers and markers for required modules load.
9136
9337
  *
@@ -9339,6 +9540,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9339
9540
  __decorate([
9340
9541
  Event()
9341
9542
  ], Maps.prototype, "click", void 0);
9543
+ __decorate([
9544
+ Event()
9545
+ ], Maps.prototype, "onclick", void 0);
9342
9546
  __decorate([
9343
9547
  Event()
9344
9548
  ], Maps.prototype, "doubleClick", void 0);
@@ -9485,12 +9689,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
9485
9689
  isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
9486
9690
  var shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
9487
9691
  ? shape[shapePath].toLowerCase() : shape[shapePath];
9488
- if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
9489
- if (layerData[i]['type'] === 'Point') {
9490
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9491
- shapePoints.push(this.getPoints(layerData[i], []));
9492
- }
9493
- else if (!layerData[i]['_isMultiPolygon']) {
9692
+ if (shapeDataLayerPathValue === shapePathValue && (layerData[i].type !== 'LineString' && layerData[i].type !== 'MultiLineString' && layerData[i]['type'] !== 'Point' && layerData[i]['type'] !== 'MultiPoint')) {
9693
+ if (!layerData[i]['_isMultiPolygon']) {
9494
9694
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9495
9695
  shapePoints.push(this.getPoints(layerData[i], []));
9496
9696
  currentLength = shapePoints[shapePoints.length - 1].length;
@@ -9574,7 +9774,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
9574
9774
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9575
9775
  var translate;
9576
9776
  var animate$$1 = layer.animationDuration !== 0 || isNullOrUndefined(_this.maps.zoomModule);
9577
- if (_this.maps.zoomSettings.zoomFactor > 1 && !isNullOrUndefined(_this.maps.zoomModule)) {
9777
+ if (_this.maps.zoomSettings.zoomFactor > 1 && !isNullOrUndefined(_this.maps.zoomModule) && !_this.maps.isTileMap) {
9578
9778
  translate = getZoomTranslate(_this.maps, layer, animate$$1);
9579
9779
  }
9580
9780
  else {
@@ -9797,7 +9997,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9797
9997
  var shapeWidth;
9798
9998
  var scaleZoomValue = !isNullOrUndefined(this.maps.scale) ? Math.floor(this.maps.scale) : 1;
9799
9999
  var zoomLabelsPosition = this.maps.zoomSettings.enable ? !isNullOrUndefined(this.maps.zoomShapeCollection) &&
9800
- this.maps.zoomShapeCollection.length > 0 : this.maps.zoomSettings.enable;
10000
+ this.maps.zoomShapeCollection.length > 0 && !this.maps.isAddLayer : this.maps.zoomSettings.enable;
9801
10001
  this.maps.translateType = 'labels';
9802
10002
  for (var j = 0; j < properties.length; j++) {
9803
10003
  if (shapeProperties[properties[j]]) {
@@ -9815,7 +10015,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9815
10015
  layer.dataSource, layer.shapeDataPath, shapeData['properties'][propertyPath], layer.shapeDataPath);
9816
10016
  if (!isNullOrUndefined(shapes['property'])) {
9817
10017
  shapePoint = [[]];
9818
- if (!layerData[index]['_isMultiPolygon'] && layerData[index]['type'] !== 'Point') {
10018
+ if (!layerData[index]['_isMultiPolygon'] && layerData[index]['type'] !== 'Point' && layerData[index]['type'] !== 'MultiPoint') {
9819
10019
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9820
10020
  shapePoint.push(this.getPoint(layerData[index], []));
9821
10021
  currentLength = shapePoint[shapePoint.length - 1].length;
@@ -9824,21 +10024,9 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9824
10024
  midIndex = shapePoint.length - 1;
9825
10025
  }
9826
10026
  }
9827
- else {
10027
+ else if (layerData[index]['type'] !== 'Point' && layerData[index]['type'] !== 'MultiPoint') {
9828
10028
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9829
10029
  var layer_1 = layerData[index];
9830
- if (layer_1['type'] === 'Point') {
9831
- isPoint = true;
9832
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9833
- var layerPoints = [];
9834
- layerPoints.push(this.getPoint(layerData, []));
9835
- shapePoint = layerPoints;
9836
- currentLength = shapePoint[shapePoint.length - 1].length;
9837
- if (pointsLength < currentLength) {
9838
- pointsLength = currentLength;
9839
- midIndex = shapePoint.length - 1;
9840
- }
9841
- }
9842
10030
  for (var j = 0; j < layer_1.length; j++) {
9843
10031
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9844
10032
  shapePoint.push(this.getPoint(layer_1[j], []));
@@ -10083,10 +10271,21 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10083
10271
  };
10084
10272
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10085
10273
  DataLabel.prototype.getPoint = function (shapes, points) {
10086
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10087
- shapes.map(function (current, index) {
10088
- points.push(new Point(current['point']['x'], current['point']['y']));
10089
- });
10274
+ if (shapes['type'] === 'MultiLineString') {
10275
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10276
+ shapes.map(function (current) {
10277
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10278
+ current.map(function (shape) {
10279
+ points.push(new Point(shape['point']['x'], shape['point']['y']));
10280
+ });
10281
+ });
10282
+ }
10283
+ else {
10284
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10285
+ shapes.map(function (current, index) {
10286
+ points.push(new Point(current['point']['x'], current['point']['y']));
10287
+ });
10288
+ }
10090
10289
  return points;
10091
10290
  };
10092
10291
  /**
@@ -10280,6 +10479,10 @@ var Legend = /** @__PURE__ @class */ (function () {
10280
10479
  * @private
10281
10480
  */
10282
10481
  this.legendBorderRect = new Rect(0, 0, 0, 0);
10482
+ /**
10483
+ * @private
10484
+ */
10485
+ this.initialMapAreaRect = new Rect(0, 0, 0, 0);
10283
10486
  /**
10284
10487
  * @private
10285
10488
  */
@@ -10338,6 +10541,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10338
10541
  this.heightIncrement = 0;
10339
10542
  this.defsElement = this.maps.renderer.createDefs();
10340
10543
  this.maps.svgObject.appendChild(this.defsElement);
10544
+ this.initialMapAreaRect = this.maps.mapAreaRect;
10341
10545
  this.calculateLegendBounds();
10342
10546
  this.drawLegend();
10343
10547
  };
@@ -10377,9 +10581,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10377
10581
  }
10378
10582
  }
10379
10583
  }
10380
- else {
10381
- _this.getMarkersLegendCollections(layerIndex, layer.markerSettings);
10382
- }
10584
+ }
10585
+ if (legend.type === 'Markers') {
10586
+ _this.getMarkersLegendCollections(layerIndex, layer.markerSettings);
10383
10587
  }
10384
10588
  });
10385
10589
  if (this.legendCollection.length > 0) {
@@ -10570,8 +10774,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10570
10774
  }
10571
10775
  }
10572
10776
  else {
10777
+ var padding = 10;
10573
10778
  shapeX = shapeLocation[j - 1].x;
10574
- shapeY = prevPositionY + topPadding + (shapeHeight / 2);
10779
+ shapeY = prevPositionY + padding + (shapeHeight / 2);
10575
10780
  }
10576
10781
  }
10577
10782
  }
@@ -10674,7 +10879,14 @@ var Legend = /** @__PURE__ @class */ (function () {
10674
10879
  var legend = map.legendSettings;
10675
10880
  var render = map.renderer;
10676
10881
  var textOptions;
10677
- var textFont = legend.textStyle;
10882
+ var textFont = {
10883
+ size: legend.textStyle.size,
10884
+ color: legend.textStyle.color,
10885
+ fontFamily: legend.textStyle.fontFamily,
10886
+ fontWeight: legend.textStyle.fontWeight,
10887
+ fontStyle: legend.textStyle.fontStyle,
10888
+ opacity: legend.textStyle.opacity
10889
+ };
10678
10890
  this.legendGroup = render.createGroup({ id: map.element.id + '_Legend_Group' });
10679
10891
  if (legend.mode === 'Interactive') {
10680
10892
  for (var i = 0; i < this.legendRenderingCollections.length; i++) {
@@ -10690,7 +10902,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10690
10902
  textFont.color = (textFont.color !== null) ? textFont.color : this.maps.themeStyle.legendTextColor;
10691
10903
  var rectOptions = new RectOption(itemId, item['fill'], item['shapeBorder'], legend.opacity, bounds);
10692
10904
  textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'middle', item['text'], '', '');
10693
- textFont.fontFamily = map.themeStyle.fontFamily || textFont.fontFamily;
10905
+ textFont.fontFamily = !isNullOrUndefined(textFont.fontFamily) ? textFont.fontFamily : this.maps.themeStyle.fontFamily;
10694
10906
  textFont.size = map.themeStyle.legendFontSize || textFont.size;
10695
10907
  renderTextElement(textOptions, textFont, textFont.color, this.legendGroup);
10696
10908
  this.legendGroup.appendChild(render.drawRectangle(rectOptions));
@@ -10745,7 +10957,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10745
10957
  };
10746
10958
  legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
10747
10959
  this.maps.themeStyle.legendTextColor;
10748
- legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
10960
+ legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily : this.maps.themeStyle.fontFamily;
10749
10961
  legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
10750
10962
  if (i === 0) {
10751
10963
  this.renderLegendBorder();
@@ -10821,7 +11033,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10821
11033
  'opacity': 1,
10822
11034
  'dominant-baseline': ''
10823
11035
  };
10824
- pagingGroup.appendChild(render.createText(pageTextOptions, pagingText));
11036
+ var pagingTextElement = render.createText(pageTextOptions, pagingText);
11037
+ pagingTextElement.setAttribute('style', 'user-select: none;');
11038
+ pagingGroup.appendChild(pagingTextElement);
10825
11039
  this.legendGroup.appendChild(pagingGroup);
10826
11040
  }
10827
11041
  this.legendToggle();
@@ -10833,6 +11047,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10833
11047
  var shapeIndex;
10834
11048
  var layerIndex;
10835
11049
  var dataIndex;
11050
+ var pointIndex;
10836
11051
  var legend = this.maps.legendSettings;
10837
11052
  var textEle = legend.mode === 'Default' ? document.getElementById(targetElement.id.replace('Shape', 'Text')) :
10838
11053
  document.getElementById(targetElement.id + '_Text');
@@ -10920,12 +11135,20 @@ var Legend = /** @__PURE__ @class */ (function () {
10920
11135
  }
10921
11136
  if (enable) {
10922
11137
  for (var j = 0; j < data.length; j++) {
11138
+ var shapeElement = void 0;
10923
11139
  shapeIndex = data[j]['shapeIndex'];
10924
11140
  layerIndex = data[j]['layerIndex'];
10925
11141
  dataIndex = data[j]['dataIndex'];
10926
- var shapeEle = document.getElementById(this.maps.element.id + '_LayerIndex_' +
10927
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
10928
- if (shapeEle !== null) {
11142
+ pointIndex = data[j]['pointIndex'];
11143
+ if (pointIndex === -1) {
11144
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11145
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11146
+ }
11147
+ else {
11148
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11149
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11150
+ }
11151
+ if (shapeElement !== null) {
10929
11152
  var shapeMatch = true;
10930
11153
  if (this.maps.legendSelectionCollection !== null) {
10931
11154
  for (var i_1 = 0; i_1 < this.maps.legendSelectionCollection.length; i_1++) {
@@ -10942,13 +11165,13 @@ var Legend = /** @__PURE__ @class */ (function () {
10942
11165
  }
10943
11166
  length = this.legendHighlightCollection.length;
10944
11167
  var legendHighlightColor = this.legendHighlightCollection[length - 1]['legendOldFill'];
10945
- this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeEle);
11168
+ this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeElement);
10946
11169
  var shapeItemCount = this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].length - 1;
10947
- var shapeOldFillColor = shapeEle.getAttribute('fill');
11170
+ var shapeOldFillColor = shapeElement.getAttribute('fill');
10948
11171
  this.legendHighlightCollection[length - 1]['shapeOldFillColor'].push(shapeOldFillColor);
10949
11172
  var shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
10950
11173
  this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
10951
- this.setColor(shapeEle, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11174
+ this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
10952
11175
  this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
10953
11176
  }
10954
11177
  else if (value === 'selection') {
@@ -10971,12 +11194,12 @@ var Legend = /** @__PURE__ @class */ (function () {
10971
11194
  }
10972
11195
  selectLength = this.maps.legendSelectionCollection.length;
10973
11196
  var legendSelectionColor = this.maps.legendSelectionCollection[selectLength - 1]['legendOldFill'];
10974
- this.maps.legendSelectionCollection[selectLength - 1]['MapShapeCollection']['Elements'].push(shapeEle);
11197
+ this.maps.legendSelectionCollection[selectLength - 1]['MapShapeCollection']['Elements'].push(shapeElement);
10975
11198
  this.maps.legendSelectionCollection[selectLength - 1]['shapeOldFillColor'] = this.shapePreviousColor;
10976
11199
  this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
10977
- this.setColor(shapeEle, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
10978
- if (this.maps.selectedElementId.indexOf(shapeEle.getAttribute('id')) === -1) {
10979
- this.maps.selectedElementId.push(shapeEle.getAttribute('id'));
11200
+ this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
11201
+ if (this.maps.selectedElementId.indexOf(shapeElement.getAttribute('id')) === -1) {
11202
+ this.maps.selectedElementId.push(shapeElement.getAttribute('id'));
10980
11203
  }
10981
11204
  if (j === data.length - 1) {
10982
11205
  this.maps.legendSelection = false;
@@ -10991,14 +11214,15 @@ var Legend = /** @__PURE__ @class */ (function () {
10991
11214
  }
10992
11215
  };
10993
11216
  Legend.prototype.setColor = function (element, fill, opacity, borderColor, borderWidth, type) {
11217
+ var isLineStringShape = (element.parentElement.id.indexOf('LineString') > -1);
10994
11218
  if (type === 'selection') {
10995
- maintainStyleClass('ShapeselectionMap', 'ShapeselectionMapStyle', fill, opacity, borderColor, borderWidth, this.maps);
10996
- element.setAttribute('class', 'ShapeselectionMapStyle');
11219
+ maintainStyleClass((isLineStringShape ? 'LineselectionMap' : 'ShapeselectionMap'), (isLineStringShape ? 'LineselectionMapStyle' : 'ShapeselectionMapStyle'), (isLineStringShape ? 'transparent' : fill), opacity, (isLineStringShape ? fill : borderColor), borderWidth, this.maps);
11220
+ element.setAttribute('class', isLineStringShape ? 'LineselectionMapStyle' : 'ShapeselectionMapStyle');
10997
11221
  }
10998
11222
  else {
10999
- element.setAttribute('fill', fill);
11223
+ element.setAttribute('fill', isLineStringShape ? 'transparent' : fill);
11000
11224
  element.setAttribute('fill-opacity', opacity);
11001
- element.setAttribute('stroke', borderColor);
11225
+ element.setAttribute('stroke', isLineStringShape ? fill : borderColor);
11002
11226
  element.setAttribute('stroke-width', (Number(borderWidth) / this.maps.scale).toString());
11003
11227
  }
11004
11228
  };
@@ -11041,7 +11265,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11041
11265
  var dataCount = shapeElements.length;
11042
11266
  for (var j = 0; j < dataCount; j++) {
11043
11267
  var shapeElement = getElement(shapeElements[j]);
11044
- if (shapeElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11268
+ if (shapeElement.getAttribute('class') === 'ShapeselectionMapStyle' ||
11269
+ shapeElement.getAttribute('class') === 'LineselectionMapStyle') {
11045
11270
  removeClass(shapeElement);
11046
11271
  var selectedElementIdIndex = this.maps.selectedElementId.indexOf(shapeElement.id);
11047
11272
  if (selectedElementIdIndex !== -1) {
@@ -11119,12 +11344,14 @@ var Legend = /** @__PURE__ @class */ (function () {
11119
11344
  this.maps.legendSelectionClass = module;
11120
11345
  }
11121
11346
  else {
11122
- if ((checkSelection <= 1) && targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11347
+ if ((checkSelection <= 1) && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11348
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle')) {
11123
11349
  if (!this.maps.layers[layerIndex].selectionSettings.enableMultiSelect) {
11124
11350
  this.maps.selectedLegendElementId.splice(selectionIndex, 1);
11125
11351
  }
11126
11352
  else {
11127
- if (checkSelection <= 1 && targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11353
+ if (checkSelection <= 1 && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11354
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle')) {
11128
11355
  this.maps.selectedLegendElementId.splice(selectionIndex, 1);
11129
11356
  }
11130
11357
  }
@@ -11211,7 +11438,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11211
11438
  }
11212
11439
  }
11213
11440
  }
11214
- if (selectionEle && (selectionEle['IsSelected'] && targetElement.getAttribute('class') === 'ShapeselectionMapStyle')) {
11441
+ if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11442
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
11215
11443
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11216
11444
  var element = this.maps.legendSelectionCollection[selectionEle['SelectionIndex']];
11217
11445
  var multiSelection = 0;
@@ -11302,7 +11530,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11302
11530
  }
11303
11531
  for (var j = 0; j < this.maps.selectedLegendElementId.length; j++) {
11304
11532
  var idIndex = this.maps.legendSettings.mode === 'Interactive' ?
11305
- 'container_Legend_Index_' : 'container_Legend_Shape_Index_';
11533
+ this.maps.element.id + '_Legend_Index_' : this.maps.element.id + '_Legend_Shape_Index_';
11306
11534
  var selectedElement = idIndex + this.maps.selectedLegendElementId[j];
11307
11535
  var legendElement = document.getElementById(selectedElement);
11308
11536
  if (!isNullOrUndefined(legendElement)) {
@@ -11354,6 +11582,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11354
11582
  var shapeIndex;
11355
11583
  var layerIndex;
11356
11584
  var dataIndex;
11585
+ var pointIndex;
11357
11586
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11358
11587
  var collection = this.maps.legendModule.legendCollection;
11359
11588
  var legend = this.maps.legendSettings;
@@ -11366,15 +11595,23 @@ var Legend = /** @__PURE__ @class */ (function () {
11366
11595
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11367
11596
  var currentElement = { Elements: [] };
11368
11597
  for (var j = 0; j < data.length; j++) {
11598
+ var shapeElement = void 0;
11369
11599
  shapeIndex = data[j]['shapeIndex'];
11370
11600
  layerIndex = data[j]['layerIndex'];
11371
11601
  dataIndex = data[j]['dataIndex'];
11372
- var shapeEle = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11373
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11374
- if (targetElement === shapeEle) {
11602
+ pointIndex = data[j]['pointIndex'];
11603
+ if (pointIndex === -1) {
11604
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11605
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11606
+ }
11607
+ else {
11608
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11609
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11610
+ }
11611
+ if (targetElement === shapeElement) {
11375
11612
  process = true;
11376
11613
  }
11377
- elements.push(shapeEle);
11614
+ elements.push(shapeElement);
11378
11615
  }
11379
11616
  if (process) {
11380
11617
  if (isNullOrUndefined(currentElement['LegendEle'])) {
@@ -11392,16 +11629,25 @@ var Legend = /** @__PURE__ @class */ (function () {
11392
11629
  var shapeIndex;
11393
11630
  var layerIndex;
11394
11631
  var dataIndex;
11632
+ var pointIndex;
11395
11633
  var idIndex = parseFloat(targetElement.id.charAt(targetElement.id.length - 1));
11396
11634
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11397
11635
  var data = this.maps.legendModule.legendCollection[idIndex]['data'];
11398
11636
  var legendShapeElements = [];
11399
11637
  for (var i = 0; i < data.length; i++) {
11638
+ var shapeElement = void 0;
11400
11639
  shapeIndex = data[i]['shapeIndex'];
11401
11640
  layerIndex = data[i]['layerIndex'];
11402
11641
  dataIndex = data[i]['dataIndex'];
11403
- var shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11404
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11642
+ pointIndex = data[i]['pointIndex'];
11643
+ if (pointIndex === -1) {
11644
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11645
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11646
+ }
11647
+ else {
11648
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11649
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11650
+ }
11405
11651
  if (!isNullOrUndefined(shapeElement)) {
11406
11652
  legendShapeElements.push(shapeElement.id);
11407
11653
  }
@@ -11469,9 +11715,11 @@ var Legend = /** @__PURE__ @class */ (function () {
11469
11715
  var renderOptions = new RectOption(map.element.id + '_Legend_Border', legend.background, legendBorder, 1, this.legendBorderRect, null, null, '', '');
11470
11716
  this.legendGroup.appendChild(map.renderer.drawRectangle(renderOptions));
11471
11717
  this.getLegendAlignment(map, this.legendBorderRect.width, this.legendBorderRect.height, legend);
11472
- this.legendGroup.setAttribute('transform', 'translate( ' + (this.translate.x + (-(this.legendBorderRect.x))) + ' ' +
11718
+ this.legendGroup.setAttribute('transform', 'translate( ' + (this.translate.x + (-this.legendBorderRect.x)) + ' ' +
11473
11719
  (this.translate.y + (-(this.legendBorderRect.y))) + ' )');
11474
- map.svgObject.appendChild(this.legendGroup);
11720
+ if (legend.position !== 'Float') {
11721
+ map.svgObject.appendChild(this.legendGroup);
11722
+ }
11475
11723
  if (legendTitle) {
11476
11724
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
11477
11725
  textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
@@ -11483,7 +11731,16 @@ var Legend = /** @__PURE__ @class */ (function () {
11483
11731
  this.currentPage = (e.target.id.indexOf('_Left_Page_') > -1) ? (this.currentPage - 1) :
11484
11732
  (this.currentPage + 1);
11485
11733
  this.legendGroup = this.maps.renderer.createGroup({ id: this.maps.element.id + '_Legend_Group' });
11734
+ this.maps.mapAreaRect = this.initialMapAreaRect;
11486
11735
  this.drawLegendItem(this.currentPage);
11736
+ if (!isNullOrUndefined(this.maps.legendModule) && this.maps.legendSettings.position === 'Float') {
11737
+ if (this.maps.isTileMap) {
11738
+ this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.legendModule.legendGroup);
11739
+ }
11740
+ else {
11741
+ this.maps.svgObject.appendChild(this.maps.legendModule.legendGroup);
11742
+ }
11743
+ }
11487
11744
  if (querySelector(this.maps.element.id + '_Legend_Border', this.maps.element.id)) {
11488
11745
  querySelector(this.maps.element.id + '_Legend_Border', this.maps.element.id).style.pointerEvents = 'none';
11489
11746
  }
@@ -11501,53 +11758,60 @@ var Legend = /** @__PURE__ @class */ (function () {
11501
11758
  var areaWidth = totalRect.width;
11502
11759
  var totalWidth = map.availableSize.width;
11503
11760
  var totalHeight = map.availableSize.height;
11761
+ var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
11762
+ var locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
11504
11763
  if (legend.position === 'Float') {
11505
- this.translate = legend.location;
11764
+ this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) : new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
11765
+ this.legendTotalRect = map.mapAreaRect;
11506
11766
  }
11507
11767
  else {
11508
11768
  switch (legend.position) {
11509
11769
  case 'Top':
11510
11770
  case 'Bottom':
11511
- totalRect.height = (areaHeight - height);
11771
+ totalRect.height = (legend.position === 'Top') ? (areaHeight - height) : (areaHeight - height - (spacing * 2));
11512
11772
  x = (totalWidth / 2) - (width / 2);
11513
11773
  y = (legend.position === 'Top') ? areaY : (areaY + totalRect.height);
11514
- totalRect.y = (legend.position === 'Top') ? areaY + height + spacing : areaY;
11774
+ totalRect.y = (legend.position === 'Top') ? areaY + height + (map.isTileMap ? (spacing / 2) : spacing) : areaY - (spacing / 2);
11515
11775
  break;
11516
11776
  case 'Left':
11517
11777
  case 'Right':
11518
- totalRect.width = (areaWidth - width);
11519
- x = (legend.position === 'Left') ? areaX : (areaX + totalRect.width) - spacing;
11778
+ totalRect.width = (areaWidth - width - map.mapAreaRect.x);
11779
+ x = (legend.position === 'Left') ? areaX + (spacing / 2) : (areaX + totalRect.width + spacing);
11520
11780
  y = (totalHeight / 2) - (height / 2);
11521
- totalRect.x = (legend.position === 'Left') ? areaX + width : areaX;
11781
+ totalRect.x = (legend.position === 'Left') ? areaX + width + spacing : areaX;
11522
11782
  break;
11523
11783
  }
11524
11784
  switch (legend.alignment) {
11525
11785
  case 'Near':
11526
11786
  if (legend.position === 'Top' || legend.position === 'Bottom') {
11527
- x = totalRect.x;
11787
+ x = totalRect.x - (legend.mode === 'Interactive' ? spacing : 0);
11528
11788
  }
11529
11789
  else {
11530
- y = totalRect.y;
11790
+ y = totalRect.y - (!(legend.height && legend.width) && legend.mode === 'Interactive' ? map.mapAreaRect.x : 0);
11531
11791
  }
11532
11792
  break;
11533
11793
  case 'Far':
11534
11794
  if (legend.position === 'Top' || legend.position === 'Bottom') {
11535
- x = (totalWidth - width) - spacing;
11795
+ x = (totalWidth - width) - (legend.mode === 'Interactive' ? 0 : spacing);
11536
11796
  }
11537
11797
  else {
11538
- y = totalHeight - height;
11798
+ y = totalHeight - height - (legend.mode === 'Default' ? spacing : 0);
11539
11799
  }
11540
11800
  break;
11541
11801
  }
11542
11802
  if ((legend.height || legend.width) && legend.mode !== 'Interactive') {
11543
- this.legendTotalRect = map.totalRect = totalRect;
11803
+ this.legendTotalRect = map.mapAreaRect = map.totalRect = totalRect;
11544
11804
  }
11545
11805
  else {
11806
+ map.totalRect = null;
11546
11807
  if ((legend.height || legend.width) && legend.mode === 'Interactive') {
11547
11808
  map.totalRect = totalRect;
11548
11809
  }
11549
11810
  this.legendTotalRect = map.mapAreaRect = totalRect;
11550
11811
  }
11812
+ if (legend.position === 'Left') {
11813
+ map.mapAreaRect.width = totalRect.width;
11814
+ }
11551
11815
  this.translate = new Point(x, y);
11552
11816
  }
11553
11817
  };
@@ -11676,6 +11940,13 @@ var Legend = /** @__PURE__ @class */ (function () {
11676
11940
  borderColor: legend.shapeBorder.color, borderWidth: legend.shapeBorder.width
11677
11941
  });
11678
11942
  }
11943
+ else {
11944
+ for (var i = 0; i < this.legendCollection.length; i++) {
11945
+ if (this.legendCollection[i]['text'] === legendText && this.legendCollection[i]['fill'] === legendFill) {
11946
+ this.legendCollection[i].data.push(newColllection[0]);
11947
+ }
11948
+ }
11949
+ }
11679
11950
  }
11680
11951
  };
11681
11952
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -11877,15 +12148,16 @@ var Legend = /** @__PURE__ @class */ (function () {
11877
12148
  var width = 10;
11878
12149
  var direction = (legend.orientation === 'None') ? (legend.position === 'Top' || legend.position === 'Bottom')
11879
12150
  ? 'Horizontal' : 'Vertical' : legend.orientation;
12151
+ rect.y = legend.position === 'Float' && this.maps.isTileMap ? rect.y - this.maps.mapAreaRect.y : rect.y;
11880
12152
  if (direction === 'Horizontal') {
11881
12153
  if (!legend.invertedPointer) {
11882
- locX = rect.x + (rect.width / 2);
12154
+ locX = rect.x + (rect.width / 2) - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11883
12155
  locY = rect.y;
11884
12156
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY - height) +
11885
12157
  ' L ' + (locX + width) + ' ' + (locY - height) + ' Z ';
11886
12158
  }
11887
12159
  else {
11888
- locX = rect.x + (rect.width / 2);
12160
+ locX = rect.x + (rect.width / 2) - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11889
12161
  locY = rect.y + (rect.height);
11890
12162
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY + height) +
11891
12163
  ' L ' + (locX + width) + ' ' + (locY + height) + ' Z ';
@@ -11893,20 +12165,25 @@ var Legend = /** @__PURE__ @class */ (function () {
11893
12165
  }
11894
12166
  else {
11895
12167
  if (!legend.invertedPointer) {
11896
- locX = rect.x + (rect.width);
12168
+ locX = rect.x + rect.width - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11897
12169
  locY = rect.y + (rect.height / 2);
11898
12170
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX + width) + ' ' + (locY - height) +
11899
12171
  ' L ' + (locX + width) + ' ' + (locY + height) + ' z ';
11900
12172
  }
11901
12173
  else {
11902
- locX = rect.x;
12174
+ locX = rect.x - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11903
12175
  locY = rect.y + (rect.height / 2);
11904
12176
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY - height) +
11905
12177
  ' L ' + (locX - width) + ' ' + (locY + height) + ' z ';
11906
12178
  }
11907
12179
  }
11908
12180
  var pathOptions = new PathOption(id, fill, strokeWidth, stroke, 1, 1, '', path);
11909
- this.maps.svgObject.appendChild(this.maps.renderer.drawPath(pathOptions));
12181
+ if (legend.position === 'Float' && this.maps.isTileMap) {
12182
+ this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(pathOptions));
12183
+ }
12184
+ else {
12185
+ this.maps.svgObject.appendChild(this.maps.renderer.drawPath(pathOptions));
12186
+ }
11910
12187
  };
11911
12188
  Legend.prototype.wireEvents = function (element) {
11912
12189
  EventHandler.add(element, Browser.touchStartEvent, this.changeNextPage, this);
@@ -12267,10 +12544,20 @@ var Legend = /** @__PURE__ @class */ (function () {
12267
12544
  var shapeDataValueCase = !isNullOrUndefined(shapeData['properties'][shapePath])
12268
12545
  && isNaN(shapeData['properties'][shapePath]) ? shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12269
12546
  if (shapeDataValueCase === dataPathValueCase) {
12270
- legendData.push({
12271
- layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12272
- name: data[dataPath], value: value
12273
- });
12547
+ if (shapeData['geometry']['type'] != 'MultiPoint') {
12548
+ legendData.push({
12549
+ layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12550
+ name: data[dataPath], value: value, pointIndex: -1
12551
+ });
12552
+ }
12553
+ else {
12554
+ for (var j = 0; j < shapeData['geometry'].coordinates.length; j++) {
12555
+ legendData.push({
12556
+ layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12557
+ name: data[dataPath], value: value, pointIndex: j
12558
+ });
12559
+ }
12560
+ }
12274
12561
  }
12275
12562
  }
12276
12563
  }
@@ -12382,7 +12669,8 @@ var Highlight = /** @__PURE__ @class */ (function () {
12382
12669
  targetEle.getAttribute('class') !== 'ShapeselectionMapStyle' && !isTouch &&
12383
12670
  targetEle.getAttribute('class') !== 'MarkerselectionMapStyle' &&
12384
12671
  targetEle.getAttribute('class') !== 'BubbleselectionMapStyle' &&
12385
- targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle') {
12672
+ targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle' &&
12673
+ targetEle.getAttribute('class') !== 'LineselectionMapStyle') {
12386
12674
  layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
12387
12675
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12388
12676
  var shapeData = void 0;
@@ -12392,8 +12680,9 @@ var Highlight = /** @__PURE__ @class */ (function () {
12392
12680
  var dataIndex = void 0;
12393
12681
  if (targetEle.id.indexOf('shapeIndex') > -1) {
12394
12682
  shapeIn = parseInt(targetEle.id.split('_shapeIndex_')[1].split('_')[0], 10);
12395
- shapeData = this.maps.layers[layerIndex].shapeData['features'] ?
12396
- this.maps.layers[layerIndex].shapeData['features'][shapeIn]['properties'] : null;
12683
+ shapeData = this.maps.layers[layerIndex].shapeData['features'] &&
12684
+ !isNullOrUndefined(this.maps.layersCollection[layerIndex].layerData[shapeIn]) ?
12685
+ this.maps.layersCollection[layerIndex].layerData[shapeIn]['property'] : null;
12397
12686
  dataIndex = parseInt(targetEle.id.split('_dataIndex_')[1].split('_')[0], 10);
12398
12687
  data = isNullOrUndefined(dataIndex) ? null : this.maps.layers[layerIndex].dataSource[dataIndex];
12399
12688
  this.highlightSettings = this.maps.layers[layerIndex].highlightSettings;
@@ -12465,7 +12754,8 @@ var Highlight = /** @__PURE__ @class */ (function () {
12465
12754
  */
12466
12755
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12467
12756
  Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
12468
- if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule) {
12757
+ if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule
12758
+ && this.maps.legendSettings.type === 'Layers') {
12469
12759
  this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.highlightSettings, 'highlight', layerIndex);
12470
12760
  }
12471
12761
  var selectHighLight = targetElement.id.indexOf('shapeIndex') > -1 && (this.maps.legendSettings.visible && this.maps.legendModule) ?
@@ -12484,7 +12774,7 @@ var Highlight = /** @__PURE__ @class */ (function () {
12484
12774
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
12485
12775
  }
12486
12776
  var border = {
12487
- color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
12777
+ color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color),
12488
12778
  width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
12489
12779
  opacity: this.highlightSettings.border.opacity
12490
12780
  };
@@ -12569,7 +12859,6 @@ var Selection = /** @__PURE__ @class */ (function () {
12569
12859
  Selection.prototype.addEventListener = function () {
12570
12860
  if (!this.maps.isDestroyed) {
12571
12861
  this.maps.on(click, this.mouseClick, this);
12572
- this.maps.on(Browser.touchEndEvent, this.mouseClick, this);
12573
12862
  }
12574
12863
  };
12575
12864
  /**
@@ -12582,7 +12871,6 @@ var Selection = /** @__PURE__ @class */ (function () {
12582
12871
  return;
12583
12872
  }
12584
12873
  this.maps.off(click, this.mouseClick);
12585
- this.maps.off(Browser.touchEndEvent, this.mouseClick);
12586
12874
  };
12587
12875
  Selection.prototype.mouseClick = function (targetElement) {
12588
12876
  if (!isNullOrUndefined(targetElement['type']) && targetElement['type'].indexOf('touch') !== -1 &&
@@ -12600,8 +12888,12 @@ var Selection = /** @__PURE__ @class */ (function () {
12600
12888
  var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12601
12889
  if (targetElement.id.indexOf('shapeIndex') > -1) {
12602
12890
  shapeIndex = parseInt(targetElement.id.split('_shapeIndex_')[1].split('_')[0], 10);
12603
- shapeData = this.maps.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
12604
- this.maps.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
12891
+ shapeData = !isNullOrUndefined(this.maps.layers[layerIndex].shapeData['features'])
12892
+ && this.maps.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
12893
+ this.maps.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] :
12894
+ !isNullOrUndefined(this.maps.layers[layerIndex].shapeData['geometries'])
12895
+ && this.maps.layers[layerIndex].shapeData['geometries']['length'] > shapeIndex ?
12896
+ this.maps.layers[layerIndex].shapeData['geometries'][shapeIndex]['properties'] : null;
12605
12897
  dataIndex = parseInt(targetElement.id.split('_dataIndex_')[1].split('_')[0], 10);
12606
12898
  data = isNullOrUndefined(dataIndex) ? null : this.maps.layers[layerIndex].dataSource[dataIndex];
12607
12899
  this.selectionsettings = this.maps.layers[layerIndex].selectionSettings;
@@ -12682,15 +12974,17 @@ var Selection = /** @__PURE__ @class */ (function () {
12682
12974
  Selection.prototype.selectMap = function (targetElement, shapeData, data) {
12683
12975
  var _this = this;
12684
12976
  var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12977
+ var isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
12685
12978
  var selectionsettings = this.selectionsettings;
12686
12979
  var border = {
12687
- color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
12688
- 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),
12980
+ color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) : this.selectionsettings.border.color,
12981
+ width: isLineStringShape ? (this.selectionsettings.border.width / this.maps.scale) :
12982
+ (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)),
12689
12983
  opacity: this.selectionsettings.border.opacity
12690
12984
  };
12691
12985
  var eventArgs = {
12692
12986
  opacity: this.selectionsettings.opacity,
12693
- fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
12987
+ fill: isLineStringShape ? 'transparent' : (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none'),
12694
12988
  border: border,
12695
12989
  name: itemSelection,
12696
12990
  target: targetElement.id,
@@ -12702,7 +12996,8 @@ var Selection = /** @__PURE__ @class */ (function () {
12702
12996
  this.maps.trigger('itemSelection', eventArgs, function (observedArgs) {
12703
12997
  eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ? _this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
12704
12998
  if (!eventArgs.cancel) {
12705
- if (targetElement.getAttribute('class') === _this.selectionType + 'selectionMapStyle') {
12999
+ if (targetElement.getAttribute('class') === _this.selectionType + 'selectionMapStyle'
13000
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle') {
12706
13001
  removeClass(targetElement);
12707
13002
  _this.removedSelectionList(targetElement);
12708
13003
  for (var m = 0; m < _this.maps.shapeSelectionItem.length; m++) {
@@ -12721,7 +13016,8 @@ var Selection = /** @__PURE__ @class */ (function () {
12721
13016
  else {
12722
13017
  var layetElement = getElementByID(_this.maps.element.id + '_Layer_Collections');
12723
13018
  if (!_this.selectionsettings.enableMultiSelect &&
12724
- layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length > 0) {
13019
+ (layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length > 0 ||
13020
+ layetElement.getElementsByClassName('LineselectionMapStyle').length > 0)) {
12725
13021
  var eleCount = layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length;
12726
13022
  var ele = void 0;
12727
13023
  for (var k = 0; k < eleCount; k++) {
@@ -12729,6 +13025,14 @@ var Selection = /** @__PURE__ @class */ (function () {
12729
13025
  removeClass(ele);
12730
13026
  _this.removedSelectionList(ele);
12731
13027
  }
13028
+ if (layetElement.getElementsByClassName('LineselectionMapStyle').length > 0) {
13029
+ eleCount = layetElement.getElementsByClassName('LineselectionMapStyle').length;
13030
+ for (var k = 0; k < eleCount; k++) {
13031
+ ele = layetElement.getElementsByClassName('LineselectionMapStyle')[0];
13032
+ removeClass(ele);
13033
+ _this.removedSelectionList(ele);
13034
+ }
13035
+ }
12732
13036
  if (_this.selectionType === 'Shape') {
12733
13037
  _this.maps.shapeSelectionItem = [];
12734
13038
  var selectionLength = _this.maps.selectedElementId.length;
@@ -12746,13 +13050,24 @@ var Selection = /** @__PURE__ @class */ (function () {
12746
13050
  ele.setAttribute('stroke', _this.maps.layers[layerIndex_2].navigationLineSettings[index].color);
12747
13051
  }
12748
13052
  }
12749
- if (!getElement(_this.selectionType + 'selectionMap')) {
12750
- document.body.appendChild(createStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs));
13053
+ if (!isLineStringShape) {
13054
+ if (!getElement(_this.selectionType + 'selectionMap')) {
13055
+ document.body.appendChild(createStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs));
13056
+ }
13057
+ else {
13058
+ customizeStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs);
13059
+ }
13060
+ targetElement.setAttribute('class', _this.selectionType + 'selectionMapStyle');
12751
13061
  }
12752
13062
  else {
12753
- customizeStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs);
13063
+ if (!getElement('LineselectionMap')) {
13064
+ document.body.appendChild(createStyle('LineselectionMap', 'LineselectionMapStyle', eventArgs));
13065
+ }
13066
+ else {
13067
+ customizeStyle('LineselectionMap', 'LineselectionMapStyle', eventArgs);
13068
+ }
13069
+ targetElement.setAttribute('class', 'LineselectionMapStyle');
12754
13070
  }
12755
- targetElement.setAttribute('class', _this.selectionType + 'selectionMapStyle');
12756
13071
  if (targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
12757
13072
  _this.maps.shapeSelectionClass = getElement(_this.selectionType + 'selectionMap');
12758
13073
  _this.maps.selectedElementId.push(targetElement.getAttribute('id'));
@@ -13014,7 +13329,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13014
13329
  options: tooltipOption,
13015
13330
  fill: option.fill,
13016
13331
  maps: this.maps,
13017
- element: target, eventArgs: e
13332
+ element: target, eventArgs: e, content: !isNullOrUndefined(currentData) ? currentData.toString() : ''
13018
13333
  };
13019
13334
  this.maps.trigger(tooltipRender, tooltipArgs, function (args) {
13020
13335
  if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
@@ -13032,7 +13347,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13032
13347
  header: '',
13033
13348
  data: option['data'],
13034
13349
  template: option['template'],
13035
- content: [currentData.toString()],
13350
+ content: tooltipArgs.content.toString() != currentData.toString() ? [tooltipArgs.content.toString()] : [currentData.toString()],
13036
13351
  shapes: [],
13037
13352
  location: option['location'],
13038
13353
  palette: [markerFill],
@@ -13048,7 +13363,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13048
13363
  header: '',
13049
13364
  data: tooltipArgs.options['data'],
13050
13365
  template: tooltipArgs.options['template'],
13051
- content: [currentData.toString()],
13366
+ content: tooltipArgs.content.toString() != currentData.toString() ? [tooltipArgs.content.toString()] : [currentData.toString()],
13052
13367
  shapes: [],
13053
13368
  location: tooltipArgs.options['location'],
13054
13369
  palette: [markerFill],
@@ -13234,8 +13549,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
13234
13549
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13235
13550
  this.startTouches = [];
13236
13551
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13237
- this.shapeZoomLocation = [];
13238
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13239
13552
  this.intersect = [];
13240
13553
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13241
13554
  this.mouseDownLatLong = { x: 0, y: 0 };
@@ -13275,7 +13588,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
13275
13588
  var minZoom = map.zoomSettings.minZoom;
13276
13589
  newZoomFactor = (minZoom > newZoomFactor && type === 'ZoomIn') ? minZoom + 1 : newZoomFactor;
13277
13590
  var prevTilePoint = map.tileTranslatePoint;
13278
- if ((!map.isTileMap) && (type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)) {
13591
+ if ((!map.isTileMap) && ((type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)
13592
+ || map.isReset)) {
13279
13593
  var availSize = map.mapAreaRect;
13280
13594
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13281
13595
  var minBounds = map.baseMapRectBounds['min'];
@@ -13283,17 +13597,29 @@ var Zoom = /** @__PURE__ @class */ (function () {
13283
13597
  var maxBounds = map.baseMapRectBounds['max'];
13284
13598
  var mapTotalWidth = Math.abs(minBounds['x'] - maxBounds['x']);
13285
13599
  var mapTotalHeight = Math.abs(minBounds['y'] - maxBounds['y']);
13286
- var point = map.translatePoint;
13287
- var translatePointX = point.x - (((availSize.width / scale) - (availSize.width / newZoomFactor)) / (availSize.width / position.x));
13288
- var translatePointY = point.y - (((availSize.height / scale) - (availSize.height / newZoomFactor)) / (availSize.height / position.y));
13289
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * newZoomFactor;
13290
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13291
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13292
- map.translatePoint = new Point(translatePointX, translatePointY);
13600
+ var translatePointX = void 0;
13601
+ var translatePointY = void 0;
13602
+ if (newZoomFactor < 1.2 && map.projectionType !== 'Eckert5') {
13603
+ if (mapTotalWidth === 0 || mapTotalHeight === 0 || mapTotalWidth === mapTotalHeight) {
13604
+ mapTotalWidth = availSize.width / 2;
13605
+ mapTotalHeight = availSize.height;
13606
+ }
13607
+ newZoomFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13608
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13609
+ }
13610
+ else {
13611
+ var point = map.translatePoint;
13612
+ translatePointX = point.x - (((availSize.width / scale) - (availSize.width / newZoomFactor)) / (availSize.width / position.x));
13613
+ translatePointY = point.y - (((availSize.height / scale) - (availSize.height / newZoomFactor)) / (availSize.height / position.y));
13614
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * newZoomFactor;
13615
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13616
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13617
+ map.translatePoint = new Point(translatePointX, translatePointY);
13618
+ }
13293
13619
  map.scale = newZoomFactor;
13294
13620
  if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
13295
13621
  map.translatePoint = map.previousPoint;
13296
- map.scale = map.previousScale;
13622
+ map.scale = map.mapScaleValue = map.previousScale;
13297
13623
  }
13298
13624
  else {
13299
13625
  this.applyTransform();
@@ -13349,6 +13675,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
13349
13675
  }
13350
13676
  this.maps.zoomNotApplied = false;
13351
13677
  };
13678
+ Zoom.prototype.calculateInitalZoomTranslatePoint = function (newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map) {
13679
+ mapTotalWidth *= newZoomFactor;
13680
+ mapTotalHeight *= newZoomFactor;
13681
+ var widthDiff = minBounds['x'] !== 0 && map.translateType === 'layers' ? map.availableSize.width - availSize.width : 0;
13682
+ var translatePointX = availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2))) - widthDiff;
13683
+ var translatePointY = availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)));
13684
+ return new Point(translatePointX, translatePointY);
13685
+ };
13352
13686
  Zoom.prototype.triggerZoomEvent = function (prevTilePoint, prevLevel, type) {
13353
13687
  var map = this.maps;
13354
13688
  var zoomArgs;
@@ -13475,12 +13809,24 @@ var Zoom = /** @__PURE__ @class */ (function () {
13475
13809
  var mapTotalHeight = Math.abs(minBounds['y'] - maxBounds['y']);
13476
13810
  var mapTotalWidth = Math.abs(minBounds['x'] - maxBounds['x']);
13477
13811
  var translatePoint = map.translatePoint;
13478
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomCalculationFactor;
13479
- var translatePointX = translatePoint.x - (((availSize.width / map.scale) - (availSize.width / zoomCalculationFactor)) / (availSize.width / touchCenter.x));
13480
- var translatePointY = translatePoint.y - (((availSize.height / map.scale) - (availSize.height / zoomCalculationFactor)) / (availSize.height / touchCenter.y));
13481
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13482
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13483
- map.translatePoint = new Point(translatePointX, translatePointY);
13812
+ var translatePointX = void 0;
13813
+ var translatePointY = void 0;
13814
+ if (zoomCalculationFactor < 1.2 && map.projectionType !== 'Eckert5') {
13815
+ if (mapTotalWidth === 0 || mapTotalHeight === 0 || mapTotalWidth === mapTotalHeight) {
13816
+ mapTotalWidth = availSize.width / 2;
13817
+ mapTotalHeight = availSize.height;
13818
+ }
13819
+ zoomCalculationFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13820
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomCalculationFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13821
+ }
13822
+ else {
13823
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomCalculationFactor;
13824
+ translatePointX = translatePoint.x - (((availSize.width / map.scale) - (availSize.width / zoomCalculationFactor)) / (availSize.width / touchCenter.x));
13825
+ translatePointY = translatePoint.y - (((availSize.height / map.scale) - (availSize.height / zoomCalculationFactor)) / (availSize.height / touchCenter.y));
13826
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13827
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13828
+ map.translatePoint = new Point(translatePointX, translatePointY);
13829
+ }
13484
13830
  map.scale = zoomCalculationFactor;
13485
13831
  isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13486
13832
  if (isZoomCancelled) {
@@ -13583,17 +13929,16 @@ var Zoom = /** @__PURE__ @class */ (function () {
13583
13929
  if (this.maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
13584
13930
  currentEle.remove();
13585
13931
  if (layerElement.children.length > 0 && layerElement.children[0]) {
13586
- layerElement.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index), layerElement.children[0]);
13932
+ layerElement.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index), layerElement.children[1]);
13587
13933
  }
13588
13934
  else {
13589
13935
  layerElement.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index));
13590
13936
  }
13591
13937
  }
13592
- else {
13938
+ else if (currentEle.id.indexOf('Legend') == -1) {
13593
13939
  changeBorderWidth(currentEle, this.index, scale, this.maps);
13594
13940
  this.maps.zoomTranslatePoint = this.maps.translatePoint;
13595
13941
  this.animateTransform(currentEle, animate$$1, x, y, scale);
13596
- this.shapeZoomLocation = currentEle.childNodes;
13597
13942
  }
13598
13943
  }
13599
13944
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
@@ -13693,16 +14038,17 @@ var Zoom = /** @__PURE__ @class */ (function () {
13693
14038
  }
13694
14039
  }
13695
14040
  }
13696
- else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1) {
14041
+ else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(this.maps.layers[this.index])) {
13697
14042
  this.intersect = [];
13698
14043
  this.maps.zoomLabelPositions = [];
13699
14044
  this.maps.zoomLabelPositions = this.maps.dataLabelModule.dataLabelCollections;
14045
+ var labelAnimate = !this.maps.isTileMap && animate$$1;
13700
14046
  for (var k = 0; k < currentEle.childElementCount; k++) {
13701
14047
  if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
13702
14048
  var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
13703
- this.zoomshapewidth = this.shapeZoomLocation[labelIndex].getBoundingClientRect();
14049
+ this.zoomshapewidth = currentEle.childNodes[k].getBoundingClientRect();
13704
14050
  this.maps.zoomShapeCollection.push(this.zoomshapewidth);
13705
- this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', animate$$1);
14051
+ this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', labelAnimate);
13706
14052
  var dataLabel = this.maps.layers[this.index].dataLabelSettings;
13707
14053
  var border = dataLabel.border;
13708
14054
  if (k > 0 && border['width'] > 1) {
@@ -13919,7 +14265,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13919
14265
  }
13920
14266
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Hide') {
13921
14267
  if (scale > 1) {
13922
- text = (this.zoomshapewidth['width'] >= zoomtextSize['width']) ? zoomtext : '';
14268
+ text = ((this.maps.dataLabelShape[l] * scale) >= zoomtextSize['width']) ? zoomtext : '';
13923
14269
  element.innerHTML = text;
13924
14270
  }
13925
14271
  else {
@@ -13929,7 +14275,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13929
14275
  }
13930
14276
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Trim') {
13931
14277
  if (scale > 1) {
13932
- zoomtrimLabel = textTrim(this.zoomshapewidth['width'], zoomtext, style);
14278
+ zoomtrimLabel = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
13933
14279
  text = zoomtrimLabel;
13934
14280
  element.innerHTML = text;
13935
14281
  }
@@ -13967,7 +14313,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13967
14313
  || textLocations['heightTop'] > this.intersect[j]['heightBottom']) {
13968
14314
  trimmedLable = !isNullOrUndefined(text) ? text : zoomtext;
13969
14315
  if (scale > 1) {
13970
- trimmedLable = textTrim(this.zoomshapewidth['width'], trimmedLable, style);
14316
+ trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), trimmedLable, style);
13971
14317
  }
13972
14318
  element.innerHTML = trimmedLable;
13973
14319
  }
@@ -13993,11 +14339,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
13993
14339
  }
13994
14340
  this.intersect.push(textLocations);
13995
14341
  if (isNullOrUndefined(trimmedLable)) {
13996
- trimmedLable = textTrim(this.zoomshapewidth['width'], zoomtext, style);
14342
+ trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
13997
14343
  element.innerHTML = trimmedLable;
13998
14344
  }
13999
14345
  }
14000
- else {
14346
+ if (animate$$1 || duration > 0) {
14001
14347
  smoothTranslate(element, 0, duration, new MapLocation(labelX, labelY));
14002
14348
  }
14003
14349
  }
@@ -14119,7 +14465,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14119
14465
  var layerRect = getElementByID(map.element.id + '_Layer_Collections').getBoundingClientRect();
14120
14466
  var elementRect = getElementByID(map.element.id + '_svg').getBoundingClientRect();
14121
14467
  var panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
14122
- ((layerRect.left + layerRect.width) >= (elementRect.left + elementRect.width) + map.mapAreaRect.x + map.margin.left)));
14468
+ ((layerRect.left + layerRect.width + map.mapAreaRect.x) >= (elementRect.width))));
14123
14469
  var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
14124
14470
  ((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
14125
14471
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -14211,14 +14557,26 @@ var Zoom = /** @__PURE__ @class */ (function () {
14211
14557
  var max = map.baseMapRectBounds['max'];
14212
14558
  var mapWidth = Math.abs(max['x'] - min['x']);
14213
14559
  var mapHeight = Math.abs(min['y'] - max['y']);
14214
- var translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomFactor)) / 2);
14215
- var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomFactor)) / 2);
14216
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomFactor;
14217
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))))
14218
- : translatePointX;
14219
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2))))
14220
- : translatePointY;
14221
- map.translatePoint = new Point(translatePointX, translatePointY);
14560
+ var translatePointX = void 0;
14561
+ var translatePointY = void 0;
14562
+ if (zoomFactor < 1.2 && map.projectionType !== 'Eckert5') {
14563
+ if (mapHeight === 0 || mapWidth === 0 || mapHeight === mapWidth) {
14564
+ mapWidth = size.width / 2;
14565
+ mapHeight = size.height;
14566
+ }
14567
+ zoomFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
14568
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomFactor, mapWidth, mapHeight, size, min, map);
14569
+ }
14570
+ else {
14571
+ translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomFactor)) / 2);
14572
+ translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomFactor)) / 2);
14573
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomFactor;
14574
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))))
14575
+ : translatePointX;
14576
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2))))
14577
+ : translatePointY;
14578
+ map.translatePoint = new Point(translatePointX, translatePointY);
14579
+ }
14222
14580
  map.zoomTranslatePoint = map.translatePoint;
14223
14581
  map.scale = zoomFactor;
14224
14582
  if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
@@ -14268,6 +14626,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14268
14626
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
14269
14627
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
14270
14628
  }
14629
+ _this.maps.isAddLayer = false;
14271
14630
  }, animationDuration);
14272
14631
  }
14273
14632
  }
@@ -14533,7 +14892,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
14533
14892
  x = (size.width / 2) - (toolBarSize.width / 2);
14534
14893
  break;
14535
14894
  case 'Far':
14536
- x = (size.width - toolBarSize.width) - padding;
14895
+ if (!isNullOrUndefined(map.legendModule) && map.legendSettings.position === 'Left') {
14896
+ x = size.width + size.x - toolBarSize.width - padding;
14897
+ }
14898
+ else {
14899
+ x = (size.width - toolBarSize.width) - padding;
14900
+ }
14537
14901
  break;
14538
14902
  }
14539
14903
  var extraPosition = map.getExtraPosition();
@@ -14589,6 +14953,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14589
14953
  }
14590
14954
  else {
14591
14955
  map.mapScaleValue = value - delta;
14956
+ map.isReset = (map.mapScaleValue < 1) ? true : false;
14592
14957
  map.staticMapZoom = map.tileZoomLevel;
14593
14958
  if (map.mapScaleValue === 1) {
14594
14959
  map.markerCenterLatitude = null;
@@ -15317,5 +15682,5 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15317
15682
  * exporting all modules from maps index
15318
15683
  */
15319
15684
 
15320
- 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, 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 };
15685
+ 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 };
15321
15686
  //# sourceMappingURL=ej2-maps.es5.js.map