@syncfusion/ej2-maps 31.2.2 → 31.2.12

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.
Files changed (67) hide show
  1. package/README.md +11 -2
  2. package/dist/ej2-maps.min.js +2 -2
  3. package/dist/ej2-maps.umd.min.js +2 -2
  4. package/dist/ej2-maps.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-maps.es2015.js +84 -53
  6. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  7. package/dist/es6/ej2-maps.es5.js +87 -56
  8. package/dist/es6/ej2-maps.es5.js.map +1 -1
  9. package/dist/global/ej2-maps.min.js +2 -2
  10. package/dist/global/ej2-maps.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +18 -53
  13. package/src/maps/layers/layer-panel.js +86 -55
  14. package/dist/ts/index.d.ts +0 -4
  15. package/dist/ts/index.ts +0 -4
  16. package/dist/ts/maps/index.d.ts +0 -28
  17. package/dist/ts/maps/index.ts +0 -28
  18. package/dist/ts/maps/layers/bing-map.d.ts +0 -21
  19. package/dist/ts/maps/layers/bing-map.ts +0 -51
  20. package/dist/ts/maps/layers/bubble.d.ts +0 -77
  21. package/dist/ts/maps/layers/bubble.ts +0 -304
  22. package/dist/ts/maps/layers/color-mapping.d.ts +0 -36
  23. package/dist/ts/maps/layers/color-mapping.ts +0 -230
  24. package/dist/ts/maps/layers/data-label.d.ts +0 -45
  25. package/dist/ts/maps/layers/data-label.ts +0 -457
  26. package/dist/ts/maps/layers/layer-panel.d.ts +0 -144
  27. package/dist/ts/maps/layers/layer-panel.ts +0 -1455
  28. package/dist/ts/maps/layers/legend.d.ts +0 -173
  29. package/dist/ts/maps/layers/legend.ts +0 -2465
  30. package/dist/ts/maps/layers/marker.d.ts +0 -105
  31. package/dist/ts/maps/layers/marker.ts +0 -632
  32. package/dist/ts/maps/layers/navigation-selected-line.d.ts +0 -33
  33. package/dist/ts/maps/layers/navigation-selected-line.ts +0 -171
  34. package/dist/ts/maps/layers/polygon.d.ts +0 -30
  35. package/dist/ts/maps/layers/polygon.ts +0 -68
  36. package/dist/ts/maps/maps-model.d.ts +0 -409
  37. package/dist/ts/maps/maps.d.ts +0 -1247
  38. package/dist/ts/maps/maps.ts +0 -3416
  39. package/dist/ts/maps/model/base-model.d.ts +0 -2107
  40. package/dist/ts/maps/model/base.d.ts +0 -1840
  41. package/dist/ts/maps/model/base.ts +0 -2257
  42. package/dist/ts/maps/model/constants.d.ts +0 -225
  43. package/dist/ts/maps/model/constants.ts +0 -226
  44. package/dist/ts/maps/model/export-image.d.ts +0 -39
  45. package/dist/ts/maps/model/export-image.ts +0 -194
  46. package/dist/ts/maps/model/export-pdf.d.ts +0 -40
  47. package/dist/ts/maps/model/export-pdf.ts +0 -183
  48. package/dist/ts/maps/model/interface.d.ts +0 -892
  49. package/dist/ts/maps/model/interface.ts +0 -929
  50. package/dist/ts/maps/model/print.d.ts +0 -45
  51. package/dist/ts/maps/model/print.ts +0 -125
  52. package/dist/ts/maps/model/theme.d.ts +0 -98
  53. package/dist/ts/maps/model/theme.ts +0 -919
  54. package/dist/ts/maps/user-interaction/annotation.d.ts +0 -27
  55. package/dist/ts/maps/user-interaction/annotation.ts +0 -133
  56. package/dist/ts/maps/user-interaction/highlight.d.ts +0 -63
  57. package/dist/ts/maps/user-interaction/highlight.ts +0 -272
  58. package/dist/ts/maps/user-interaction/selection.d.ts +0 -85
  59. package/dist/ts/maps/user-interaction/selection.ts +0 -342
  60. package/dist/ts/maps/user-interaction/tooltip.d.ts +0 -78
  61. package/dist/ts/maps/user-interaction/tooltip.ts +0 -500
  62. package/dist/ts/maps/user-interaction/zoom.d.ts +0 -334
  63. package/dist/ts/maps/user-interaction/zoom.ts +0 -2523
  64. package/dist/ts/maps/utils/enum.d.ts +0 -328
  65. package/dist/ts/maps/utils/enum.ts +0 -343
  66. package/dist/ts/maps/utils/helper.d.ts +0 -1318
  67. package/dist/ts/maps/utils/helper.ts +0 -3811
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 31.2.2
3
+ * version : 31.2.12
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. 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,53 +1,19 @@
1
1
  {
2
- "_from": "@syncfusion/ej2-maps@*",
3
- "_id": "@syncfusion/ej2-maps@31.1.1",
4
- "_inBundle": false,
5
- "_integrity": "sha512-IbeGjXXeiLdbFukZo+e2SqauaYvhhnnUUdUPap2m/VdIK1DC7Yn7BX23tzGBNIaHEz9Zc3iPXvf8EcQwHhkCVA==",
6
- "_location": "/@syncfusion/ej2-maps",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "range",
10
- "registry": true,
11
- "raw": "@syncfusion/ej2-maps@*",
12
- "name": "@syncfusion/ej2-maps",
13
- "escapedName": "@syncfusion%2fej2-maps",
14
- "scope": "@syncfusion",
15
- "rawSpec": "*",
16
- "saveSpec": null,
17
- "fetchSpec": "*"
18
- },
19
- "_requiredBy": [
20
- "/",
21
- "/@syncfusion/ej2",
22
- "/@syncfusion/ej2-angular-maps",
23
- "/@syncfusion/ej2-react-maps",
24
- "/@syncfusion/ej2-vue-maps"
25
- ],
26
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-maps/-/ej2-maps-31.1.1.tgz",
27
- "_shasum": "bf377a92730246baeaee36e9df53f94856664dfc",
28
- "_spec": "@syncfusion/ej2-maps@*",
29
- "_where": "D:\\SF3992\\WFH\\Nexus\\release",
30
- "author": {
31
- "name": "Syncfusion Inc."
32
- },
33
- "bugs": {
34
- "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/issues"
35
- },
36
- "bundleDependencies": false,
2
+ "name": "@syncfusion/ej2-maps",
3
+ "version": "31.2.12",
4
+ "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",
5
+ "author": "Syncfusion Inc.",
6
+ "license": "SEE LICENSE IN license",
37
7
  "dependencies": {
38
- "@syncfusion/ej2-base": "~31.2.2",
39
- "@syncfusion/ej2-buttons": "~31.2.2",
40
- "@syncfusion/ej2-compression": "~31.2.2",
41
- "@syncfusion/ej2-data": "~31.2.2",
42
- "@syncfusion/ej2-file-utils": "~31.2.2",
43
- "@syncfusion/ej2-pdf-export": "~31.2.2",
44
- "@syncfusion/ej2-svg-base": "~31.2.2"
8
+ "@syncfusion/ej2-base": "~31.2.12",
9
+ "@syncfusion/ej2-buttons": "~31.2.12",
10
+ "@syncfusion/ej2-compression": "~31.2.12",
11
+ "@syncfusion/ej2-data": "~31.2.12",
12
+ "@syncfusion/ej2-file-utils": "~31.2.12",
13
+ "@syncfusion/ej2-pdf-export": "~31.2.12",
14
+ "@syncfusion/ej2-svg-base": "~31.2.12"
45
15
  },
