@syncfusion/ej2-maps 26.1.35 → 26.2.4

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.
@@ -1605,10 +1605,10 @@ function calculateShapes(maps, shape, options, size, location, markerEle) {
1605
1605
  + ' ' + location.y + ' Z';
1606
1606
  break;
1607
1607
  case 'Star':
1608
- options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y - size.height / 2) + ' L ' + (location.x - size.width / 2)
1609
- + ' ' + (location.y + size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y + size.height / 6)
1610
- + ' L ' + (location.x - size.width / 3) + ' ' + (location.y - size.height / 2) + ' L ' + location.x + ' ' +
1611
- (location.y + size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y - size.height / 2) + ' Z';
1608
+ options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
1609
+ + ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
1610
+ + ' L ' + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
1611
+ (location.y - size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
1612
1612
  break;
1613
1613
  case 'Triangle':
1614
1614
  options.d = 'M ' + location.x + ' ' + (location.y - size.height / 2) + ' L ' + (location.x + size.width / 2) + ' ' +
@@ -1734,10 +1734,10 @@ function drawVerticalLine(maps, options, size, location, element) {
1734
1734
  * @private
1735
1735
  */
1736
1736
  function drawStar(maps, options, size, location, element) {
1737
- options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y - size.height / 2) + ' L ' + (location.x - size.width / 2)
1738
- + ' ' + (location.y + size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y + size.height / 6) + ' L '
1739
- + (location.x - size.width / 3) + ' ' + (location.y - size.height / 2) + ' L ' + location.x + ' ' + (location.y + size.height / 2)
1740
- + ' L ' + (location.x + size.width / 3) + ' ' + (location.y - size.height / 2) + ' Z';
1737
+ options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
1738
+ + ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6) + ' L '
1739
+ + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' + (location.y - size.height / 2)
1740
+ + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
1741
1741
  return appendShape(maps.renderer.drawPath(options), element);
1742
1742
  }
1743
1743
  /**
@@ -3098,10 +3098,10 @@ function renderLegendShape(location, size, shape, options, url) {
3098
3098
  merge(options, { 'd': renderPath });
3099
3099
  break;
3100
3100
  case 'Star':
3101
- renderPath = 'M ' + (location.x + size.width / 3) + ' ' + (location.y - size.height / 2) + ' L ' + (location.x - size.width / 2)
3102
- + ' ' + (location.y + size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y + size.height / 6)
3103
- + ' L ' + (location.x - size.width / 3) + ' ' + (location.y - size.height / 2) + ' L ' + location.x + ' ' +
3104
- (location.y + size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y - size.height / 2) + ' Z';
3101
+ renderPath = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
3102
+ + ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
3103
+ + ' L ' + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
3104
+ (location.y - size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
3105
3105
  merge(options, { 'd': renderPath });
3106
3106
  break;
3107
3107
  case 'Cross':
@@ -14995,34 +14995,41 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
14995
14995
  layer.shapePropertyPath : [layer.shapePropertyPath]);
14996
14996
  if (!isNullOrUndefined(properties)) {
14997
14997
  for (var k = 0; k < properties.length; k++) {
14998
- for (var i = 0; i < layer['dataSource']['length']; i++) {
14999
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15000
- var data = layer.dataSource[i];
15001
- var dataPath = (layer.shapeDataPath.indexOf('.') > -1) ?
15002
- (getValueFromObject(data, layer.shapeDataPath)) : data[layer.shapeDataPath];
15003
- var dataPathValue = !isNullOrUndefined(dataPath) && isNaN(data[layer.shapeDataPath])
15004
- ? dataPath.toLowerCase() : dataPath;
15005
- var propertyValue = !isNullOrUndefined(value[properties[k]])
15006
- && isNaN(value[properties[k]]) ? value[properties[k]].toLowerCase() :
15007
- value[properties[k]];
15008
- if (dataPathValue === propertyValue) {
15009
- isShape = true;
15010
- index = i;
15011
- k = properties.length;
15012
- break;
14998
+ if (!isNullOrUndefined(layer.dataSource)) {
14999
+ for (var i = 0; i < layer['dataSource']['length']; i++) {
15000
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15001
+ var data = layer.dataSource[i];
15002
+ var dataPath = (layer.shapeDataPath.indexOf('.') > -1) ?
15003
+ (getValueFromObject(data, layer.shapeDataPath)) : data[layer.shapeDataPath];
15004
+ var dataPathValue = !isNullOrUndefined(dataPath) && isNaN(data[layer.shapeDataPath])
15005
+ ? dataPath.toLowerCase() : dataPath;
15006
+ var propertyValue = !isNullOrUndefined(value[properties[k]])
15007
+ && isNaN(value[properties[k]]) ? value[properties[k]].toLowerCase() :
15008
+ value[properties[k]];
15009
+ if (dataPathValue === propertyValue) {
15010
+ isShape = true;
15011
+ index = i;
15012
+ k = properties.length;
15013
+ break;
15014
+ }
15013
15015
  }
15014
15016
  }
15015
15017
  }
15016
15018
  index = isShape ? index : null;
15017
- if (!isNullOrUndefined(layer.dataSource[index])) {
15018
- templateData = JSON.parse(JSON.stringify(layer.dataSource[index]));
15019
- for (keyString in value) {
15020
- // eslint-disable-next-line no-prototype-builtins
15021
- if (!templateData.hasOwnProperty(keyString)) {
15022
- templateData[keyString] = value[keyString];
15019
+ if (layer['dataSource'] && layer['dataSource']['length'] > 0) {
15020
+ if (!isNullOrUndefined(layer.dataSource[index])) {
15021
+ templateData = JSON.parse(JSON.stringify(layer.dataSource[index]));
15022
+ for (keyString in value) {
15023
+ // eslint-disable-next-line no-prototype-builtins
15024
+ if (!templateData.hasOwnProperty(keyString)) {
15025
+ templateData[keyString] = value[keyString];
15026
+ }
15023
15027
  }
15024
15028
  }
15025
15029
  }
15030
+ else {
15031
+ templateData = value;
15032
+ }
15026
15033
  }
15027
15034
  if (option.visible && ((!isNullOrUndefined(index) && !isNaN(index)) || (!isNullOrUndefined(value)))) {
15028
15035
  if (layer.tooltipSettings.format) {