@syncfusion/ej2-maps 28.1.38 → 28.2.5

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 28.1.38
3
+ * version : 28.2.5
4
4
  * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-maps@*",
3
- "_id": "@syncfusion/ej2-maps@28.1.33",
3
+ "_id": "@syncfusion/ej2-maps@28.2.3",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-RoBTQ5CdBlhsbZvklDAQgXOe1n7XdJfgMDwvwirF20yH+VIco5JJ1SLetO9X0k44KrznXpXzDvEvAaWl9DKavg==",
5
+ "_integrity": "sha512-rZziAFgCWk6q099arl9zJo7ZZjDqTeyscGAw9LgtN7netyQPE2Vif1K672XryILtoIDp+NyPTJ6LCT2C0/MdHA==",
6
6
  "_location": "/@syncfusion/ej2-maps",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-maps",
24
24
  "/@syncfusion/ej2-vue-maps"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-28.1.33.tgz",
27
- "_shasum": "e82de8f17740f0d7fa03ba657be051242e338c59",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-28.2.3.tgz",
27
+ "_shasum": "f5892863e5c44c39f076ad37c633eb8de71c05c5",
28
28
  "_spec": "@syncfusion/ej2-maps@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
30
30
  "author": {
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~28.1.33",
39
- "@syncfusion/ej2-buttons": "~28.1.37",
40
- "@syncfusion/ej2-compression": "~28.1.33",
41
- "@syncfusion/ej2-data": "~28.1.33",
42
- "@syncfusion/ej2-file-utils": "~28.1.33",
43
- "@syncfusion/ej2-pdf-export": "~28.1.38",
44
- "@syncfusion/ej2-svg-base": "~28.1.37"
38
+ "@syncfusion/ej2-base": "~28.2.5",
39
+ "@syncfusion/ej2-buttons": "~28.2.3",
40
+ "@syncfusion/ej2-compression": "~28.2.3",
41
+ "@syncfusion/ej2-data": "~28.2.3",
42
+ "@syncfusion/ej2-file-utils": "~28.2.3",
43
+ "@syncfusion/ej2-pdf-export": "~28.2.3",
44
+ "@syncfusion/ej2-svg-base": "~28.2.3"
45
45
  },
46
46
  "deprecated": false,
47
47
  "description": "The Maps component is used to visualize the geographical data and represent the statistical data of a particular geographical area on earth with user interactivity, and provides various customizing options",
@@ -93,6 +93,6 @@
93
93
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
94
94
  },
95
95
  "typings": "index.d.ts",
96
- "version": "28.1.38",
96
+ "version": "28.2.5",
97
97
  "sideEffects": false
98
98
  }
