@syncfusion/ej2-maps 20.1.55 → 20.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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);
@@ -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)));
@@ -2895,6 +2901,7 @@ function changeBorderWidth(element, index, scale, maps) {
2895
2901
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2896
2902
  var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
2897
2903
  var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
2904
+ var circleRadius = maps.layersCollection[index].shapeSettings.circleRadius;
2898
2905
  if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
2899
2906
  value = checkShapeDataFields(
2900
2907
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2915,8 +2922,8 @@ function changeBorderWidth(element, index, scale, maps) {
2915
2922
  currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2916
2923
  }
2917
2924
  childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
2918
- if (element.id.indexOf('_LineString') > -1 && isNullOrUndefined(currentStroke)) {
2919
- childNode.setAttribute('stroke-width', (1 / scale).toString());
2925
+ if (element.id.indexOf('_Point') > -1 || element.id.indexOf('_MultiPoint') > -1) {
2926
+ childNode.setAttribute('r', (circleRadius / scale).toString());
2920
2927
  }
2921
2928
  }
2922
2929
  }
@@ -3583,6 +3590,7 @@ function getThemeStyle(theme) {
3583
3590
  backgroundColor: color,
3584
3591
  areaBackgroundColor: color,
3585
3592
  titleFontColor: '#FFFFFF',
3593
+ titleFontSize: '14px',
3586
3594
  subTitleFontColor: '#FFFFFF',
3587
3595
  legendTitleFontColor: '#DADADA',
3588
3596
  legendTextColor: '#DADADA',
@@ -3602,6 +3610,7 @@ function getThemeStyle(theme) {
3602
3610
  backgroundColor: '#000000',
3603
3611
  areaBackgroundColor: '#000000',
3604
3612
  titleFontColor: '#FFFFFF',
3613
+ titleFontSize: '14px',
3605
3614
  subTitleFontColor: '#FFFFFF',
3606
3615
  legendTitleFontColor: '#FFFFFF',
3607
3616
  legendTextColor: '#FFFFFF',
@@ -3782,6 +3791,7 @@ function getThemeStyle(theme) {
3782
3791
  backgroundColor: '#FFFFFF',
3783
3792
  areaBackgroundColor: '#FFFFFF',
3784
3793
  titleFontColor: '#424242',
3794
+ titleFontSize: '14px',
3785
3795
  subTitleFontColor: '#424242',
3786
3796
  legendTitleFontColor: '#757575',
3787
3797
  legendTextColor: '#757575',
@@ -4306,7 +4316,7 @@ var SubTitleSettings = /** @__PURE__ @class */ (function (_super) {
4306
4316
  return _super !== null && _super.apply(this, arguments) || this;
4307
4317
  }
4308
4318
  __decorate$1([
4309
- Complex({ size: Theme.mapsSubTitleFont.size, fontWeight: null }, Font)
4319
+ Complex({ size: null, fontWeight: null, fontFamily: null }, Font)
4310
4320
  ], SubTitleSettings.prototype, "textStyle", void 0);
4311
4321
  __decorate$1([
4312
4322
  Property('Center')
@@ -4322,7 +4332,7 @@ var TitleSettings = /** @__PURE__ @class */ (function (_super) {
4322
4332
  return _super !== null && _super.apply(this, arguments) || this;
4323
4333
  }
4324
4334
  __decorate$1([
4325
- Complex({ size: Theme.mapsTitleFont.size, fontWeight: null }, Font)
4335
+ Complex({ size: null, fontWeight: null, fontFamily: null }, Font)
4326
4336
  ], TitleSettings.prototype, "textStyle", void 0);
4327
4337
  __decorate$1([
4328
4338
  Property('Center')
@@ -4466,7 +4476,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
4466
4476
  Property('')
4467
4477
  ], LegendSettings.prototype, "height", void 0);
4468
4478
  __decorate$1([
4469
- Complex({}, Font)
4479
+ Complex({ fontFamily: null }, Font)
4470
4480
  ], LegendSettings.prototype, "textStyle", void 0);
4471
4481
  __decorate$1([
4472
4482
  Property(15)
@@ -4487,7 +4497,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
4487
4497
  Complex({}, CommonTitleSettings)
4488
4498
  ], LegendSettings.prototype, "title", void 0);
4489
4499
  __decorate$1([
4490
- Complex(Theme.legendTitleFont, Font)
4500
+ Complex({ size: Theme.legendTitleFont.size, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: Theme.legendTitleFont.fontWeight, fontFamily: null }, Font)
4491
4501
  ], LegendSettings.prototype, "titleStyle", void 0);
4492
4502
  __decorate$1([
4493
4503
  Property('Bottom')
@@ -4750,7 +4760,7 @@ var LayerSettings = /** @__PURE__ @class */ (function (_super) {
4750
4760
  Property('Geometry')
4751
4761
  ], LayerSettings.prototype, "layerType", void 0);
4752
4762
  __decorate$1([
4753
- Property('https://a.tile.openstreetmap.org/level/tileX/tileY.png')
4763
+ Property('')
4754
4764
  ], LayerSettings.prototype, "urlTemplate", void 0);
4755
4765
  __decorate$1([
4756
4766
  Property(true)
@@ -4921,11 +4931,12 @@ var Marker = /** @__PURE__ @class */ (function () {
4921
4931
  if (currentLayer.markerClusterSettings.allowClustering) {
4922
4932
  _this.maps.svgObject.appendChild(_this.markerSVGObject);
4923
4933
  _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);
4934
+ if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
4935
+ && _this.maps.zoomSettings.enable) {
4936
+ layerElement.appendChild(_this.markerSVGObject);
4926
4937
  }
4927
4938
  else {
4928
- layerElement.appendChild(_this.markerSVGObject);
4939
+ clusterTemplate(currentLayer, _this.markerSVGObject, _this.maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
4929
4940
  }
4930
4941
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4931
4942
  _this.maps.renderReactTemplates();
@@ -5477,9 +5488,14 @@ var BingMap = /** @__PURE__ @class */ (function () {
5477
5488
  }
5478
5489
  quadKey = quadKey + '' + digit;
5479
5490
  }
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;
5491
+ if (!isNullOrUndefined(subDomains)) {
5492
+ var subDomain = subDomains[Math.min(parseInt(quadKey.substr(quadKey.length - 1, 1), 10), subDomains.length)];
5493
+ imageUrl = imageUrl.replace('{quadkey}', quadKey).replace('{subdomain}', subDomain);
5494
+ return imageUrl += '&mkt=' + language + '&ur=IN&Key=' + key;
5495
+ }
5496
+ else {
5497
+ return '';
5498
+ }
5483
5499
  };
5484
5500
  return BingMap;
5485
5501
  }());
@@ -5752,8 +5768,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5752
5768
  else {
5753
5769
  this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption(this.mapObject.element.id + '_MapArea_ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
5754
5770
  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
5771
+ width: areaRect.width, height: areaRect.height
5757
5772
  }));
5758
5773
  }
5759
5774
  this.layerGroup.appendChild(this.clipRectElement);
@@ -5764,6 +5779,14 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5764
5779
  _this.currentLayer = layer;
5765
5780
  _this.processLayers(layer, index);
5766
5781
  });
5782
+ if (!isNullOrUndefined(this.mapObject.legendModule) && this.mapObject.legendSettings.position === 'Float') {
5783
+ if (this.mapObject.isTileMap) {
5784
+ this.layerGroup.appendChild(this.mapObject.legendModule.legendGroup);
5785
+ }
5786
+ else {
5787
+ this.mapObject.svgObject.appendChild(this.mapObject.legendModule.legendGroup);
5788
+ }
5789
+ }
5767
5790
  };
5768
5791
  /**
5769
5792
  * Tile rendering
@@ -5923,9 +5946,21 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5923
5946
  };
5924
5947
  this.mapObject.trigger('layerRendering', eventArgs, function (observedArgs) {
5925
5948
  if (!eventArgs.cancel && eventArgs.visible) {
5926
- if (layer.layerType !== 'Geometry') {
5949
+ if (layer.layerType === 'OSM') {
5950
+ layer.urlTemplate = 'https://a.tile.openstreetmap.org/level/tileX/tileY.png';
5951
+ }
5952
+ if (layer.layerType === 'Google') {
5953
+ layer.urlTemplate = 'https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level';
5954
+ }
5955
+ if (layer.layerType !== 'Geometry' || (isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
5927
5956
  if (layer.layerType !== 'Bing' || _this.bing) {
5928
- _this.renderTileLayer(_this, layer, layerIndex);
5957
+ if (!isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate.indexOf('quadkey') > -1) {
5958
+ var bing = new BingMap(_this.mapObject);
5959
+ _this.bingMapCalculation(layer, layerIndex, _this, bing);
5960
+ }
5961
+ else {
5962
+ _this.renderTileLayer(_this, layer, layerIndex);
5963
+ }
5929
5964
  }
5930
5965
  else if (layer.key && layer.key.length > 1) {
5931
5966
  // eslint-disable-next-line @typescript-eslint/no-this-alias
@@ -5994,6 +6029,17 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5994
6029
  this.mapObject.baseMapBounds = null;
5995
6030
  }
5996
6031
  };
6032
+ LayerPanel.prototype.bingMapCalculation = function (layer, layerIndex, proxy, bing) {
6033
+ bing.imageUrl = layer.urlTemplate;
6034
+ bing.subDomains = ['t0', 't1', 't2', 't3'];
6035
+ bing.maxZoom = '21';
6036
+ proxy.mapObject['bingMap'] = bing;
6037
+ proxy.renderTileLayer(proxy, layer, layerIndex, bing);
6038
+ this.mapObject.arrangeTemplate();
6039
+ if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
6040
+ this.mapObject.zoomModule.applyTransform(true);
6041
+ }
6042
+ };
5997
6043
  LayerPanel.prototype.bubbleCalculation = function (bubbleSettings, range) {
5998
6044
  if (bubbleSettings.dataSource != null && bubbleSettings != null) {
5999
6045
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6186,60 +6232,66 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6186
6232
  }
6187
6233
  break;
6188
6234
  case 'LineString':
6189
- path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
6190
6235
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6191
- currentShapeData.map(function (lineData) {
6192
- path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6236
+ currentShapeData.map(function (lineData, index) {
6237
+ if (index === 0) {
6238
+ path += 'M ' + (lineData['point']['x']) + ' ' + (lineData['point']['y']);
6239
+ }
6240
+ else {
6241
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6242
+ }
6193
6243
  });
6194
6244
  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);
6245
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, !isNullOrUndefined(eventArgs.fill) ? eventArgs.fill :
6246
+ eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6247
+ pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6248
+ }
6249
+ break;
6250
+ case 'MultiLineString':
6251
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6252
+ currentShapeData.map(function (multilineData) {
6253
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6254
+ multilineData.map(function (lineData, index) {
6255
+ if (index === 0) {
6256
+ path += 'M ' + (lineData['point']['x']) + ' ' + (lineData['point']['y']);
6257
+ }
6258
+ else {
6259
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6260
+ }
6261
+ });
6262
+ });
6263
+ if (path.length > 3) {
6264
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, !isNullOrUndefined(eventArgs.fill) ? eventArgs.fill :
6265
+ eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6196
6266
  pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6197
6267
  }
6198
6268
  break;
6199
6269
  case 'Point':
6200
6270
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6201
6271
  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);
6272
+ var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
6273
+ circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6204
6274
  pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6205
6275
  break;
6276
+ case 'MultiPoint':
6277
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6278
+ currentShapeData.map(function (multiPointData, index) {
6279
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6280
+ var pointData = multiPointData['point'];
6281
+ var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
6282
+ circleOptions = new CircleOption((shapeID + "_multiLine_" + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6283
+ pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6284
+ _this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6285
+ });
6286
+ break;
6206
6287
  case 'Path':
6207
6288
  path = currentShapeData['point'];
6208
6289
  pathOptions = new PathOption(shapeID, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6209
6290
  pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6210
6291
  break;
6211
6292
  }
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);
6293
+ if (!isNullOrUndefined(pathEle) && drawingType !== 'MultiPoint') {
6294
+ _this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6243
6295
  }
6244
6296
  if (i === _this.currentLayer.layerData.length - 1) {
6245
6297
  _this.layerFeatures(layerIndex, colors, renderData, labelTemplateEle);
@@ -6257,6 +6309,49 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6257
6309
  this.layerFeatures(layerIndex, colors, renderData, labelTemplateEle);
6258
6310
  }
6259
6311
  };
6312
+ /**
6313
+ * layer features as bubble, marker, datalabel, navigation line.
6314
+ *
6315
+ * @param {groupElement} Element - Specifies the element to append the group
6316
+ * @param {pathEle} Element - Specifies the svg element
6317
+ * @param {drawingType} string - Specifies the data type
6318
+ * @param {currentShapeData} any - Specifies the layer of shapedata.
6319
+ * @param {index} number - Specifies the tab index.
6320
+ * @returns {void}
6321
+ */
6322
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6323
+ LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType, currentShapeData, index) {
6324
+ var property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
6325
+ this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
6326
+ var properties;
6327
+ for (var j = 0; j < property.length; j++) {
6328
+ if (!isNullOrUndefined(currentShapeData['property'])) {
6329
+ properties = property[j];
6330
+ break;
6331
+ }
6332
+ }
6333
+ pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6334
+ (currentShapeData['property'][properties]) : ''));
6335
+ pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + index + 3).toString());
6336
+ if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
6337
+ pathEle.setAttribute('style', 'outline:none');
6338
+ }
6339
+ maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
6340
+ if (this.mapObject.toggledShapeElementId) {
6341
+ for (var j = 0; j < this.mapObject.toggledShapeElementId.length; j++) {
6342
+ var styleProperty = this.mapObject.legendSettings.toggleLegendSettings.applyShapeSettings ?
6343
+ this.currentLayer.shapeSettings : this.mapObject.legendSettings.toggleLegendSettings;
6344
+ if (this.mapObject.toggledShapeElementId[j] === pathEle.id) {
6345
+ pathEle.setAttribute('fill', styleProperty.fill);
6346
+ pathEle.setAttribute('stroke', styleProperty.border.color);
6347
+ pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
6348
+ pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
6349
+ pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
6350
+ }
6351
+ }
6352
+ }
6353
+ groupElement.appendChild(pathEle);
6354
+ };
6260
6355
  /**
6261
6356
  * layer features as bubble, marker, datalabel, navigation line.
6262
6357
  *
@@ -6444,7 +6539,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6444
6539
  break;
6445
6540
  case 'linestring':
6446
6541
  var extraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6447
- this.currentLayer.shapeSettings.border.width : 1;
6542
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6543
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
6448
6544
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6449
6545
  coordinates.map(function (points, index) {
6450
6546
  latitude = points[1];
@@ -6459,31 +6555,61 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6459
6555
  newData['type'] = type;
6460
6556
  this.currentLayer.layerData.push(newData);
6461
6557
  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);
6558
+ case 'multilinestring':
6559
+ var extraSpaces_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6560
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6561
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
6562
+ var multiLineData_1 = [];
6466
6563
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6467
- coordinates.map(function (points, index) {
6468
- if (Object.prototype.toString.call(points) === '[object Array]') {
6564
+ coordinates.map(function (multiPoints) {
6565
+ newData = [];
6566
+ multiPoints.map(function (points) {
6469
6567
  latitude = points[1];
6470
6568
  longitude = points[0];
6471
- arrayCollections_1 = true;
6472
6569
  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
6570
+ _this.calculateBox(point, extraSpaces_1);
6571
+ newData.push({
6572
+ point: point, lat: latitude, lng: longitude
6475
6573
  });
6476
- }
6574
+ });
6575
+ multiLineData_1.push(newData);
6576
+ });
6577
+ multiLineData_1['property'] = properties;
6578
+ multiLineData_1['type'] = type;
6579
+ this.currentLayer.layerData.push(multiLineData_1);
6580
+ break;
6581
+ case 'point':
6582
+ var pointExtraSpace = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6583
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6584
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
6585
+ (this.currentLayer.shapeSettings.circleRadius * 2);
6586
+ latitude = coordinates[1];
6587
+ longitude = coordinates[0];
6588
+ var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6589
+ this.calculateBox(point, pointExtraSpace);
6590
+ this.currentLayer.layerData.push({
6591
+ point: point, type: type, lat: latitude, lng: longitude, property: properties
6477
6592
  });
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
6593
+ break;
6594
+ case 'multipoint': {
6595
+ var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6596
+ (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6597
+ parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
6598
+ (this.currentLayer.shapeSettings.circleRadius * 2);
6599
+ newData = [];
6600
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6601
+ coordinates.map(function (points) {
6602
+ latitude = points[1];
6603
+ longitude = points[0];
6604
+ var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
6605
+ _this.calculateBox(point, extraSpace_2);
6606
+ newData.push({
6607
+ point: point, lat: latitude, lng: longitude
6485
6608
  });
6486
- }
6609
+ });
6610
+ newData['property'] = properties;
6611
+ newData['type'] = type;
6612
+ this.currentLayer.layerData.push(newData);
6487
6613
  break;
6488
6614
  }
6489
6615
  case 'path':
@@ -6495,12 +6621,12 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6495
6621
  };
6496
6622
  LayerPanel.prototype.calculateBox = function (point, extraSpace) {
6497
6623
  if (isNullOrUndefined(this.rectBounds)) {
6498
- this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
6624
+ this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace, y: point.y + extraSpace } };
6499
6625
  }
6500
6626
  else {
6501
- this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
6627
+ this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x - extraSpace);
6502
6628
  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);
6629
+ this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x + extraSpace);
6504
6630
  this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
6505
6631
  }
6506
6632
  };
@@ -6518,6 +6644,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6518
6644
  var end = convertGeoToPoint(bounds.latitude.max, bounds.longitude.max, null, layer, this.mapObject);
6519
6645
  mapHeight = end.y - start.y;
6520
6646
  mapWidth = end.x - start.x;
6647
+ if (mapHeight === 0 || mapWidth === 0) {
6648
+ mapWidth = mapSize.width / 2;
6649
+ mapHeight = mapSize.height;
6650
+ }
6521
6651
  }
6522
6652
  else {
6523
6653
  mapHeight = mapWidth = 500;
@@ -6612,15 +6742,28 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6612
6742
  _this.calculateRectBox(point[0]);
6613
6743
  });
6614
6744
  break;
6745
+ case 'multilinestring':
6746
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6747
+ coordinates.map(function (multiPoint, index) {
6748
+ multiPoint.map(function (point, index) {
6749
+ _this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
6750
+ });
6751
+ });
6752
+ break;
6615
6753
  case 'linestring':
6616
6754
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6617
6755
  coordinates.map(function (point, index) {
6618
- _this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
6756
+ _this.calculateRectBox(point, 'linestring', index === 0 ? true : false);
6619
6757
  });
6620
6758
  break;
6621
6759
  case 'point':
6622
6760
  _this.calculateRectBox(coordinates, 'point');
6623
6761
  break;
6762
+ case 'multipoint':
6763
+ coordinates.map(function (point, index) {
6764
+ _this.calculateRectBox(point, 'multipoint', index === 0 ? true : false);
6765
+ });
6766
+ break;
6624
6767
  }
6625
6768
  }
6626
6769
  });
@@ -6659,7 +6802,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6659
6802
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6660
6803
  LayerPanel.prototype.calculateRectBox = function (coordinates, type, isFirstItem) {
6661
6804
  var _this = this;
6662
- if (type !== 'LineString' && type !== 'point') {
6805
+ if ((type !== 'linestring' && type !== 'multilinestring') && (type !== 'point' && type !== 'multipoint')) {
6663
6806
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6664
6807
  Array.prototype.forEach.call(coordinates, function (currentCoords) {
6665
6808
  if (isNullOrUndefined(_this.mapObject.baseMapBounds)) {
@@ -6728,7 +6871,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6728
6871
  var tile = new Tile(tileI % ycount, j);
6729
6872
  tile.left = x;
6730
6873
  tile.top = y;
6731
- if (baseLayer.layerType === 'Bing') {
6874
+ if (baseLayer.layerType === 'Bing' || (bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
6732
6875
  var key = baseLayer.key;
6733
6876
  tile.src = bing.getBingMap(tile, key, baseLayer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
6734
6877
  }
@@ -6757,11 +6900,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6757
6900
  if (!(layer.type === 'SubLayer' && layer.visible)) {
6758
6901
  continue;
6759
6902
  }
6760
- if (layer.layerType === 'OSM' || layer.layerType === 'Bing') {
6903
+ if ((layer.layerType !== 'Geometry' && layer.layerType !== 'GoogleStaticMap') || (layer.layerType === 'Geometry' &&
6904
+ isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
6761
6905
  for (var _b = 0, proxTiles_1 = proxTiles; _b < proxTiles_1.length; _b++) {
6762
6906
  var baseTile = proxTiles_1[_b];
6763
6907
  var subtile = extend({}, baseTile, {}, true);
6764
6908
  if (layer.layerType === 'Bing') {
6909
+ bing = new BingMap(this.mapObject);
6765
6910
  subtile.src = bing.getBingMap(subtile, layer.key, layer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
6766
6911
  }
6767
6912
  else {
@@ -6821,6 +6966,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6821
6966
  var id = 0;
6822
6967
  var _loop_3 = function (tile) {
6823
6968
  var imgElement = createElement('img');
6969
+ imgElement.setAttribute('height', '256px');
6970
+ imgElement.setAttribute('width', '256px');
6824
6971
  imgElement.setAttribute('src', tile.src);
6825
6972
  var mapId = _this.mapObject.element.id;
6826
6973
  imgElement.onload = function () {
@@ -7474,16 +7621,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7474
7621
  };
7475
7622
  Maps.prototype.renderMap = function () {
7476
7623
  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
- }
7624
+ this.legendModule.renderLegend();
7487
7625
  }
7488
7626
  this.createTile();
7489
7627
  if (this.zoomSettings.enable && this.zoomModule) {
@@ -7566,12 +7704,16 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7566
7704
  bottom = svg.bottom - tile.bottom - element.offsetTop;
7567
7705
  top_1 = parseFloat(tileElement.style.top) + element.offsetTop;
7568
7706
  }
7569
- top_1 = (bottom <= 11) ? top_1 : (top_1 * 2);
7570
- left = (bottom <= 11) ? left : (left * 2);
7707
+ top_1 = (bottom <= 11) ? top_1 : (!isNullOrUndefined(this.legendModule) && this.legendSettings.position === 'Bottom') ? this.mapAreaRect.y : (top_1 * 2);
7708
+ left = (bottom <= 11) ? left : !isNullOrUndefined(this.legendModule) ? left : (left * 2);
7571
7709
  tileElement.style.top = top_1 + 'px';
7572
7710
  tileElement.style.left = left + 'px';
7573
7711
  tileElement1.style.top = top_1 + 'px';
7574
7712
  tileElement1.style.left = left + 'px';
7713
+ if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
7714
+ tileElement.style.height = tileElement1.style.height = this.legendModule.legendTotalRect.height + 'px';
7715
+ tileElement.style.width = tileElement1.style.width = this.legendModule.legendTotalRect.width + 'px';
7716
+ }
7575
7717
  }
7576
7718
  this.arrangeTemplate();
7577
7719
  if (this.annotationsModule) {
@@ -7697,12 +7839,21 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7697
7839
  this.zoomModule.layerCollectionEle = getElementByID(this.element.id + '_Layer_Collections');
7698
7840
  }
7699
7841
  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();
7842
+ var tileElement = getElementByID(this.element.id + '_tile_parent');
7843
+ var tileSvgElement = getElementByID(this.element.id + '_Tile_SVG');
7844
+ var tileSvgParentElement = getElementByID(this.element.id + '_Tile_SVG_Parent');
7845
+ var tileRect = tileElement.getBoundingClientRect();
7846
+ var tileSvgRect = tileSvgElement.getBoundingClientRect();
7702
7847
  left = (tileRect.left - tileSvgRect.left);
7703
7848
  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';
7849
+ tileSvgParentElement.style.left = left + 'px';
7850
+ tileSvgParentElement.style.top = top + 'px';
7851
+ if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
7852
+ tileElement.style.width = tileSvgElement.style.width = this.legendModule.legendTotalRect.width.toString();
7853
+ tileElement.style.height = tileSvgElement.style.height = this.legendModule.legendTotalRect.height.toString();
7854
+ tileSvgParentElement.style.width = this.legendModule.legendTotalRect.width + 'px';
7855
+ tileSvgParentElement.style.height = this.legendModule.legendTotalRect.height + 'px';
7856
+ }
7706
7857
  var markerTemplateElements = document.getElementsByClassName('template');
7707
7858
  if (!isNullOrUndefined(markerTemplateElements) && markerTemplateElements.length > 0) {
7708
7859
  for (var i = 0; i < markerTemplateElements.length; i++) {
@@ -7720,7 +7871,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7720
7871
  if (!isNullOrUndefined(elements) && elements.childElementCount > 0) {
7721
7872
  for (var i = 0; i < elements.childNodes.length; i++) {
7722
7873
  var childElement = elements.childNodes[i];
7723
- if (childElement.tagName === 'g') {
7874
+ if (childElement.tagName === 'g' && childElement.id.indexOf('_Legend_Group') == -1) {
7724
7875
  var layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
7725
7876
  for (var j = 0; j < childElement.childNodes.length; j++) {
7726
7877
  var childNode = childElement.childNodes[j];
@@ -7757,7 +7908,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7757
7908
  }
7758
7909
  var templateElements = document.getElementsByClassName(this.element.id + '_template');
7759
7910
  if (!isNullOrUndefined(templateElements) && templateElements.length > 0 &&
7760
- getElementByID(this.element.id + '_Layer_Collections') && this.layers[this.layers.length - 1].layerType !== 'OSM') {
7911
+ getElementByID(this.element.id + '_Layer_Collections') && !this.isTileMap) {
7761
7912
  for (var i = 0; i < templateElements.length; i++) {
7762
7913
  var offSetLetValue = 0;
7763
7914
  var offSetTopValue = 0;
@@ -7792,10 +7943,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7792
7943
  var mainLayer = this.layersCollection[0];
7793
7944
  var padding = 0;
7794
7945
  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
- }
7946
+ mainLayer.layerType === 'GoogleStaticMap' || mainLayer.layerType === 'Google' || (!isNullOrUndefined(mainLayer.urlTemplate) && mainLayer.urlTemplate !== ''))) {
7799
7947
  removeElement(this.element.id + '_tile_parent');
7800
7948
  removeElement(this.element.id + '_tiles');
7801
7949
  removeElement('animated_tiles');
@@ -7843,7 +7991,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7843
7991
  var baseLayer = mainLayers[i];
7844
7992
  if (baseLayer.visible && baseIndex === i) {
7845
7993
  baseLayer.isBaseLayer = true;
7846
- this.isTileMap = (baseLayer.layerType === 'Geometry') ? false : true;
7994
+ this.isTileMap = (baseLayer.layerType === 'Geometry' && !isNullOrUndefined(baseLayer.shapeData)) ? false : true;
7847
7995
  this.layersCollection.push(baseLayer);
7848
7996
  break;
7849
7997
  }
@@ -7890,12 +8038,19 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7890
8038
  * @private
7891
8039
  */