46
- "deprecated": false,
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",
48
16
  "devDependencies": {},
49
- "es2015": "./dist/es6/ej2-maps.es5.js",
50
- "homepage": "https://www.syncfusion.com/javascript-ui-controls",
51
17
  "keywords": [
52
18
  "ej2",
53
19
  "syncfusion",
@@ -84,15 +50,14 @@
84
50
  "geometry-collection",
85
51
  "feature-collection"
86
52
  ],
87
- "license": "SEE LICENSE IN license",
88
- "main": "./dist/ej2-maps.umd.min.js",
89
- "module": "./index.js",
90
- "name": "@syncfusion/ej2-maps",
91
53
  "repository": {
92
54
  "type": "git",
93
- "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
55
+ "url": "https://github.com/syncfusion/ej2-javascript-ui-controls.git"
94
56
  },
57
+ "main": "./dist/ej2-maps.umd.min.js",
58
+ "module": "./index.js",
59
+ "es2015": "./dist/es6/ej2-maps.es5.js",
95
60
  "typings": "index.d.ts",
96
- "version": "31.2.2",
97
- "sideEffects": false
61
+ "sideEffects": false,
62
+ "homepage": "https://www.syncfusion.com/javascript-ui-controls"
98
63
  }
@@ -322,35 +322,35 @@ var LayerPanel = /** @class */ (function () {
322
322
  }
323
323
  this.rectBounds = null;
324
324
  var shapeSettings = this.currentLayer.shapeSettings;
325
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
326
- Array.prototype.forEach.call(renderData, function (geometryData) {
327
- if (!isNullOrUndefined(geometryData['geometry']) || !isNullOrUndefined(geometryData['coordinates'])) {
328
- var type = !isNullOrUndefined(geometryData['geometry']) ? geometryData['geometry']['type'] : geometryData['type'];
329
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
330
- var coords = !isNullOrUndefined(geometryData['geometry']) ? geometryData['geometry']['coordinates'] :
331
- geometryData['coordinates'];
332
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
333
- var data = geometryData['geometry'];
334
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
325
+ for (var r = 0; r < renderData.length; r++) {
326
+ var geometryData = renderData[r];
327
+ var geom = geometryData['geometry'];
328
+ var hasGeom = !isNullOrUndefined(geom);
329
+ var hasCoords = !isNullOrUndefined(geometryData['coordinates']);
330
+ if (hasGeom || hasCoords) {
331
+ var type = hasGeom ? geom['type'] : geometryData['type'];
332
+ var coords = hasGeom ? geom['coordinates'] : geometryData['coordinates'];
333
+ var data = geom;
335
334
  var properties = geometryData['properties'];
336
- _this.generatePoints(type, coords, data, properties);
335
+ this.generatePoints(type, coords, data, properties);
337
336
  }
338
- });
337
+ }
339
338
  this.currentLayer.rectBounds = this.rectBounds;
340
339
  if (isNullOrUndefined(this.mapObject.baseMapRectBounds) && this.currentLayer.isBaseLayer) {
341
340
  this.mapObject.baseMapRectBounds = this.rectBounds;
342
341
  }
343
342
  var colors = (!isNullOrUndefined(shapeSettings.palette) && shapeSettings.palette.length > 1) ?
344
343
  shapeSettings.palette : getShapeColor(this.mapObject.theme);
344
+ var areaRect = this.mapObject.mapAreaRect;
345
345
  var labelTemplateEle = createElement('div', {
346
346
  id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_Label_Template_Group',
347
347
  className: this.mapObject.element.id + '_template'
348
348
  });
349
349
  labelTemplateEle.style.cssText = 'pointer-events: none; overflow: hidden; position: absolute;' +
350
- 'top:' + this.mapObject.mapAreaRect.y + 'px;' +
351
- 'left:' + this.mapObject.mapAreaRect.x + 'px;' +
352
- 'height:' + this.mapObject.mapAreaRect.height + 'px;' +
353
- 'width:' + this.mapObject.mapAreaRect.width + 'px;';
350
+ 'top:' + areaRect.y + 'px;' +
351
+ 'left:' + areaRect.x + 'px;' +
352
+ 'height:' + areaRect.height + 'px;' +
353
+ 'width:' + areaRect.width + 'px;';
354
354
  if (this.currentLayer.layerData.length !== 0) {
355
355
  var _loop_1 = function (i) {
356
356
  var k = void 0;
@@ -395,11 +395,12 @@ var LayerPanel = /** @class */ (function () {
395
395
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
396
396
  this_1.currentLayer.dataSource, currentShapeData['property'], this_1.currentLayer.shapeDataPath, this_1.currentLayer.shapePropertyPath, this_1.currentLayer);
397
397
  if (k !== null) {
398
- if (this_1.currentLayer.dataSource[k][shapeSettings.borderColorValuePath]) {
399
- borderValue.color = this_1.currentLayer.dataSource[k][shapeSettings.borderColorValuePath];
398
+ var currentDataSource = this_1.currentLayer.dataSource[k];
399
+ if (currentDataSource[shapeSettings.borderColorValuePath]) {
400
+ borderValue.color = currentDataSource[shapeSettings.borderColorValuePath];
400
401
  }
401
- if (this_1.currentLayer.dataSource[k][shapeSettings.borderWidthValuePath]) {
402
- borderValue.width = this_1.currentLayer.dataSource[k][shapeSettings.borderWidthValuePath];
402
+ if (currentDataSource[shapeSettings.borderWidthValuePath]) {
403
+ borderValue.width = currentDataSource[shapeSettings.borderWidthValuePath];
403
404
  }
404
405
  }
405
406
  }
@@ -462,17 +463,26 @@ var LayerPanel = /** @class */ (function () {
462
463
  switch (drawingType) {
463
464
  case 'Polygon':
464
465
  if (!currentShapeData['_isMultiPolygon']) {
465
- path += 'M' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
466
466
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
467
- currentShapeData.map(function (shapeData) {
468
- path += ' L ' + (shapeData['point']['x']) + ' ' + (shapeData['point']['y']);
469
- });
467
+ var shapeData = currentShapeData;
468
+ if (shapeData.length > 0) {
469
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
470
+ var firstPoint = shapeData[0]['point'];
471
+ var pathSegments = ['M', String(firstPoint['x']), String(firstPoint['y'])];
472
+ for (var index = 0; index < shapeData.length; index++) {
473
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
474
+ var point = shapeData[index]['point'];
475
+ pathSegments.push('L', String(point['x']), String(point['y']));
476
+ }
477
+ pathSegments.push('z');
478
+ path = pathSegments.join(' ');
479
+ }
470
480
  }
471
481
  else {
472
482
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
473
483
  path = _this.generateMultiPolygonPath(currentShapeData);
484
+ path += ' z ';
474
485
  }
475
- path += ' z ';
476
486
  if (path.length > 3) {
477
487
  pathOptions = new PathOption(shapeID, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
478
488
  pathEle = _this.mapObject.renderer.drawPath(pathOptions);
@@ -700,19 +710,22 @@ var LayerPanel = /** @class */ (function () {
700
710
  */
701
711
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
702
712
  LayerPanel.prototype.generateMultiPolygonPath = function (currentShapeData) {
703
- var path = '';
704
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
705
- var shape;
706
- for (var j = 0; j < currentShapeData.length; j++) {
707
- path += 'M' + (currentShapeData[j][0]['point']['x']) + ' ' + (currentShapeData[j][0]['point']['y']);
708
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
709
- shape = currentShapeData[j];
710
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
711
- shape.map(function (shapeData) {
712
- path += ' L ' + (shapeData['point']['x']) + ' ' + (shapeData['point']['y']);
713
- });
713
+ var parts = [];
714
+ for (var _i = 0, currentShapeData_1 = currentShapeData; _i < currentShapeData_1.length; _i++) {
715
+ var shape = currentShapeData_1[_i];
716
+ if (!shape || shape.length === 0) {
717
+ continue;
718
+ }
719
+ var startX = shape[0].point.x;
720
+ var startY = shape[0].point.y;
721
+ parts.push("M" + startX + " " + startY);
722
+ for (var i = 1; i < shape.length; i++) {
723
+ var x = shape[i].point.x;
724
+ var y = shape[i].point.y;
725
+ parts.push(" L " + x + " " + y);
726
+ }
714
727
  }
715
- return path;
728
+ return parts.join(' ');
716
729
  };
717
730
  /**
718
731
  * To render bubble.
@@ -1038,33 +1051,51 @@ var LayerPanel = /** @class */ (function () {
1038
1051
  };
1039
1052
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1040
1053
  LayerPanel.prototype.calculatePolygonBox = function (coordinates) {
1041
- var _this = this;
1054
+ // Use a simple for-loop, cache frequent lookups, and update rectBounds once
1042
1055
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1043
1056
  var newData = [];
1044
1057
  var bounds = this.mapObject.baseMapBounds;
1045
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1046
- coordinates.map(function (currentPoint) {
1058
+ var lonMin = bounds.longitude.min;
1059
+ var lonMax = bounds.longitude.max;
1060
+ var latMin = bounds.latitude.min;
1061
+ var latMax = bounds.latitude.max;
1062
+ var minX;
1063
+ var minY;
1064
+ var maxX;
1065
+ var maxY;
1066
+ for (var i = 0; i < coordinates.length; i++) {
1067
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1068
+ var currentPoint = coordinates[i];
1047
1069
  var latitude = currentPoint[1];
1048
1070
  var longitude = currentPoint[0];
1049
- if ((longitude >= bounds.longitude.min && longitude <= bounds.longitude.max)
1050
- && (latitude >= bounds.latitude.min && latitude <= bounds.latitude.max)) {
1051
- var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
1052
- if (isNullOrUndefined(_this.rectBounds)) {
1053
- _this.rectBounds = { min: { x: point.x, y: point.y }, max: { x: point.x, y: point.y } };
1071
+ if (longitude >= lonMin && longitude <= lonMax && latitude >= latMin && latitude <= latMax) {
1072
+ var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
1073
+ if (minX === undefined) {
1074
+ minX = maxX = point.x;
1075
+ minY = maxY = point.y;
1054
1076
  }
1055
1077
  else {
1056
- _this.rectBounds['min']['x'] = Math.min(_this.rectBounds['min']['x'], point.x);
1057
- _this.rectBounds['min']['y'] = Math.min(_this.rectBounds['min']['y'], point.y);
1058
- _this.rectBounds['max']['x'] = Math.max(_this.rectBounds['max']['x'], point.x);
1059
- _this.rectBounds['max']['y'] = Math.max(_this.rectBounds['max']['y'], point.y);
1078
+ // Update local bounds only
1079
+ minX = Math.min(minX, point.x);
1080
+ minY = Math.min(minY, point.y);
1081
+ maxX = Math.max(maxX, point.x);
1082
+ maxY = Math.max(maxY, point.y);
1060
1083
  }
1061
- newData.push({
1062
- point: point,
1063
- lat: latitude,
1064
- lng: longitude
1065
- });
1084
+ newData.push({ point: point, lat: latitude, lng: longitude });
1066
1085
  }
1067
- });
1086
+ }
1087
+ // Apply the accumulated bounds once to reduce repeated property access
1088
+ if (newData.length) {
1089
+ if (isNullOrUndefined(this.rectBounds)) {
1090
+ this.rectBounds = { min: { x: minX, y: minY }, max: { x: maxX, y: maxY } };
1091
+ }
1092
+ else {
1093
+ this.rectBounds.min.x = Math.min(this.rectBounds.min.x, minX);
1094
+ this.rectBounds.min.y = Math.min(this.rectBounds.min.y, minY);
1095
+ this.rectBounds.max.x = Math.max(this.rectBounds.max.x, maxX);
1096
+ this.rectBounds.max.y = Math.max(this.rectBounds.max.y, maxY);
1097
+ }
1098
+ }
1068
1099
  return newData;
1069
1100
  };
1070
1101
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1,4 +0,0 @@
1
- /**
2
- * exporting all modules from maps index
3
- */
4
- export * from './maps/index';
package/dist/ts/index.ts DELETED
@@ -1,4 +0,0 @@
1
- /**
2
- * exporting all modules from maps index
3
- */
4
- export * from './maps/index';
@@ -1,28 +0,0 @@
1
- /**
2
- * export all modules from maps component
3
- */
4
- export * from './maps';
5
- export * from './maps-model';
6
- export * from './model/interface';
7
- export * from './model/constants';
8
- export * from './model/base';
9
- export * from './model/base-model';
10
- export * from './utils/enum';
11
- export * from './utils/helper';
12
- export * from './layers/layer-panel';
13
- export * from './layers/bubble';
14
- export * from './layers/bing-map';
15
- export * from './layers/marker';
16
- export * from './layers/polygon';
17
- export * from './layers/color-mapping';
18
- export * from './layers/data-label';
19
- export * from './layers/navigation-selected-line';
20
- export * from './layers/legend';
21
- export * from './user-interaction/highlight';
22
- export * from './user-interaction/selection';
23
- export * from './user-interaction/tooltip';
24
- export * from './user-interaction/zoom';
25
- export * from './user-interaction/annotation';
26
- export * from './model/print';
27
- export * from './model/export-image';
28
- export * from './model/export-pdf';
@@ -1,28 +0,0 @@
1
- /**
2
- * export all modules from maps component
3
- */
4
- export * from './maps';
5
- export * from './maps-model';
6
- export * from './model/interface';
7
- export * from './model/constants';
8
- export * from './model/base';
9
- export * from './model/base-model';
10
- export * from './utils/enum';
11
- export * from './utils/helper';
12
- export * from './layers/layer-panel';
13
- export * from './layers/bubble';
14
- export * from './layers/bing-map';
15
- export * from './layers/marker';
16
- export * from './layers/polygon';
17
- export * from './layers/color-mapping';
18
- export * from './layers/data-label';
19
- export * from './layers/navigation-selected-line';
20
- export * from './layers/legend';
21
- export * from './user-interaction/highlight';
22
- export * from './user-interaction/selection';
23
- export * from './user-interaction/tooltip';
24
- export * from './user-interaction/zoom';
25
- export * from './user-interaction/annotation';
26
- export * from './model/print';
27
- export * from './model/export-image';
28
- export * from './model/export-pdf';
@@ -1,21 +0,0 @@
1
- import { Maps } from '../maps';
2
- import { Tile } from '../index';
3
- /**
4
- * Bing map src doc
5
- */
6
- export declare class BingMap {
7
- /**
8
- * map instance
9
- */
10
- private maps;
11
- subDomains: string[];
12
- imageUrl: string;
13
- maxZoom: string;
14
- constructor(maps: Maps);
15
- getBingMap(tile: Tile, key: string, type: string, language: string, imageUrl: string, subDomains: string[]): string;
16
- /**
17
- * @returns {void}
18
- * @private
19
- */
20
- destroy(): void;
21
- }
@@ -1,51 +0,0 @@
1
- import { Maps } from '../maps';
2
- import { Tile } from '../index';
3
- import { isNullOrUndefined } from '@syncfusion/ej2-base';
4
-
5
- /**
6
- * Bing map src doc
7
- */
8
- export class BingMap {
9
- /**
10
- * map instance
11
- */
12
- private maps: Maps;
13
- public subDomains: string[];
14
- public imageUrl: string;
15
- public maxZoom: string;
16
- constructor(maps: Maps) {
17
- this.maps = maps;
18
- }
19
-
20
- public getBingMap(tile: Tile, key: string, type: string, language: string, imageUrl: string, subDomains: string[]): string {
21
- let quadKey: string = '';
22
- const maxZoom: number = Math.min(this.maps.tileZoomLevel, parseInt(this.maxZoom, 10));
23
- for (let i: number = maxZoom; i > 0; i--) {
24
- let digit: number = 0;
25
- const mask: number = 1 << (i - 1);
26
- if ((tile.x & mask) !== 0) {
27
- digit++;
28
- }
29
- if ((tile.y & mask) !== 0) {
30
- digit += 2;
31
- }
32
- quadKey = quadKey + '' + digit;
33
- }
34
- if (!isNullOrUndefined(subDomains)) {
35
- const subDomain: string = subDomains[Math.min(parseInt(quadKey.substr(quadKey.length - 1, 1), 10), subDomains.length)];
36
- imageUrl = imageUrl.replace('{quadkey}', quadKey).replace('{subdomain}', subDomain);
37
- return imageUrl += '&mkt=' + language + '&ur=IN&Key=' + key;
38
- } else {
39
- return '';
40
- }
41
- }
42
-
43
- /**
44
- * @returns {void}
45
- * @private
46
- */
47
- public destroy(): void {
48
- this.maps = null;
49
- this.subDomains = [];
50
- }
51
- }
@@ -1,77 +0,0 @@
1
- import { Maps } from '../../index';
2
- import { BubbleSettingsModel } from '../index';
3
- import { LayerSettings } from '../index';
4
- /**
5
- * Bubble module class
6
- */
7
- export declare class Bubble {
8
- private maps;
9
- /** @private */
10
- bubbleCollection: object[];
11
- /**
12
- * Bubble Id for current layer
13
- *
14
- * @private
15
- */
16
- id: string;
17
- constructor(maps: Maps);
18
- /**
19
- * To render bubble
20
- *
21
- * @param {BubbleSettingsModel} bubbleSettings - Specifies the bubble data to be rendered
22
- * @param {object} shapeData - Specifies the data about the shape
23
- * @param {string} color - Specifies the color of the bubble
24
- * @param {number} range - Specifies the range of the bubble
25
- * @param {number} range.min - Specifies the minimum range of the bubble
26
- * @param {number} range.max - Specifies the maximum range of the bubble
27
- * @param {number} bubbleIndex - Specifies the index of the bubble
28
- * @param {number} dataIndex - Specifies the index of the data
29
- * @param {number} layerIndex - Specifies the index of the layer
30
- * @param {LayerSettings} layer - Specifies the layer data
31
- * @param {Element} group - Specifies the element group
32
- * @param {string} bubbleID - Specifies the ID of the bubble
33
- * @returns {void}
34
- * @private
35
- */
36
- renderBubble(bubbleSettings: BubbleSettingsModel, shapeData: object, color: string, range: {
37
- min: number;
38
- max: number;
39
- }, bubbleIndex: number, dataIndex: number, layerIndex: number, layer: LayerSettings, group: Element, bubbleID?: string): void;
40
- private getPoints;
41
- /**
42
- * To check and trigger bubble click event.
43
- *
44
- * @param {PointerEvent} e - Specifies the pointer event argument.
45
- * @returns {void}
46
- * @private
47
- */
48
- bubbleClick(e: PointerEvent): void;
49
- /**
50
- * To get bubble from target id.
51
- *
52
- * @param {string} target - Specifies the target
53
- * @returns {object} - Returns the object
54
- */
55
- private getbubble;
56
- /**
57
- * To check and trigger bubble move event.
58
- *
59
- * @param {PointerEvent} e - Specifies the pointer event argument.
60
- * @retruns {void}
61
- * @private
62
- */
63
- bubbleMove(e: PointerEvent): void;
64
- /**
65
- * Get module name.
66
- *
67
- * @returns {string} - Returns the module name.
68
- */
69
- protected getModuleName(): string;
70
- /**
71
- * To destroy the bubble.
72
- *
73
- * @returns {void}
74
- * @private
75
- */
76
- destroy(): void;
77
- }