@@ -200,7 +200,7 @@ var Legend = /** @class */ (function () {
200
200
  else {
201
201
  legendText = '';
202
202
  }
203
- if (legend.position === 'Left' || legend.position === 'Right') {
203
+ if (legend.position === 'Left' || legend.position === 'Right' || legend.position === 'Float') {
204
204
  for (var i_1 = 0; i_1 < this.legendCollection.length; i_1++) {
205
205
  var legendItem = this.legendCollection[i_1];
206
206
  var legendTextSize = measureText(legendItem['text'], legend.textStyle);
@@ -1375,8 +1375,12 @@ var Legend = /** @class */ (function () {
1375
1375
  var areaWidth = totalRect.width;
1376
1376
  var totalWidth = map.availableSize.width;
1377
1377
  var totalHeight = map.availableSize.height;
1378
- var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
1379
- var locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
1378
+ var locationX = !isNullOrUndefined(legend.location.x) ? (typeof (legend.location.x) === 'string' &&
1379
+ legend.location.x.indexOf('%') > -1 ? (map.availableSize.width / 100) * parseFloat(legend.location.x) :
1380
+ typeof (legend.location.x) === 'string' ? parseFloat(legend.location.x) : legend.location.x) : 0;
1381
+ var locationY = !isNullOrUndefined(legend.location.y) ? (typeof (legend.location.y) === 'string' &&
1382
+ legend.location.y.indexOf('%') > -1 ? (map.availableSize.height / 100) * parseFloat(legend.location.y) :
1383
+ typeof (legend.location.y) === 'string' ? parseFloat(legend.location.y) : legend.location.y) : 0;
1380
1384
  if (legend.position === 'Float') {
1381
1385
  this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) :
1382
1386
  new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
@@ -1,4 +1,4 @@
1
- import { Property, ChildProperty, Complex, Collection } from '@syncfusion/ej2-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { Alignment, LegendPosition, LegendType, LegendMode, Type, MarkerType, Orientation, MapAjax } from '../../index';import { SmartLabelMode, IntersectAction } from '../../index';import { Theme } from './theme';import { Point, GeoLocation, Coordinate } from '../utils/helper';import { LegendArrangement, LegendShape, BubbleType, ToolbarItem } from '../utils/enum';import { AnnotationAlignment, GeometryType, LabelPosition, LabelIntersectAction } from '../index';
1
+ import { Property, ChildProperty, Complex, Collection } from '@syncfusion/ej2-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { Alignment, LegendPosition, LegendType, LegendMode, Type, MarkerType, Orientation, MapAjax } from '../../index';import { SmartLabelMode, IntersectAction } from '../../index';import { Theme } from './theme';import { Point, GeoLocation, Coordinate, RelativePoint } from '../utils/helper';import { LegendArrangement, LegendShape, BubbleType, ToolbarItem } from '../utils/enum';import { AnnotationAlignment, GeometryType, LabelPosition, LabelIntersectAction } from '../index';
2
2
 
3
3
  /**
4
4
  * Interface for a class Annotation
@@ -1498,7 +1498,7 @@ export interface LegendSettingsModel {
1498
1498
  /**
1499
1499
  * Gets or sets the location of the legend in pixels when the legend position is set as `Float`.
1500
1500
  */
1501
- location?: Point;
1501
+ location?: RelativePoint | Point;
1502
1502
 
1503
1503
  /**
1504
1504
  * Gets or sets the color of the legend in maps.
@@ -10,7 +10,7 @@ import { MarkerSettingsModel, MarkerClusterSettingsModel, ShapeSettingsModel, Bu
10
10
  import { DataLabelSettingsModel, TooltipSettingsModel, SubTitleSettingsModel, SelectionSettingsModel, PolygonSettingModel } from './base-model';
11
11
  import { HighlightSettingsModel, ToggleLegendSettingsModel, ConnectorLineSettingsModel, PolygonTooltipSettingsModel } from './base-model';
12
12
  import { InitialShapeSelectionSettingsModel, InitialMarkerSelectionSettingsModel, ZoomToolbarSettingsModel, ZoomToolbarButtonSettingsModel } from './base-model';
13
- import { Point, GeoLocation, Coordinate } from '../utils/helper';
13
+ import { Point, GeoLocation, Coordinate, RelativePoint } from '../utils/helper';
14
14
  import { LegendArrangement, LegendShape, BubbleType, ToolbarItem } from '../utils/enum';
15
15
  import { AnnotationAlignment, GeometryType, LabelPosition, LabelIntersectAction } from '../index';
16
16
  /**
@@ -1299,7 +1299,7 @@ export declare class LegendSettings extends ChildProperty<LegendSettings> {
1299
1299
  /**
1300
1300
  * Gets or sets the location of the legend in pixels when the legend position is set as `Float`.
1301
1301
  */
1302
- location: Point;
1302
+ location: RelativePoint | Point;
1303
1303
  /**
1304
1304
  * Gets or sets the color of the legend in maps.
1305
1305
  *
@@ -66,7 +66,6 @@ var Zoom = /** @class */ (function () {
66
66
  map.markerZoomedState = map.isMarkerZoomCompleted = false;
67
67
  map.zoomPersistence = map.enablePersistence;
68
68
  var prevLevel = map.tileZoomLevel;
69
- var scale = map.previousScale = map.scale;
70
69
  var maxZoom = map.zoomSettings.maxZoom;
71
70
  var minZoom = map.zoomSettings.minZoom;
72
71
  newZoomFactor = maxZoom >= newZoomFactor ? newZoomFactor : maxZoom;
@@ -80,6 +79,7 @@ var Zoom = /** @class */ (function () {
80
79
  break;
81
80
  }
82
81
  if (isToolbarPerform) {
82
+ var scale = map.previousScale = map.scale;
83
83
  var prevTilePoint = map.tileTranslatePoint;
84
84
  if ((!map.isTileMap) && ((type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)
85
85
  || map.isReset)) {
@@ -184,6 +184,22 @@ export declare class Point {
184
184
  y: number;
185
185
  constructor(x: number, y: number);
186
186
  }
187
+ /**
188
+ * Specifies the position of the legend on the map, with options to set the
189
+ * position values as percentages. The legend is placed relative to the Maps,
190
+ * ensuring responsiveness.
191
+ */
192
+ export declare class RelativePoint {
193
+ /**
194
+ * Defines the horizontal position of the legend as a percentage.
195
+ */
196
+ x: string;
197
+ /**
198
+ * Defines the vertical position of the legend as a percentage.
199
+ */
200
+ y: string;
201
+ constructor(x: string, y: string);
202
+ }
187
203
  /**
188
204
  * Defines the latitude and longitude values that define a map location.
189
205
  */
@@ -389,6 +389,19 @@ var Point = /** @class */ (function () {
389
389
  return Point;
390
390
  }());
391
391
  export { Point };
392
+ /**
393
+ * Specifies the position of the legend on the map, with options to set the
394
+ * position values as percentages. The legend is placed relative to the Maps,
395
+ * ensuring responsiveness.
396
+ */
397
+ var RelativePoint = /** @class */ (function () {
398
+ function RelativePoint(x, y) {
399
+ this.x = x;
400
+ this.y = y;
401
+ }
402
+ return RelativePoint;
403
+ }());
404
+ export { RelativePoint };
392
405
  /**
393
406
  * Defines the latitude and longitude values that define a map location.
394
407
  */
@@ -1352,7 +1365,7 @@ export function mergeSeparateCluster(sameMarkerData, maps) {
1352
1365
  var markerEle;
1353
1366
  var markerDataLength = sameMarkerData[0].data.length;
1354
1367
  for (var i = 0; i < markerDataLength; i++) {
1355
- markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1368
+ markerEle = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1356
1369
  markerEle['style']['visibility'] = 'hidden';
1357
1370
  if (markerEle.id.indexOf('Group') > -1) {
1358
1371
  var marker_1 = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
@@ -1389,7 +1402,7 @@ export function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1389
1402
  var clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
1390
1403
  clusterEle.setAttribute('visibility', 'hidden');
1391
1404
  clusterEleLabel.setAttribute('visibility', 'hidden');
1392
- var markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1405
+ var markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1393
1406
  var height = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().height : marker.height;
1394
1407
  var width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
1395
1408
  var centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
@@ -1426,7 +1439,7 @@ export function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1426
1439
  var x1 = centerX + radius * Math.sin((Math.PI * 2 * newAngle) / 360);
1427
1440
  var y1 = centerY + radius * Math.cos((Math.PI * 2 * newAngle) / 360);
1428
1441
  path += start + 'L ' + (x1) + ' ' + y1 + ' ';
1429
- markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1442
+ markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1430
1443
  if (markerEle.parentElement.id.indexOf('Template_Group') > -1) {
1431
1444
  markerEle['style']['transform'] = '';
1432
1445
  markerEle['style']['left'] = maps.isTileMap ? x1 - (width / 2) + 'px' : (x1 - (width / 2) - 10) + 'px';