7892
8040
  Maps.prototype.renderTitle = function (title, type, bounds, groupEle) {
7893
- var style = title.textStyle;
8041
+ var style = {
8042
+ size: title.textStyle.size,
8043
+ color: title.textStyle.color,
8044
+ fontFamily: title.textStyle.fontFamily,
8045
+ fontWeight: title.textStyle.fontWeight,
8046
+ fontStyle: title.textStyle.fontStyle,
8047
+ opacity: title.textStyle.opacity
8048
+ };
7894
8049
  var height;
7895
8050
  var width = Math.abs((this.margin.left + this.margin.right) - this.availableSize.width);
7896
- style.fontFamily = this.themeStyle.fontFamily || style.fontFamily;
8051
+ style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
7897
8052
  style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
7898
- style.size = this.themeStyle.titleFontSize || style.size;
8053
+ style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || Theme.mapsSubTitleFont.size);
7899
8054
  if (title.text) {
7900
8055
  if (isNullOrUndefined(groupEle)) {
7901
8056
  groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
@@ -8065,6 +8220,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8065
8220
  var id = event.target['id'];
8066
8221
  event.preventDefault();
8067
8222
  if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
8223
+ this.mapAreaRect = this.legendModule.initialMapAreaRect;
8068
8224
  this.legendModule.currentPage = (id.indexOf('_Left_Page_') > -1) ? (this.legendModule.currentPage - 1) :
8069
8225
  (this.legendModule.currentPage + 1);
8070
8226
  this.legendModule.legendGroup = this.renderer.createGroup({ id: this.element.id + '_Legend_Group' });
@@ -8260,7 +8416,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8260
8416
  }
8261
8417
  }
