@syncfusion/ej2-maps 31.2.12 → 32.1.21

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.
@@ -6364,14 +6364,19 @@ class LayerPanel {
6364
6364
  this.rectBounds = null;
6365
6365
  const shapeSettings = this.currentLayer.shapeSettings;
6366
6366
  for (let r = 0; r < renderData.length; r++) {
6367
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6367
6368
  const geometryData = renderData[r];
6369
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6368
6370
  const geom = geometryData['geometry'];
6369
6371
  const hasGeom = !isNullOrUndefined(geom);
6370
6372
  const hasCoords = !isNullOrUndefined(geometryData['coordinates']);
6371
6373
  if (hasGeom || hasCoords) {
6372
6374
  const type = hasGeom ? geom['type'] : geometryData['type'];
6375
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6373
6376
  const coords = hasGeom ? geom['coordinates'] : geometryData['coordinates'];
6377
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6374
6378
  const data = geom;
6379
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6375
6380
  const properties = geometryData['properties'];
6376
6381
  this.generatePoints(type, coords, data, properties);
6377
6382
  }
@@ -6436,6 +6441,7 @@ class LayerPanel {
6436
6441
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6437
6442
  this.currentLayer.dataSource, currentShapeData['property'], this.currentLayer.shapeDataPath, this.currentLayer.shapePropertyPath, this.currentLayer);
6438
6443
  if (k !== null) {
6444
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6439
6445
  const currentDataSource = this.currentLayer.dataSource[k];
6440
6446
  if (currentDataSource[shapeSettings.borderColorValuePath]) {
6441
6447
  borderValue.color = currentDataSource[shapeSettings.borderColorValuePath];
@@ -13584,15 +13590,23 @@ class Legend {
13584
13590
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13585
13591
  Array.prototype.forEach.call(dataSource, (data, dataIndex) => {
13586
13592
  range = false;
13587
- const rangeValue = data[colorValuePath];
13593
+ const colorValue = data[colorValuePath];
13594
+ const isEmpty = colorValue === '' || isNullOrUndefined(colorValue);
13595
+ const rangeValue = !isEmpty ? Number(colorValue) : NaN;
13596
+ const hasNumeric = !isEmpty && Number.isFinite(rangeValue);
13597
+ const equalValue = !isEmpty ? colorValue : null;
13588
13598
  for (let z = 0; z < colorMapping.length; z++) {
13589
- if (!isNullOrUndefined(rangeValue) && !isNaN(rangeValue)) {
13590
- if (rangeValue >= colorMapping[z].from && rangeValue <= colorMapping[z].to) {
13599
+ const colorMap = colorMapping[z];
13600
+ if (hasNumeric && !isNaN(rangeValue) && colorMap.from != null && colorMap.to != null) {
13601
+ if (rangeValue >= colorMap.from && rangeValue <= colorMap.to) {
13591
13602
  range = true;
13603
+ break;
13592
13604
  }
13593
13605
  }
13594
- else if (!range) {
13595
- range = false;
13606
+ else if (!hasNumeric && equalValue !== null && !isNullOrUndefined(colorMap.value)
13607
+ && equalValue === colorMap.value) {
13608
+ range = true;
13609
+ break;
13596
13610
  }
13597
13611
  }
13598
13612
  if (!range) {