8262
8418
  this.notify(Browser.touchEndEvent, e);
8263
- if (e.cancelable) {
8419
+ if (e.cancelable && !this.isTouch) {
8264
8420
  e.preventDefault();
8265
8421
  }
8266
8422
  return false;
@@ -8414,7 +8570,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8414
8570
  removeElement(this.element.id + '_EJ2_LegendTitle_Tooltip');
8415
8571
  }
8416
8572
  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);
8573
+ 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
8574
  }
8419
8575
  else {
8420
8576
  removeElement(this.element.id + '_EJ2_Title_Tooltip');
@@ -8449,6 +8605,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8449
8605
  _this.refreshing = true;
8450
8606
  _this.wireEVents();
8451
8607
  _this.render();
8608
+ _this.refreshing = false;
8452
8609
  }, 500);
8453
8610
  }
8454
8611
  }
@@ -8847,7 +9004,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8847
9004
  var collection = Object.keys(newProp.layers[x]);
8848
9005
  for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
8849
9006
  var collectionProp = collection_1[_b];
8850
- if (collectionProp === 'layerType' && newProp.layers[x].layerType === 'OSM') {
9007
+ if ((collectionProp === 'layerType' && newProp.layers[x].layerType !== 'Geometry') || (isNullOrUndefined(this.layers[x].shapeData)
9008
+ && !isNullOrUndefined(this.layers[x].urlTemplate) && this.layers[x].urlTemplate !== '')) {
8851
9009
  this.isReset = true;
8852
9010
  }
8853
9011
  else if (collectionProp === 'markerSettings') {
@@ -9130,6 +9288,28 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9130
9288
  }
9131
9289
  return null;
9132
9290
  };
9291
+ /**
9292
+ * This method is used to get the Bing maps URL.
9293
+ *
9294
+ * @param {string} url - Specifies the URL of the maps.
9295
+ * @returns {Promise<string>} - Returns the processed Bing URL as Promise.
9296
+ */
9297
+ Maps.prototype.getBingUrlTemplate = function (url) {
9298
+ var promise = new Promise(function (resolve, reject) {
9299
+ var ajax = new Ajax({
9300
+ url: url
9301
+ });
9302
+ ajax.onSuccess = function (json) {
9303
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9304
+ var jsonObject = JSON.parse(json);
9305
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9306
+ var resource = jsonObject['resourceSets'][0]['resources'][0];
9307
+ resolve(resource['imageUrl']);
9308
+ };
9309
+ ajax.send();
9310
+ });
9311
+ return promise;
9312
+ };
9133
9313
  /**
9134
9314
  * To find visibility of layers and markers for required modules load.
9135
9315
  *
@@ -9484,12 +9664,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
9484
9664
  isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
9485
9665
  var shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
9486
9666
  ? shape[shapePath].toLowerCase() : shape[shapePath];
9487
- if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
9488
- if (layerData[i]['type'] === 'Point') {
9489
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9490
- shapePoints.push(this.getPoints(layerData[i], []));
9491
- }
9492
- else if (!layerData[i]['_isMultiPolygon']) {
9667
+ if (shapeDataLayerPathValue === shapePathValue && (layerData[i].type !== 'LineString' && layerData[i].type !== 'MultiLineString' && layerData[i]['type'] !== 'Point' && layerData[i]['type'] !== 'MultiPoint')) {
9668
+ if (!layerData[i]['_isMultiPolygon']) {
9493
9669
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9494
9670
  shapePoints.push(this.getPoints(layerData[i], []));
9495
9671
  currentLength = shapePoints[shapePoints.length - 1].length;
@@ -9814,7 +9990,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9814
9990
  layer.dataSource, layer.shapeDataPath, shapeData['properties'][propertyPath], layer.shapeDataPath);
9815
9991
  if (!isNullOrUndefined(shapes['property'])) {
9816
9992
  shapePoint = [[]];
9817
- if (!layerData[index]['_isMultiPolygon'] && layerData[index]['type'] !== 'Point') {
9993
+ if (!layerData[index]['_isMultiPolygon'] && layerData[index]['type'] !== 'Point' && layerData[index]['type'] !== 'MultiPoint') {
9818
9994
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9819
9995
  shapePoint.push(this.getPoint(layerData[index], []));
9820
9996
  currentLength = shapePoint[shapePoint.length - 1].length;
@@ -9823,21 +9999,9 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9823
9999
  midIndex = shapePoint.length - 1;
9824
10000
  }
9825
10001
  }
9826
- else {
10002
+ else if (layerData[index]['type'] !== 'Point' && layerData[index]['type'] !== 'MultiPoint') {
9827
10003
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9828
10004
  var layer_1 = layerData[index];
9829
- if (layer_1['type'] === 'Point') {
9830
- isPoint = true;
9831
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9832
- var layerPoints = [];
9833
- layerPoints.push(this.getPoint(layerData, []));
9834
- shapePoint = layerPoints;
9835
- currentLength = shapePoint[shapePoint.length - 1].length;
9836
- if (pointsLength < currentLength) {
9837
- pointsLength = currentLength;
9838
- midIndex = shapePoint.length - 1;
9839
- }
9840
- }
9841
10005
  for (var j = 0; j < layer_1.length; j++) {
9842
10006
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9843
10007
  shapePoint.push(this.getPoint(layer_1[j], []));
@@ -10082,10 +10246,21 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10082
10246
  };
10083
10247
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10084
10248
  DataLabel.prototype.getPoint = function (shapes, points) {
10085
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10086
- shapes.map(function (current, index) {
10087
- points.push(new Point(current['point']['x'], current['point']['y']));
10088
- });
10249
+ if (shapes['type'] === 'MultiLineString') {
10250
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10251
+ shapes.map(function (current) {
10252
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10253
+ current.map(function (shape) {
10254
+ points.push(new Point(shape['point']['x'], shape['point']['y']));
10255
+ });
10256
+ });
10257
+ }
10258
+ else {
10259
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10260
+ shapes.map(function (current, index) {
10261
+ points.push(new Point(current['point']['x'], current['point']['y']));
10262
+ });
10263
+ }
10089
10264
  return points;
10090
10265
  };
10091
10266
  /**
@@ -10279,6 +10454,10 @@ var Legend = /** @__PURE__ @class */ (function () {
10279
10454
  * @private
10280
10455
  */
10281
10456
  this.legendBorderRect = new Rect(0, 0, 0, 0);
10457
+ /**
10458
+ * @private
10459
+ */
10460
+ this.initialMapAreaRect = new Rect(0, 0, 0, 0);
10282
10461
  /**
10283
10462
  * @private
10284
10463
  */
@@ -10337,6 +10516,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10337
10516
  this.heightIncrement = 0;
10338
10517
  this.defsElement = this.maps.renderer.createDefs();
10339
10518
  this.maps.svgObject.appendChild(this.defsElement);
10519
+ this.initialMapAreaRect = this.maps.mapAreaRect;
10340
10520
  this.calculateLegendBounds();
10341
10521
  this.drawLegend();
10342
10522
  };
@@ -10376,9 +10556,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10376
10556
  }
10377
10557
  }
10378
10558
  }
10379
- else {
10380
- _this.getMarkersLegendCollections(layerIndex, layer.markerSettings);
10381
- }
10559
+ }
10560
+ if (legend.type === 'Markers') {
10561
+ _this.getMarkersLegendCollections(layerIndex, layer.markerSettings);
10382
10562
  }
10383
10563
  });
10384
10564
  if (this.legendCollection.length > 0) {
@@ -10569,8 +10749,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10569
10749
  }
10570
10750
  }
10571
10751
  else {
10752
+ var padding = 10;
10572
10753
  shapeX = shapeLocation[j - 1].x;
10573
- shapeY = prevPositionY + topPadding + (shapeHeight / 2);
10754
+ shapeY = prevPositionY + padding + (shapeHeight / 2);
10574
10755
  }
10575
10756
  }
10576
10757
  }
@@ -10673,7 +10854,14 @@ var Legend = /** @__PURE__ @class */ (function () {
10673
10854
  var legend = map.legendSettings;
10674
10855
  var render = map.renderer;
10675
10856
  var textOptions;
10676
- var textFont = legend.textStyle;
10857
+ var textFont = {
10858
+ size: legend.textStyle.size,
10859
+ color: legend.textStyle.color,
10860
+ fontFamily: legend.textStyle.fontFamily,
10861
+ fontWeight: legend.textStyle.fontWeight,
10862
+ fontStyle: legend.textStyle.fontStyle,
10863
+ opacity: legend.textStyle.opacity
10864
+ };
10677
10865
  this.legendGroup = render.createGroup({ id: map.element.id + '_Legend_Group' });
10678
10866
  if (legend.mode === 'Interactive') {
10679
10867
  for (var i = 0; i < this.legendRenderingCollections.length; i++) {
@@ -10689,7 +10877,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10689
10877
  textFont.color = (textFont.color !== null) ? textFont.color : this.maps.themeStyle.legendTextColor;
10690
10878
  var rectOptions = new RectOption(itemId, item['fill'], item['shapeBorder'], legend.opacity, bounds);
10691
10879
  textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'middle', item['text'], '', '');
10692
- textFont.fontFamily = map.themeStyle.fontFamily || textFont.fontFamily;
10880
+ textFont.fontFamily = !isNullOrUndefined(textFont.fontFamily) ? textFont.fontFamily : this.maps.themeStyle.fontFamily;
10693
10881
  textFont.size = map.themeStyle.legendFontSize || textFont.size;
10694
10882
  renderTextElement(textOptions, textFont, textFont.color, this.legendGroup);
10695
10883
  this.legendGroup.appendChild(render.drawRectangle(rectOptions));
@@ -10744,7 +10932,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10744
10932
  };
10745
10933
  legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
10746
10934
  this.maps.themeStyle.legendTextColor;
10747
- legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
10935
+ legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily : this.maps.themeStyle.fontFamily;
10748
10936
  legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
10749
10937
  if (i === 0) {
10750
10938
  this.renderLegendBorder();
@@ -10820,7 +11008,9 @@ var Legend = /** @__PURE__ @class */ (function () {
10820
11008
  'opacity': 1,
10821
11009
  'dominant-baseline': ''
10822
11010
  };
10823
- pagingGroup.appendChild(render.createText(pageTextOptions, pagingText));
11011
+ var pagingTextElement = render.createText(pageTextOptions, pagingText);
11012
+ pagingTextElement.setAttribute('style', 'user-select: none;');
11013
+ pagingGroup.appendChild(pagingTextElement);
10824
11014
  this.legendGroup.appendChild(pagingGroup);
10825
11015
  }
10826
11016
  this.legendToggle();
@@ -10832,6 +11022,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10832
11022
  var shapeIndex;
10833
11023
  var layerIndex;
10834
11024
  var dataIndex;
11025
+ var pointIndex;
10835
11026
  var legend = this.maps.legendSettings;
10836
11027
  var textEle = legend.mode === 'Default' ? document.getElementById(targetElement.id.replace('Shape', 'Text')) :
10837
11028
  document.getElementById(targetElement.id + '_Text');
@@ -10919,12 +11110,20 @@ var Legend = /** @__PURE__ @class */ (function () {
10919
11110
  }
10920
11111
  if (enable) {
10921
11112
  for (var j = 0; j < data.length; j++) {
11113
+ var shapeElement = void 0;
10922
11114
  shapeIndex = data[j]['shapeIndex'];
10923
11115
  layerIndex = data[j]['layerIndex'];
10924
11116
  dataIndex = data[j]['dataIndex'];
10925
- var shapeEle = document.getElementById(this.maps.element.id + '_LayerIndex_' +
10926
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
10927
- if (shapeEle !== null) {
11117
+ pointIndex = data[j]['pointIndex'];
11118
+ if (pointIndex === -1) {
11119
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11120
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11121
+ }
11122
+ else {
11123
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11124
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11125
+ }
11126
+ if (shapeElement !== null) {
10928
11127
  var shapeMatch = true;
10929
11128
  if (this.maps.legendSelectionCollection !== null) {
10930
11129
  for (var i_1 = 0; i_1 < this.maps.legendSelectionCollection.length; i_1++) {
@@ -10941,13 +11140,13 @@ var Legend = /** @__PURE__ @class */ (function () {
10941
11140
  }
10942
11141
  length = this.legendHighlightCollection.length;
10943
11142
  var legendHighlightColor = this.legendHighlightCollection[length - 1]['legendOldFill'];
10944
- this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeEle);
11143
+ this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeElement);
10945
11144
  var shapeItemCount = this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].length - 1;
10946
- var shapeOldFillColor = shapeEle.getAttribute('fill');
11145
+ var shapeOldFillColor = shapeElement.getAttribute('fill');
10947
11146
  this.legendHighlightCollection[length - 1]['shapeOldFillColor'].push(shapeOldFillColor);
10948
11147
  var shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
10949
11148
  this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
10950
- this.setColor(shapeEle, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11149
+ this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
10951
11150
  this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
10952
11151
  }
10953
11152
  else if (value === 'selection') {
@@ -10970,12 +11169,12 @@ var Legend = /** @__PURE__ @class */ (function () {
10970
11169
  }
10971
11170
  selectLength = this.maps.legendSelectionCollection.length;
10972
11171
  var legendSelectionColor = this.maps.legendSelectionCollection[selectLength - 1]['legendOldFill'];
10973
- this.maps.legendSelectionCollection[selectLength - 1]['MapShapeCollection']['Elements'].push(shapeEle);
11172
+ this.maps.legendSelectionCollection[selectLength - 1]['MapShapeCollection']['Elements'].push(shapeElement);
10974
11173
  this.maps.legendSelectionCollection[selectLength - 1]['shapeOldFillColor'] = this.shapePreviousColor;
10975
11174
  this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
10976
- this.setColor(shapeEle, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
10977
- if (this.maps.selectedElementId.indexOf(shapeEle.getAttribute('id')) === -1) {
10978
- this.maps.selectedElementId.push(shapeEle.getAttribute('id'));
11175
+ this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
11176
+ if (this.maps.selectedElementId.indexOf(shapeElement.getAttribute('id')) === -1) {
11177
+ this.maps.selectedElementId.push(shapeElement.getAttribute('id'));
10979
11178
  }
10980
11179
  if (j === data.length - 1) {
10981
11180
  this.maps.legendSelection = false;
@@ -10990,14 +11189,15 @@ var Legend = /** @__PURE__ @class */ (function () {
10990
11189
  }
10991
11190
  };
10992
11191
  Legend.prototype.setColor = function (element, fill, opacity, borderColor, borderWidth, type) {
11192
+ var isLineStringShape = (element.parentElement.id.indexOf('LineString') > -1);
10993
11193
  if (type === 'selection') {
10994
- maintainStyleClass('ShapeselectionMap', 'ShapeselectionMapStyle', fill, opacity, borderColor, borderWidth, this.maps);
10995
- element.setAttribute('class', 'ShapeselectionMapStyle');
11194
+ maintainStyleClass((isLineStringShape ? 'LineselectionMap' : 'ShapeselectionMap'), (isLineStringShape ? 'LineselectionMapStyle' : 'ShapeselectionMapStyle'), (isLineStringShape ? 'transparent' : fill), opacity, (isLineStringShape ? fill : borderColor), borderWidth, this.maps);
11195
+ element.setAttribute('class', isLineStringShape ? 'LineselectionMapStyle' : 'ShapeselectionMapStyle');
10996
11196
  }
10997
11197
  else {
10998
- element.setAttribute('fill', fill);
11198
+ element.setAttribute('fill', isLineStringShape ? 'transparent' : fill);
10999
11199
  element.setAttribute('fill-opacity', opacity);
11000
- element.setAttribute('stroke', borderColor);
11200
+ element.setAttribute('stroke', isLineStringShape ? fill : borderColor);
11001
11201
  element.setAttribute('stroke-width', (Number(borderWidth) / this.maps.scale).toString());
11002
11202
  }
11003
11203
  };
@@ -11040,7 +11240,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11040
11240
  var dataCount = shapeElements.length;
11041
11241
  for (var j = 0; j < dataCount; j++) {
11042
11242
  var shapeElement = getElement(shapeElements[j]);
11043
- if (shapeElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11243
+ if (shapeElement.getAttribute('class') === 'ShapeselectionMapStyle' ||
11244
+ shapeElement.getAttribute('class') === 'LineselectionMapStyle') {
11044
11245
  removeClass(shapeElement);
11045
11246
  var selectedElementIdIndex = this.maps.selectedElementId.indexOf(shapeElement.id);
11046
11247
  if (selectedElementIdIndex !== -1) {
@@ -11118,12 +11319,14 @@ var Legend = /** @__PURE__ @class */ (function () {
11118
11319
  this.maps.legendSelectionClass = module;
11119
11320
  }
11120
11321
  else {
11121
- if ((checkSelection <= 1) && targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11322
+ if ((checkSelection <= 1) && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11323
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle')) {
11122
11324
  if (!this.maps.layers[layerIndex].selectionSettings.enableMultiSelect) {
11123
11325
  this.maps.selectedLegendElementId.splice(selectionIndex, 1);
11124
11326
  }
11125
11327
  else {
11126
- if (checkSelection <= 1 && targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
11328
+ if (checkSelection <= 1 && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11329
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle')) {
11127
11330
  this.maps.selectedLegendElementId.splice(selectionIndex, 1);
11128
11331
  }
11129
11332
  }
@@ -11210,7 +11413,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11210
11413
  }
11211
11414
  }
11212
11415
  }
11213
- if (selectionEle && (selectionEle['IsSelected'] && targetElement.getAttribute('class') === 'ShapeselectionMapStyle')) {
11416
+ if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11417
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
11214
11418
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11215
11419
  var element = this.maps.legendSelectionCollection[selectionEle['SelectionIndex']];
11216
11420
  var multiSelection = 0;
@@ -11301,7 +11505,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11301
11505
  }
11302
11506
  for (var j = 0; j < this.maps.selectedLegendElementId.length; j++) {
11303
11507
  var idIndex = this.maps.legendSettings.mode === 'Interactive' ?
11304
- 'container_Legend_Index_' : 'container_Legend_Shape_Index_';
11508
+ this.maps.element.id + '_Legend_Index_' : this.maps.element.id + '_Legend_Shape_Index_';
11305
11509
  var selectedElement = idIndex + this.maps.selectedLegendElementId[j];
11306
11510
  var legendElement = document.getElementById(selectedElement);
11307
11511
  if (!isNullOrUndefined(legendElement)) {
@@ -11353,6 +11557,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11353
11557
  var shapeIndex;
11354
11558
  var layerIndex;
11355
11559
  var dataIndex;
11560
+ var pointIndex;
11356
11561
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11357
11562
  var collection = this.maps.legendModule.legendCollection;
11358
11563
  var legend = this.maps.legendSettings;
@@ -11365,15 +11570,23 @@ var Legend = /** @__PURE__ @class */ (function () {
11365
11570
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11366
11571
  var currentElement = { Elements: [] };
11367
11572
  for (var j = 0; j < data.length; j++) {
11573
+ var shapeElement = void 0;
11368
11574
  shapeIndex = data[j]['shapeIndex'];
11369
11575
  layerIndex = data[j]['layerIndex'];
11370
11576
  dataIndex = data[j]['dataIndex'];
11371
- var shapeEle = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11372
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11373
- if (targetElement === shapeEle) {
11577
+ pointIndex = data[j]['pointIndex'];
11578
+ if (pointIndex === -1) {
11579
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11580
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11581
+ }
11582
+ else {
11583
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11584
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11585
+ }
11586
+ if (targetElement === shapeElement) {
11374
11587
  process = true;
11375
11588
  }
11376
- elements.push(shapeEle);
11589
+ elements.push(shapeElement);
11377
11590
  }
11378
11591
  if (process) {
11379
11592
  if (isNullOrUndefined(currentElement['LegendEle'])) {
@@ -11391,16 +11604,25 @@ var Legend = /** @__PURE__ @class */ (function () {
11391
11604
  var shapeIndex;
11392
11605
  var layerIndex;
11393
11606
  var dataIndex;
11607
+ var pointIndex;
11394
11608
  var idIndex = parseFloat(targetElement.id.charAt(targetElement.id.length - 1));
11395
11609
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11396
11610
  var data = this.maps.legendModule.legendCollection[idIndex]['data'];
11397
11611
  var legendShapeElements = [];
11398
11612
  for (var i = 0; i < data.length; i++) {
11613
+ var shapeElement = void 0;
11399
11614
  shapeIndex = data[i]['shapeIndex'];
11400
11615
  layerIndex = data[i]['layerIndex'];
11401
11616
  dataIndex = data[i]['dataIndex'];
11402
- var shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11403
- layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11617
+ pointIndex = data[i]['pointIndex'];
11618
+ if (pointIndex === -1) {
11619
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11620
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex);
11621
+ }
11622
+ else {
11623
+ shapeElement = document.getElementById(this.maps.element.id + '_LayerIndex_' +
11624
+ layerIndex + '_shapeIndex_' + shapeIndex + '_dataIndex_' + dataIndex + '_multiLine_' + pointIndex);
11625
+ }
11404
11626
  if (!isNullOrUndefined(shapeElement)) {
11405
11627
  legendShapeElements.push(shapeElement.id);
11406
11628
  }
@@ -11468,9 +11690,11 @@ var Legend = /** @__PURE__ @class */ (function () {
11468
11690
  var renderOptions = new RectOption(map.element.id + '_Legend_Border', legend.background, legendBorder, 1, this.legendBorderRect, null, null, '', '');
11469
11691
  this.legendGroup.appendChild(map.renderer.drawRectangle(renderOptions));
11470
11692
  this.getLegendAlignment(map, this.legendBorderRect.width, this.legendBorderRect.height, legend);
11471
- this.legendGroup.setAttribute('transform', 'translate( ' + (this.translate.x + (-(this.legendBorderRect.x))) + ' ' +
11693
+ this.legendGroup.setAttribute('transform', 'translate( ' + (this.translate.x + (-this.legendBorderRect.x)) + ' ' +
11472
11694
  (this.translate.y + (-(this.legendBorderRect.y))) + ' )');
11473
- map.svgObject.appendChild(this.legendGroup);
11695
+ if (legend.position !== 'Float') {
11696
+ map.svgObject.appendChild(this.legendGroup);
11697
+ }
11474
11698
  if (legendTitle) {
11475
11699
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
11476
11700
  textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
@@ -11482,7 +11706,16 @@ var Legend = /** @__PURE__ @class */ (function () {
11482
11706
  this.currentPage = (e.target.id.indexOf('_Left_Page_') > -1) ? (this.currentPage - 1) :
11483
11707
  (this.currentPage + 1);
11484
11708
  this.legendGroup = this.maps.renderer.createGroup({ id: this.maps.element.id + '_Legend_Group' });
11709
+ this.maps.mapAreaRect = this.initialMapAreaRect;
11485
11710
  this.drawLegendItem(this.currentPage);
11711
+ if (!isNullOrUndefined(this.maps.legendModule) && this.maps.legendSettings.position === 'Float') {
11712
+ if (this.maps.isTileMap) {
11713
+ this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.legendModule.legendGroup);
11714
+ }
11715
+ else {
11716
+ this.maps.svgObject.appendChild(this.maps.legendModule.legendGroup);
11717
+ }
11718
+ }
11486
11719
  if (querySelector(this.maps.element.id + '_Legend_Border', this.maps.element.id)) {
11487
11720
  querySelector(this.maps.element.id + '_Legend_Border', this.maps.element.id).style.pointerEvents = 'none';
11488
11721
  }
@@ -11500,53 +11733,60 @@ var Legend = /** @__PURE__ @class */ (function () {
11500
11733
  var areaWidth = totalRect.width;
11501
11734
  var totalWidth = map.availableSize.width;
11502
11735
  var totalHeight = map.availableSize.height;
11736
+ var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
11737
+ var locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
11503
11738
  if (legend.position === 'Float') {
11504
- this.translate = legend.location;
11739
+ this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) : new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
11740
+ this.legendTotalRect = map.mapAreaRect;
11505
11741
  }
11506
11742
  else {
11507
11743
  switch (legend.position) {
11508
11744
  case 'Top':
11509
11745
  case 'Bottom':
11510
- totalRect.height = (areaHeight - height);
11746
+ totalRect.height = (legend.position === 'Top') ? (areaHeight - height) : (areaHeight - height - (spacing * 2));
11511
11747
  x = (totalWidth / 2) - (width / 2);
11512
11748
  y = (legend.position === 'Top') ? areaY : (areaY + totalRect.height);
11513
- totalRect.y = (legend.position === 'Top') ? areaY + height + spacing : areaY;
11749
+ totalRect.y = (legend.position === 'Top') ? areaY + height + (map.isTileMap ? (spacing / 2) : spacing) : areaY - (spacing / 2);
11514
11750
  break;
11515
11751
  case 'Left':
11516
11752
  case 'Right':
11517
- totalRect.width = (areaWidth - width);
11518
- x = (legend.position === 'Left') ? areaX : (areaX + totalRect.width) - spacing;
11753
+ totalRect.width = (areaWidth - width - map.mapAreaRect.x);
11754
+ x = (legend.position === 'Left') ? areaX + (spacing / 2) : (areaX + totalRect.width + spacing);
11519
11755
  y = (totalHeight / 2) - (height / 2);
11520
- totalRect.x = (legend.position === 'Left') ? areaX + width : areaX;
11756
+ totalRect.x = (legend.position === 'Left') ? areaX + width + spacing : areaX;
11521
11757
  break;
11522
11758
  }
11523
11759
  switch (legend.alignment) {
11524
11760
  case 'Near':
11525
11761
  if (legend.position === 'Top' || legend.position === 'Bottom') {
11526
- x = totalRect.x;
11762
+ x = totalRect.x - (legend.mode === 'Interactive' ? spacing : 0);
11527
11763
  }
11528
11764
  else {
11529
- y = totalRect.y;
11765
+ y = totalRect.y - (!(legend.height && legend.width) && legend.mode === 'Interactive' ? map.mapAreaRect.x : 0);
11530
11766
  }
11531
11767
  break;
11532
11768
  case 'Far':
11533
11769
  if (legend.position === 'Top' || legend.position === 'Bottom') {
11534
- x = (totalWidth - width) - spacing;
11770
+ x = (totalWidth - width) - (legend.mode === 'Interactive' ? 0 : spacing);
11535
11771
  }
11536
11772
  else {
11537
- y = totalHeight - height;
11773
+ y = totalHeight - height - (legend.mode === 'Default' ? spacing : 0);
11538
11774
  }
11539
11775
  break;
11540
11776
  }
11541
11777
  if ((legend.height || legend.width) && legend.mode !== 'Interactive') {
11542
- this.legendTotalRect = map.totalRect = totalRect;
11778
+ this.legendTotalRect = map.mapAreaRect = map.totalRect = totalRect;
11543
11779
  }
11544
11780
  else {
11781
+ map.totalRect = null;
11545
11782
  if ((legend.height || legend.width) && legend.mode === 'Interactive') {
11546
11783
  map.totalRect = totalRect;
11547
11784
  }
11548
11785
  this.legendTotalRect = map.mapAreaRect = totalRect;
11549
11786
  }
11787
+ if (legend.position === 'Left') {
11788
+ map.mapAreaRect.width = totalRect.width;
11789
+ }
11550
11790
  this.translate = new Point(x, y);
11551
11791
  }
11552
11792
  };
@@ -11675,6 +11915,13 @@ var Legend = /** @__PURE__ @class */ (function () {
11675
11915
  borderColor: legend.shapeBorder.color, borderWidth: legend.shapeBorder.width
11676
11916
  });
11677
11917
  }
11918
+ else {
11919
+ for (var i = 0; i < this.legendCollection.length; i++) {
11920
+ if (this.legendCollection[i]['text'] === legendText && this.legendCollection[i]['fill'] === legendFill) {
11921
+ this.legendCollection[i].data.push(newColllection[0]);
11922
+ }
11923
+ }
11924
+ }
11678
11925
  }
11679
11926
  };
11680
11927
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -11876,15 +12123,16 @@ var Legend = /** @__PURE__ @class */ (function () {
11876
12123
  var width = 10;
11877
12124
  var direction = (legend.orientation === 'None') ? (legend.position === 'Top' || legend.position === 'Bottom')
11878
12125
  ? 'Horizontal' : 'Vertical' : legend.orientation;
12126
+ rect.y = legend.position === 'Float' && this.maps.isTileMap ? rect.y - this.maps.mapAreaRect.y : rect.y;
11879
12127
  if (direction === 'Horizontal') {
11880
12128
  if (!legend.invertedPointer) {
11881
- locX = rect.x + (rect.width / 2);
12129
+ locX = rect.x + (rect.width / 2) - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11882
12130
  locY = rect.y;
11883
12131
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY - height) +
11884
12132
  ' L ' + (locX + width) + ' ' + (locY - height) + ' Z ';
11885
12133
  }
11886
12134
  else {
11887
- locX = rect.x + (rect.width / 2);
12135
+ locX = rect.x + (rect.width / 2) - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11888
12136
  locY = rect.y + (rect.height);
11889
12137
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY + height) +
11890
12138
  ' L ' + (locX + width) + ' ' + (locY + height) + ' Z ';
@@ -11892,20 +12140,25 @@ var Legend = /** @__PURE__ @class */ (function () {
11892
12140
  }
11893
12141
  else {
11894
12142
  if (!legend.invertedPointer) {
11895
- locX = rect.x + (rect.width);
12143
+ locX = rect.x + rect.width - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11896
12144
  locY = rect.y + (rect.height / 2);
11897
12145
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX + width) + ' ' + (locY - height) +
11898
12146
  ' L ' + (locX + width) + ' ' + (locY + height) + ' z ';
11899
12147
  }
11900
12148
  else {
11901
- locX = rect.x;
12149
+ locX = rect.x - (legend.position === 'Float' && this.maps.isTileMap ? this.maps.mapAreaRect.x : 0);
11902
12150
  locY = rect.y + (rect.height / 2);
11903
12151
  path = ' M ' + locX + ' ' + locY + ' L ' + (locX - width) + ' ' + (locY - height) +
11904
12152
  ' L ' + (locX - width) + ' ' + (locY + height) + ' z ';
11905
12153
  }
11906
12154
  }
11907
12155
  var pathOptions = new PathOption(id, fill, strokeWidth, stroke, 1, 1, '', path);
11908
- this.maps.svgObject.appendChild(this.maps.renderer.drawPath(pathOptions));
12156
+ if (legend.position === 'Float' && this.maps.isTileMap) {
12157
+ this.maps.mapLayerPanel.layerGroup.appendChild(this.maps.renderer.drawPath(pathOptions));
12158
+ }
12159
+ else {
12160
+ this.maps.svgObject.appendChild(this.maps.renderer.drawPath(pathOptions));
12161
+ }
11909
12162
  };
11910
12163
  Legend.prototype.wireEvents = function (element) {
11911
12164
  EventHandler.add(element, Browser.touchStartEvent, this.changeNextPage, this);
@@ -12266,10 +12519,20 @@ var Legend = /** @__PURE__ @class */ (function () {
12266
12519
  var shapeDataValueCase = !isNullOrUndefined(shapeData['properties'][shapePath])
12267
12520
  && isNaN(shapeData['properties'][shapePath]) ? shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12268
12521
  if (shapeDataValueCase === dataPathValueCase) {
12269
- legendData.push({
12270
- layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12271
- name: data[dataPath], value: value
12272
- });
12522
+ if (shapeData['geometry']['type'] != 'MultiPoint') {
12523
+ legendData.push({
12524
+ layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12525
+ name: data[dataPath], value: value, pointIndex: -1
12526
+ });
12527
+ }
12528
+ else {
12529
+ for (var j = 0; j < shapeData['geometry'].coordinates.length; j++) {
12530
+ legendData.push({
12531
+ layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12532
+ name: data[dataPath], value: value, pointIndex: j
12533
+ });
12534
+ }
12535
+ }
12273
12536
  }
12274
12537
  }
12275
12538
  }
@@ -12381,7 +12644,8 @@ var Highlight = /** @__PURE__ @class */ (function () {
12381
12644
  targetEle.getAttribute('class') !== 'ShapeselectionMapStyle' && !isTouch &&
12382
12645
  targetEle.getAttribute('class') !== 'MarkerselectionMapStyle' &&
12383
12646
  targetEle.getAttribute('class') !== 'BubbleselectionMapStyle' &&
12384
- targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle') {
12647
+ targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle' &&
12648
+ targetEle.getAttribute('class') !== 'LineselectionMapStyle') {
12385
12649
  layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
12386
12650
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12387
12651
  var shapeData = void 0;
@@ -12391,8 +12655,9 @@ var Highlight = /** @__PURE__ @class */ (function () {
12391
12655
  var dataIndex = void 0;
12392
12656
  if (targetEle.id.indexOf('shapeIndex') > -1) {
12393
12657
  shapeIn = parseInt(targetEle.id.split('_shapeIndex_')[1].split('_')[0], 10);
12394
- shapeData = this.maps.layers[layerIndex].shapeData['features'] ?
12395
- this.maps.layers[layerIndex].shapeData['features'][shapeIn]['properties'] : null;
12658
+ shapeData = this.maps.layers[layerIndex].shapeData['features'] &&
12659
+ !isNullOrUndefined(this.maps.layersCollection[layerIndex].layerData[shapeIn]) ?
12660
+ this.maps.layersCollection[layerIndex].layerData[shapeIn]['property'] : null;
12396
12661
  dataIndex = parseInt(targetEle.id.split('_dataIndex_')[1].split('_')[0], 10);
12397
12662
  data = isNullOrUndefined(dataIndex) ? null : this.maps.layers[layerIndex].dataSource[dataIndex];
12398
12663
  this.highlightSettings = this.maps.layers[layerIndex].highlightSettings;
@@ -12464,7 +12729,8 @@ var Highlight = /** @__PURE__ @class */ (function () {
12464
12729
  */
12465
12730
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12466
12731
  Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
12467
- if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule) {
12732
+ if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule
12733
+ && this.maps.legendSettings.type === 'Layers') {
12468
12734
  this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.highlightSettings, 'highlight', layerIndex);
12469
12735
  }
12470
12736
  var selectHighLight = targetElement.id.indexOf('shapeIndex') > -1 && (this.maps.legendSettings.visible && this.maps.legendModule) ?
@@ -12483,7 +12749,7 @@ var Highlight = /** @__PURE__ @class */ (function () {
12483
12749
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
12484
12750
  }
12485
12751
  var border = {
12486
- color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
12752
+ color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color),
12487
12753
  width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
12488
12754
  opacity: this.highlightSettings.border.opacity
12489
12755
  };
@@ -12599,8 +12865,12 @@ var Selection = /** @__PURE__ @class */ (function () {
12599
12865
  var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12600
12866
  if (targetElement.id.indexOf('shapeIndex') > -1) {
12601
12867
  shapeIndex = parseInt(targetElement.id.split('_shapeIndex_')[1].split('_')[0], 10);
12602
- shapeData = this.maps.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
12603
- this.maps.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
12868
+ shapeData = !isNullOrUndefined(this.maps.layers[layerIndex].shapeData['features'])
12869
+ && this.maps.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
12870
+ this.maps.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] :
12871
+ !isNullOrUndefined(this.maps.layers[layerIndex].shapeData['geometries'])
12872
+ && this.maps.layers[layerIndex].shapeData['geometries']['length'] > shapeIndex ?
12873
+ this.maps.layers[layerIndex].shapeData['geometries'][shapeIndex]['properties'] : null;
12604
12874
  dataIndex = parseInt(targetElement.id.split('_dataIndex_')[1].split('_')[0], 10);
12605
12875
  data = isNullOrUndefined(dataIndex) ? null : this.maps.layers[layerIndex].dataSource[dataIndex];
12606
12876
  this.selectionsettings = this.maps.layers[layerIndex].selectionSettings;
@@ -12681,15 +12951,17 @@ var Selection = /** @__PURE__ @class */ (function () {
12681
12951
  Selection.prototype.selectMap = function (targetElement, shapeData, data) {
12682
12952
  var _this = this;
12683
12953
  var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12954
+ var isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
12684
12955
  var selectionsettings = this.selectionsettings;
12685
12956
  var border = {
12686
- color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
12687
- 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),
12957
+ color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) : this.selectionsettings.border.color,
12958
+ width: isLineStringShape ? (this.selectionsettings.border.width / this.maps.scale) :
12959
+ (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)),
12688
12960
  opacity: this.selectionsettings.border.opacity
12689
12961
  };
12690
12962
  var eventArgs = {
12691
12963
  opacity: this.selectionsettings.opacity,
12692
- fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
12964
+ fill: isLineStringShape ? 'transparent' : (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none'),
12693
12965
  border: border,
12694
12966
  name: itemSelection,
12695
12967
  target: targetElement.id,
@@ -12701,7 +12973,8 @@ var Selection = /** @__PURE__ @class */ (function () {
12701
12973
  this.maps.trigger('itemSelection', eventArgs, function (observedArgs) {
12702
12974
  eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ? _this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
12703
12975
  if (!eventArgs.cancel) {
12704
- if (targetElement.getAttribute('class') === _this.selectionType + 'selectionMapStyle') {
12976
+ if (targetElement.getAttribute('class') === _this.selectionType + 'selectionMapStyle'
12977
+ || targetElement.getAttribute('class') === 'LineselectionMapStyle') {
12705
12978
  removeClass(targetElement);
12706
12979
  _this.removedSelectionList(targetElement);
12707
12980
  for (var m = 0; m < _this.maps.shapeSelectionItem.length; m++) {
@@ -12720,7 +12993,8 @@ var Selection = /** @__PURE__ @class */ (function () {
12720
12993
  else {
12721
12994
  var layetElement = getElementByID(_this.maps.element.id + '_Layer_Collections');
12722
12995
  if (!_this.selectionsettings.enableMultiSelect &&
12723
- layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length > 0) {
12996
+ (layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length > 0 ||
12997
+ layetElement.getElementsByClassName('LineselectionMapStyle').length > 0)) {
12724
12998
  var eleCount = layetElement.getElementsByClassName(_this.selectionType + 'selectionMapStyle').length;
12725
12999
  var ele = void 0;
12726
13000
  for (var k = 0; k < eleCount; k++) {
@@ -12728,6 +13002,14 @@ var Selection = /** @__PURE__ @class */ (function () {
12728
13002
  removeClass(ele);
12729
13003
  _this.removedSelectionList(ele);
12730
13004
  }
13005
+ if (layetElement.getElementsByClassName('LineselectionMapStyle').length > 0) {
13006
+ eleCount = layetElement.getElementsByClassName('LineselectionMapStyle').length;
13007
+ for (var k = 0; k < eleCount; k++) {
13008
+ ele = layetElement.getElementsByClassName('LineselectionMapStyle')[0];
13009
+ removeClass(ele);
13010
+ _this.removedSelectionList(ele);
13011
+ }
13012
+ }
12731
13013
  if (_this.selectionType === 'Shape') {
12732
13014
  _this.maps.shapeSelectionItem = [];
12733
13015
  var selectionLength = _this.maps.selectedElementId.length;
@@ -12745,13 +13027,24 @@ var Selection = /** @__PURE__ @class */ (function () {
12745
13027
  ele.setAttribute('stroke', _this.maps.layers[layerIndex_2].navigationLineSettings[index].color);
12746
13028
  }
12747
13029
  }
12748
- if (!getElement(_this.selectionType + 'selectionMap')) {
12749
- document.body.appendChild(createStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs));
13030
+ if (!isLineStringShape) {
13031
+ if (!getElement(_this.selectionType + 'selectionMap')) {
13032
+ document.body.appendChild(createStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs));
13033
+ }
13034
+ else {
13035
+ customizeStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs);
13036
+ }
13037
+ targetElement.setAttribute('class', _this.selectionType + 'selectionMapStyle');
12750
13038
  }
12751
13039
  else {
12752
- customizeStyle(_this.selectionType + 'selectionMap', _this.selectionType + 'selectionMapStyle', eventArgs);
13040
+ if (!getElement('LineselectionMap')) {
13041
+ document.body.appendChild(createStyle('LineselectionMap', 'LineselectionMapStyle', eventArgs));
13042
+ }
13043
+ else {
13044
+ customizeStyle('LineselectionMap', 'LineselectionMapStyle', eventArgs);
13045
+ }
13046
+ targetElement.setAttribute('class', 'LineselectionMapStyle');
12753
13047
  }
12754
- targetElement.setAttribute('class', _this.selectionType + 'selectionMapStyle');
12755
13048
  if (targetElement.getAttribute('class') === 'ShapeselectionMapStyle') {
12756
13049
  _this.maps.shapeSelectionClass = getElement(_this.selectionType + 'selectionMap');
12757
13050
  _this.maps.selectedElementId.push(targetElement.getAttribute('id'));
@@ -13233,8 +13526,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
13233
13526
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13234
13527
  this.startTouches = [];
13235
13528
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13236
- this.shapeZoomLocation = [];
13237
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13238
13529
  this.intersect = [];
13239
13530
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13240
13531
  this.mouseDownLatLong = { x: 0, y: 0 };
@@ -13274,7 +13565,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
13274
13565
  var minZoom = map.zoomSettings.minZoom;
13275
13566
  newZoomFactor = (minZoom > newZoomFactor && type === 'ZoomIn') ? minZoom + 1 : newZoomFactor;
13276
13567
  var prevTilePoint = map.tileTranslatePoint;
13277
- if ((!map.isTileMap) && (type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)) {
13568
+ if ((!map.isTileMap) && ((type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)
13569
+ || map.isReset)) {
13278
13570
  var availSize = map.mapAreaRect;
13279
13571
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13280
13572
  var minBounds = map.baseMapRectBounds['min'];
@@ -13282,17 +13574,29 @@ var Zoom = /** @__PURE__ @class */ (function () {
13282
13574
  var maxBounds = map.baseMapRectBounds['max'];
13283
13575
  var mapTotalWidth = Math.abs(minBounds['x'] - maxBounds['x']);
13284
13576
  var mapTotalHeight = Math.abs(minBounds['y'] - maxBounds['y']);
13285
- var point = map.translatePoint;
13286
- var translatePointX = point.x - (((availSize.width / scale) - (availSize.width / newZoomFactor)) / (availSize.width / position.x));
13287
- var translatePointY = point.y - (((availSize.height / scale) - (availSize.height / newZoomFactor)) / (availSize.height / position.y));
13288
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * newZoomFactor;
13289
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13290
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13291
- map.translatePoint = new Point(translatePointX, translatePointY);
13577
+ var translatePointX = void 0;
13578
+ var translatePointY = void 0;
13579
+ if (newZoomFactor < 1.2 && map.projectionType !== 'Eckert5') {
13580
+ if (mapTotalWidth === 0 || mapTotalHeight === 0 || mapTotalWidth === mapTotalHeight) {
13581
+ mapTotalWidth = availSize.width / 2;
13582
+ mapTotalHeight = availSize.height;
13583
+ }
13584
+ newZoomFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13585
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13586
+ }
13587
+ else {
13588
+ var point = map.translatePoint;
13589
+ translatePointX = point.x - (((availSize.width / scale) - (availSize.width / newZoomFactor)) / (availSize.width / position.x));
13590
+ translatePointY = point.y - (((availSize.height / scale) - (availSize.height / newZoomFactor)) / (availSize.height / position.y));
13591
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * newZoomFactor;
13592
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13593
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13594
+ map.translatePoint = new Point(translatePointX, translatePointY);
13595
+ }
13292
13596
  map.scale = newZoomFactor;
13293
13597
  if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
13294
13598
  map.translatePoint = map.previousPoint;
13295
- map.scale = map.previousScale;
13599
+ map.scale = map.mapScaleValue = map.previousScale;
13296
13600
  }
13297
13601
  else {
13298
13602
  this.applyTransform();
@@ -13348,6 +13652,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
13348
13652
  }
13349
13653
  this.maps.zoomNotApplied = false;
13350
13654
  };
13655
+ Zoom.prototype.calculateInitalZoomTranslatePoint = function (newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map) {
13656
+ mapTotalWidth *= newZoomFactor;
13657
+ mapTotalHeight *= newZoomFactor;
13658
+ var widthDiff = minBounds['x'] !== 0 && map.translateType === 'layers' ? map.availableSize.width - availSize.width : 0;
13659
+ var translatePointX = availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2))) - widthDiff;
13660
+ var translatePointY = availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)));
13661
+ return new Point(translatePointX, translatePointY);
13662
+ };
13351
13663
  Zoom.prototype.triggerZoomEvent = function (prevTilePoint, prevLevel, type) {
13352
13664
  var map = this.maps;
13353
13665
  var zoomArgs;
@@ -13474,12 +13786,24 @@ var Zoom = /** @__PURE__ @class */ (function () {
13474
13786
  var mapTotalHeight = Math.abs(minBounds['y'] - maxBounds['y']);
13475
13787
  var mapTotalWidth = Math.abs(minBounds['x'] - maxBounds['x']);
13476
13788
  var translatePoint = map.translatePoint;
13477
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomCalculationFactor;
13478
- var translatePointX = translatePoint.x - (((availSize.width / map.scale) - (availSize.width / zoomCalculationFactor)) / (availSize.width / touchCenter.x));
13479
- var translatePointY = translatePoint.y - (((availSize.height / map.scale) - (availSize.height / zoomCalculationFactor)) / (availSize.height / touchCenter.y));
13480
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13481
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13482
- map.translatePoint = new Point(translatePointX, translatePointY);
13789
+ var translatePointX = void 0;
13790
+ var translatePointY = void 0;
13791
+ if (zoomCalculationFactor < 1.2 && map.projectionType !== 'Eckert5') {
13792
+ if (mapTotalWidth === 0 || mapTotalHeight === 0 || mapTotalWidth === mapTotalHeight) {
13793
+ mapTotalWidth = availSize.width / 2;
13794
+ mapTotalHeight = availSize.height;
13795
+ }
13796
+ zoomCalculationFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13797
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomCalculationFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13798
+ }
13799
+ else {
13800
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomCalculationFactor;
13801
+ translatePointX = translatePoint.x - (((availSize.width / map.scale) - (availSize.width / zoomCalculationFactor)) / (availSize.width / touchCenter.x));
13802
+ translatePointY = translatePoint.y - (((availSize.height / map.scale) - (availSize.height / zoomCalculationFactor)) / (availSize.height / touchCenter.y));
13803
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (availSize.x + ((-(minBounds['x'])) + ((availSize.width / 2) - (mapTotalWidth / 2)))) : translatePointX;
13804
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
13805
+ map.translatePoint = new Point(translatePointX, translatePointY);
13806
+ }
13483
13807
  map.scale = zoomCalculationFactor;
13484
13808
  isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13485
13809
  if (isZoomCancelled) {
@@ -13588,11 +13912,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
13588
13912
  layerElement.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index));
13589
13913
  }
13590
13914
  }
13591
- else {
13915
+ else if (currentEle.id.indexOf('Legend') == -1) {
13592
13916
  changeBorderWidth(currentEle, this.index, scale, this.maps);
13593
13917
  this.maps.zoomTranslatePoint = this.maps.translatePoint;
13594
13918
  this.animateTransform(currentEle, animate$$1, x, y, scale);
13595
- this.shapeZoomLocation = currentEle.childNodes;
13596
13919
  }
13597
13920
  }
13598
13921
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
@@ -13699,7 +14022,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13699
14022
  for (var k = 0; k < currentEle.childElementCount; k++) {
13700
14023
  if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
13701
14024
  var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
13702
- this.zoomshapewidth = this.shapeZoomLocation[labelIndex].getBoundingClientRect();
14025
+ this.zoomshapewidth = currentEle.childNodes[k].getBoundingClientRect();
13703
14026
  this.maps.zoomShapeCollection.push(this.zoomshapewidth);
13704
14027
  this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', animate$$1);
13705
14028
  var dataLabel = this.maps.layers[this.index].dataLabelSettings;
@@ -13918,7 +14241,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13918
14241
  }
13919
14242
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Hide') {
13920
14243
  if (scale > 1) {
13921
- text = (this.zoomshapewidth['width'] >= zoomtextSize['width']) ? zoomtext : '';
14244
+ text = ((this.maps.dataLabelShape[l] * scale) >= zoomtextSize['width']) ? zoomtext : '';
13922
14245
  element.innerHTML = text;
13923
14246
  }
13924
14247
  else {
@@ -13928,7 +14251,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13928
14251
  }
13929
14252
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Trim') {
13930
14253
  if (scale > 1) {
13931
- zoomtrimLabel = textTrim(this.zoomshapewidth['width'], zoomtext, style);
14254
+ zoomtrimLabel = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
13932
14255
  text = zoomtrimLabel;
13933
14256
  element.innerHTML = text;
13934
14257
  }
@@ -13966,7 +14289,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13966
14289
  || textLocations['heightTop'] > this.intersect[j]['heightBottom']) {
13967
14290
  trimmedLable = !isNullOrUndefined(text) ? text : zoomtext;
13968
14291
  if (scale > 1) {
13969
- trimmedLable = textTrim(this.zoomshapewidth['width'], trimmedLable, style);
14292
+ trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), trimmedLable, style);
13970
14293
  }
13971
14294
  element.innerHTML = trimmedLable;
13972
14295
  }
@@ -13992,11 +14315,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
13992
14315
  }
13993
14316
  this.intersect.push(textLocations);
13994
14317
  if (isNullOrUndefined(trimmedLable)) {
13995
- trimmedLable = textTrim(this.zoomshapewidth['width'], zoomtext, style);
14318
+ trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
13996
14319
  element.innerHTML = trimmedLable;
13997
14320
  }
13998
14321
  }
13999
- else {
14322
+ if (animate$$1 || duration > 0) {
14000
14323
  smoothTranslate(element, 0, duration, new MapLocation(labelX, labelY));
14001
14324
  }
14002
14325
  }
@@ -14118,7 +14441,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14118
14441
  var layerRect = getElementByID(map.element.id + '_Layer_Collections').getBoundingClientRect();
14119
14442
  var elementRect = getElementByID(map.element.id + '_svg').getBoundingClientRect();
14120
14443
  var panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
14121
- ((layerRect.left + layerRect.width) >= (elementRect.left + elementRect.width) + map.mapAreaRect.x + map.margin.left)));
14444
+ ((layerRect.left + layerRect.width + map.mapAreaRect.x) >= (elementRect.width))));
14122
14445
  var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
14123
14446
  ((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
14124
14447
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -14210,14 +14533,26 @@ var Zoom = /** @__PURE__ @class */ (function () {
14210
14533
  var max = map.baseMapRectBounds['max'];
14211
14534
  var mapWidth = Math.abs(max['x'] - min['x']);
14212
14535
  var mapHeight = Math.abs(min['y'] - max['y']);
14213
- var translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomFactor)) / 2);
14214
- var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomFactor)) / 2);
14215
- var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomFactor;
14216
- translatePointX = (currentHeight < map.mapAreaRect.height) ? (size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))))
14217
- : translatePointX;
14218
- translatePointY = (currentHeight < map.mapAreaRect.height) ? (size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2))))
14219
- : translatePointY;
14220
- map.translatePoint = new Point(translatePointX, translatePointY);
14536
+ var translatePointX = void 0;
14537
+ var translatePointY = void 0;
14538
+ if (zoomFactor < 1.2 && map.projectionType !== 'Eckert5') {
14539
+ if (mapHeight === 0 || mapWidth === 0 || mapHeight === mapWidth) {
14540
+ mapWidth = size.width / 2;
14541
+ mapHeight = size.height;
14542
+ }
14543
+ zoomFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
14544
+ map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomFactor, mapWidth, mapHeight, size, min, map);
14545
+ }
14546
+ else {
14547
+ translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomFactor)) / 2);
14548
+ translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomFactor)) / 2);
14549
+ var currentHeight = Math.abs(map.baseMapRectBounds['max']['y'] - map.baseMapRectBounds['min']['y']) * zoomFactor;
14550
+ translatePointX = (currentHeight < map.mapAreaRect.height) ? (size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))))
14551
+ : translatePointX;
14552
+ translatePointY = (currentHeight < map.mapAreaRect.height) ? (size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2))))
14553
+ : translatePointY;
14554
+ map.translatePoint = new Point(translatePointX, translatePointY);
14555
+ }
14221
14556
  map.zoomTranslatePoint = map.translatePoint;
14222
14557
  map.scale = zoomFactor;
14223
14558
  if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
@@ -14532,7 +14867,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
14532
14867
  x = (size.width / 2) - (toolBarSize.width / 2);
14533
14868
  break;
14534
14869
  case 'Far':
14535
- x = (size.width - toolBarSize.width) - padding;
14870
+ if (!isNullOrUndefined(map.legendModule) && map.legendSettings.position === 'Left') {
14871
+ x = size.width + size.x - toolBarSize.width - padding;
14872
+ }
14873
+ else {
14874
+ x = (size.width - toolBarSize.width) - padding;
14875
+ }
14536
14876
  break;
14537
14877
  }
14538
14878
  var extraPosition = map.getExtraPosition();
@@ -14588,6 +14928,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14588
14928
  }
14589
14929
  else {
14590
14930
  map.mapScaleValue = value - delta;
14931
+ map.isReset = (map.mapScaleValue < 1) ? true : false;
14591
14932
  map.staticMapZoom = map.tileZoomLevel;
14592
14933
  if (map.mapScaleValue === 1) {
14593
14934
  map.markerCenterLatitude = null;