@syncfusion/ej2-maps 20.2.43 → 20.3.47

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 (45) hide show
  1. package/CHANGELOG.md +19 -2
  2. package/dist/ej2-maps.min.js +10 -0
  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 +317 -258
  6. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  7. package/dist/es6/ej2-maps.es5.js +321 -263
  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 +13 -13
  13. package/src/maps/layers/bing-map.d.ts +4 -0
  14. package/src/maps/layers/bing-map.js +7 -0
  15. package/src/maps/layers/bubble.d.ts +1 -2
  16. package/src/maps/layers/bubble.js +4 -5
  17. package/src/maps/layers/data-label.d.ts +1 -4
  18. package/src/maps/layers/data-label.js +13 -15
  19. package/src/maps/layers/layer-panel.d.ts +5 -0
  20. package/src/maps/layers/layer-panel.js +28 -5
  21. package/src/maps/layers/legend.d.ts +1 -2
  22. package/src/maps/layers/legend.js +26 -5
  23. package/src/maps/layers/marker.d.ts +2 -4
  24. package/src/maps/layers/marker.js +44 -44
  25. package/src/maps/layers/navigation-selected-line.d.ts +1 -2
  26. package/src/maps/layers/navigation-selected-line.js +7 -13
  27. package/src/maps/maps.js +18 -9
  28. package/src/maps/model/export-image.d.ts +2 -4
  29. package/src/maps/model/export-image.js +19 -27
  30. package/src/maps/model/export-pdf.d.ts +4 -6
  31. package/src/maps/model/export-pdf.js +22 -30
  32. package/src/maps/model/interface.d.ts +8 -0
  33. package/src/maps/model/print.d.ts +2 -5
  34. package/src/maps/model/print.js +15 -23
  35. package/src/maps/user-interaction/annotation.d.ts +1 -2
  36. package/src/maps/user-interaction/annotation.js +2 -3
  37. package/src/maps/user-interaction/highlight.d.ts +1 -2
  38. package/src/maps/user-interaction/highlight.js +3 -5
  39. package/src/maps/user-interaction/selection.d.ts +1 -2
  40. package/src/maps/user-interaction/selection.js +3 -5
  41. package/src/maps/user-interaction/tooltip.d.ts +1 -4
  42. package/src/maps/user-interaction/tooltip.js +7 -2
  43. package/src/maps/user-interaction/zoom.d.ts +2 -7
  44. package/src/maps/user-interaction/zoom.js +83 -66
  45. package/src/maps/utils/helper.js +22 -11
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.2.43
3
+ * version : 20.3.47
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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@20.2.38",
3
+ "_id": "@syncfusion/ej2-maps@16.39.2",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-UOiAGl0YecIdQ6KMk4w6Snl5FbAew3Sh5xIc4USb02ifGE0COIbTJRiVX3f6SwX5nN46OjfTrXdoKRsaP7ghCw==",
5
+ "_integrity": "sha512-wd2+ymrFzw6zBd2nH3Zl4MtTYFgp0nzEDl427hMvgwzYVOghAc/GW4NG1LpTGHtUDswjvAaYBFbY3057/sRhmA==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-20.2.38.tgz",
27
- "_shasum": "1dc693b859a8fa576e66143e1a9bc74162d316e2",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-maps/-/ej2-maps-16.39.2.tgz",
27
+ "_shasum": "3a372223d810b5637078aa09e45b00a5298c344d",
28
28
  "_spec": "@syncfusion/ej2-maps@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,18 +35,18 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.2.43",
39
- "@syncfusion/ej2-buttons": "~20.2.43",
40
- "@syncfusion/ej2-compression": "~20.2.43",
41
- "@syncfusion/ej2-data": "~20.2.43",
42
- "@syncfusion/ej2-file-utils": "~20.2.43",
43
- "@syncfusion/ej2-pdf-export": "~20.2.43",
44
- "@syncfusion/ej2-svg-base": "~20.2.43"
38
+ "@syncfusion/ej2-base": "~20.3.47",
39
+ "@syncfusion/ej2-buttons": "~20.3.47",
40
+ "@syncfusion/ej2-compression": "~20.3.47",
41
+ "@syncfusion/ej2-data": "~20.3.47",
42
+ "@syncfusion/ej2-file-utils": "~20.3.47",
43
+ "@syncfusion/ej2-pdf-export": "~20.3.47",
44
+ "@syncfusion/ej2-svg-base": "~20.3.47"
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",
48
48
  "devDependencies": {},
49
- "es2015": "./dist/es6/ej2-maps.es2015.js",
49
+ "es2015": "./dist/es6/ej2-maps.es5.js",
50
50
  "homepage": "https://github.com/syncfusion/ej2-javascript-ui-controls#readme",
51
51
  "keywords": [
52
52
  "ej2",
@@ -80,6 +80,6 @@
80
80
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
81
81
  },
82
82
  "typings": "index.d.ts",
83
- "version": "20.2.43",
83
+ "version": "20.3.47",
84
84
  "sideEffects": false
85
85
  }
@@ -13,4 +13,8 @@ export declare class BingMap {
13
13
  maxZoom: string;
14
14
  constructor(maps: Maps);
15
15
  getBingMap(tile: Tile, key: string, type: BingMapType, language: string, imageUrl: string, subDomains: string[]): string;
16
+ /**
17
+ * @private
18
+ */
19
+ destroy(): void;
16
20
  }
@@ -29,6 +29,13 @@ var BingMap = /** @class */ (function () {
29
29
  return '';
30
30
  }
31
31
  };
32
+ /**
33
+ * @private
34
+ */
35
+ BingMap.prototype.destroy = function () {
36
+ this.maps = null;
37
+ this.subDomains = [];
38
+ };
32
39
  return BingMap;
33
40
  }());
34
41
  export { BingMap };
@@ -50,9 +50,8 @@ export declare class Bubble {
50
50
  /**
51
51
  * To destroy the bubble.
52
52
  *
53
- * @param {Maps} maps - Specifies the instance of the maps.
54
53
  * @returns {void}
55
54
  * @private
56
55
  */
57
- destroy(maps: Maps): void;
56
+ destroy(): void;
58
57
  }
@@ -267,14 +267,13 @@ var Bubble = /** @class */ (function () {
267
267
  /**
268
268
  * To destroy the bubble.
269
269
  *
270
- * @param {Maps} maps - Specifies the instance of the maps.
271
270
  * @returns {void}
272
271
  * @private
273
272
  */
274
- Bubble.prototype.destroy = function (maps) {
275
- /**
276
- * Destroy method performed here
277
- */
273
+ Bubble.prototype.destroy = function () {
274
+ this.bubbleCollection = [];
275
+ //TODO: Calling the below code throws spec issue.
276
+ //this.maps = null;
278
277
  };
279
278
  return Bubble;
280
279
  }());
@@ -5,7 +5,6 @@ import { LayerSettings } from '../index';
5
5
  */
6
6
  export declare class DataLabel {
7
7
  private maps;
8
- private dataLabelObject;
9
8
  /**
10
9
  * Datalabel collections
11
10
  *
@@ -37,11 +36,9 @@ export declare class DataLabel {
37
36
  */
38
37
  protected getModuleName(): string;
39
38
  /**
40
- * To destroy the layers.
41
39
  *
42
- * @param {Maps} maps - Specifies the instance of the maps.
43
40
  * @returns {void}
44
41
  * @private
45
42
  */
46
- destroy(maps: Maps): void;
43
+ destroy(): void;
47
44
  }
@@ -198,7 +198,7 @@ var DataLabel = /** @class */ (function () {
198
198
  var eventargs_1 = {
199
199
  name: dataLabelRendering, maps: this.maps, cancel: false, border: { color: dataLabel.border.color,
200
200
  width: dataLabel.border.width, opacity: dataLabel.border.opacity }, datalabel: dataLabel,
201
- fill: dataLabel.fill, template: dataLabel.template, text: text
201
+ fill: dataLabel.fill, template: dataLabel.template, text: text, offsetX: 0, offsetY: 0
202
202
  };
203
203
  this.maps.trigger('dataLabelRendering', eventargs_1, function (labelArgs) {
204
204
  if (eventargs_1.cancel) {
@@ -249,8 +249,8 @@ var DataLabel = /** @class */ (function () {
249
249
  datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
250
250
  templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
251
251
  labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties'], index, _this.maps);
252
- labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + 'px';
253
- labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + 'px';
252
+ labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
253
+ labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
254
254
  labelTemplateElement.appendChild(labelElement);
255
255
  }
256
256
  else {
@@ -338,26 +338,26 @@ var DataLabel = /** @class */ (function () {
338
338
  y = ((location['y'] + transPoint['y']) * scale) - textSize['height'] / 2;
339
339
  }
340
340
  border_1.opacity = isNullOrUndefined(border_1.opacity) ? opacity : border_1.opacity;
341
- var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border_1, opacity, new Rect(x, y, textSize['width'], textSize['height']), rx, ry);
341
+ var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border_1, opacity, new Rect((x + labelArgs.offsetX), (y + labelArgs.offsetY), textSize['width'], textSize['height']), rx, ry);
342
342
  var rect = _this.maps.renderer.drawRectangle(rectOptions);
343
343
  group.appendChild(rect);
344
344
  }
345
345
  }
346
346
  element = renderTextElement(options, style, style.color || _this.maps.themeStyle.dataLabelFontColor, group);
347
347
  if (zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied) {
348
- element.setAttribute('transform', 'translate( ' + ((location['x'])) + ' '
349
- + (((location['y']))) + ' )');
348
+ element.setAttribute('transform', 'translate( ' + ((location['x'] + labelArgs.offsetX)) + ' '
349
+ + (((location['y'] + labelArgs.offsetY))) + ' )');
350
350
  location['x'] = locationX;
351
351
  location['y'] = locationY;
352
352
  }
353
353
  else {
354
- element.setAttribute('transform', 'translate( ' + ((location['x'] + transPoint.x) * scale) + ' '
355
- + (((location['y'] + transPoint.y) * scale) + (elementSize.height / 4)) + ' )');
354
+ element.setAttribute('transform', 'translate( ' + (((location['x'] + transPoint.x) * scale) + labelArgs.offsetX) + ' '
355
+ + ((((location['y'] + transPoint.y) * scale) + (elementSize.height / 4)) + labelArgs.offsetY) + ' )');
356
356
  }
357
357
  group.appendChild(element);
358
358
  }
359
359
  _this.dataLabelCollections.push({
360
- location: { x: location['x'], y: location['y'] },
360
+ location: { x: location['x'] + labelArgs.offsetX, y: location['y'] + labelArgs.offsetY },
361
361
  element: isNullOrUndefined(labelElement) ? element : labelElement,
362
362
  layerIndex: layerIndex,
363
363
  shapeIndex: sublayerIndexLabel ? oldIndex : index,
@@ -400,16 +400,14 @@ var DataLabel = /** @class */ (function () {
400
400
  return 'DataLabel';
401
401
  };
402
402
  /**
403
- * To destroy the layers.
404
403
  *
405
- * @param {Maps} maps - Specifies the instance of the maps.
406
404
  * @returns {void}
407
405
  * @private
408
406
  */
409
- DataLabel.prototype.destroy = function (maps) {
410
- /**
411
- * Destroy method performed here
412
- */
407
+ DataLabel.prototype.destroy = function () {
408
+ this.dataLabelCollections = [];
409
+ this.value = null;
410
+ this.maps = null;
413
411
  };
414
412
  return DataLabel;
415
413
  }());
@@ -143,4 +143,9 @@ export declare class LayerPanel {
143
143
  * @returns {Point} - Returns point values
144
144
  */
145
145
  private panTileMap;
146
+ /**
147
+ * @returns {void}
148
+ * @private
149
+ */
150
+ destroy(): void;
146
151
  }
@@ -202,7 +202,7 @@ var LayerPanel = /** @class */ (function () {
202
202
  panel.layerObject.appendChild(panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex));
203
203
  }
204
204
  if (panel.mapObject.markerModule) {
205
- panel.mapObject.markerModule.markerRender(panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
205
+ panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
206
206
  }
207
207
  panel.translateLayerElements(panel.layerObject, layerIndex);
208
208
  panel.layerGroup.appendChild(panel.layerObject);
@@ -281,7 +281,7 @@ var LayerPanel = /** @class */ (function () {
281
281
  proxy_1.renderTileLayer(proxy_1, layer, layerIndex, bing_1);
282
282
  _this.mapObject.arrangeTemplate();
283
283
  if (_this.mapObject.zoomModule && (_this.mapObject.previousScale !== _this.mapObject.scale)) {
284
- _this.mapObject.zoomModule.applyTransform(true);
284
+ _this.mapObject.zoomModule.applyTransform(_this.mapObject, true);
285
285
  }
286
286
  };
287
287
  ajax.send();
@@ -325,7 +325,7 @@ var LayerPanel = /** @class */ (function () {
325
325
  proxy.renderTileLayer(proxy, layer, layerIndex, bing);
326
326
  this.mapObject.arrangeTemplate();
327
327
  if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
328
- this.mapObject.zoomModule.applyTransform(true);
328
+ this.mapObject.zoomModule.applyTransform(this.mapObject, true);
329
329
  }
330
330
  };
331
331
  LayerPanel.prototype.bubbleCalculation = function (bubbleSettings, range) {
@@ -624,6 +624,7 @@ var LayerPanel = /** @class */ (function () {
624
624
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
625
625
  (currentShapeData['property'][properties]) : ''));
626
626
  pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + index + 3).toString());
627
+ pathEle.setAttribute('role', '');
627
628
  if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
628
629
  pathEle.setAttribute('style', 'outline:none');
629
630
  }
@@ -703,7 +704,7 @@ var LayerPanel = /** @class */ (function () {
703
704
  _this.layerObject.appendChild(element);
704
705
  });
705
706
  if (this.mapObject.markerModule) {
706
- this.mapObject.markerModule.markerRender(this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
707
+ this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
707
708
  : this.currentFactor), null);
708
709
  }
709
710
  this.translateLayerElements(this.layerObject, layerIndex);
@@ -1260,6 +1261,7 @@ var LayerPanel = /** @class */ (function () {
1260
1261
  imgElement.setAttribute('height', '256px');
1261
1262
  imgElement.setAttribute('width', '256px');
1262
1263
  imgElement.setAttribute('src', tile.src);
1264
+ imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
1263
1265
  var mapId = _this.mapObject.element.id;
1264
1266
  imgElement.onload = function () {
1265
1267
  if (document.getElementById(mapId + '_tile_' + id) && type === 'Pan') {
@@ -1371,7 +1373,7 @@ var LayerPanel = /** @class */ (function () {
1371
1373
  '&zoom=' + zoom + '&center=' + center + '&maptype=' + mapType + '&key=' + apikey;
1372
1374
  document.getElementById(this.mapObject.element.id + '_tile_parent').innerHTML
1373
1375
  = '<div id="' + this.mapObject.element.id + '_StaticGoogleMap"' + 'style="position:absolute; left:' + eleWidth + 'px; top:'
1374
- + eleHeight + 'px"><img src="' + staticMapString + '"></div>';
1376
+ + eleHeight + 'px"><img src="' + staticMapString + '"' + 'alt="' + this.mapObject.getLocalizedLabel('ImageNotFound') + '"></div>';
1375
1377
  };
1376
1378
  /**
1377
1379
  * To find the tile translate point
@@ -1429,6 +1431,27 @@ var LayerPanel = /** @class */ (function () {
1429
1431
  this.mapObject.previousTileHeight = factorY;
1430
1432
  return new Point(x, y);
1431
1433
  };
1434
+ /**
1435
+ * @returns {void}
1436
+ * @private
1437
+ */
1438
+ LayerPanel.prototype.destroy = function () {
1439
+ this.mapObject = null;
1440
+ this.groupElements = [];
1441
+ this.layerObject = null;
1442
+ this.currentLayer = null;
1443
+ this.rectBounds = null;
1444
+ this.tiles = [];
1445
+ this.clipRectElement = null;
1446
+ this.tileSvgObject = null;
1447
+ this.ajaxModule = null;
1448
+ this.ajaxResponse = [];
1449
+ this.layerGroup = null;
1450
+ if (!isNullOrUndefined(this.bing)) {
1451
+ this.bing.destroy();
1452
+ }
1453
+ this.bing = null;
1454
+ };
1432
1455
  return LayerPanel;
1433
1456
  }());
1434
1457
  export { LayerPanel };
@@ -153,9 +153,8 @@ export declare class Legend {
153
153
  /**
154
154
  * To destroy the legend.
155
155
  *
156
- * @param {Maps} maps - Specifies the instance of the maps
157
156
  * @returns {void}
158
157
  * @private
159
158
  */
160
- destroy(maps: Maps): void;
159
+ destroy(): void;
161
160
  }
@@ -1785,6 +1785,9 @@ var Legend = /** @class */ (function () {
1785
1785
  '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
1786
1786
  '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
1787
1787
  if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
1788
+ mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
1789
+ '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'] + '_Group', this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
1790
+ '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'] + '_Group', this.maps.element.id);
1788
1791
  mapElement = mapElement.children[0];
1789
1792
  }
1790
1793
  if (isVisible && mapElement !== null) {
@@ -1926,6 +1929,9 @@ var Legend = /** @class */ (function () {
1926
1929
  '_BubbleIndex_' + j + '_dataIndex_' + mapdata['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
1927
1930
  '_MarkerIndex_' + j + '_dataIndex_' + mapdata['dataIndex'], this.maps.element.id);
1928
1931
  if (!isNullOrUndefined(mapdata['shape']) && mapdata['shape'] === 'Balloon') {
1932
+ LegendInteractive = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
1933
+ '_BubbleIndex_' + j + '_dataIndex_' + mapdata['dataIndex'] + '_Group', this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
1934
+ '_MarkerIndex_' + j + '_dataIndex_' + mapdata['dataIndex'] + '_Group', this.maps.element.id);
1929
1935
  LegendInteractive = LegendInteractive.children[0];
1930
1936
  }
1931
1937
  if (isVisible && LegendInteractive !== null) {
@@ -2148,15 +2154,30 @@ var Legend = /** @class */ (function () {
2148
2154
  /**
2149
2155
  * To destroy the legend.
2150
2156
  *
2151
- * @param {Maps} maps - Specifies the instance of the maps
2152
2157
  * @returns {void}
2153
2158
  * @private
2154
2159
  */
2155
- Legend.prototype.destroy = function (maps) {
2156
- /**
2157
- * Destroy method performed here
2158
- */
2160
+ Legend.prototype.destroy = function () {
2161
+ this.legendCollection = [];
2162
+ this.legendRenderingCollections = [];
2163
+ this.translate = null;
2164
+ this.legendBorderRect = null;
2165
+ this.initialMapAreaRect = null;
2166
+ this.legendTotalRect = null;
2167
+ this.totalPages = [];
2168
+ this.legendItemRect = null;
2169
+ this.legendGroup = null;
2170
+ this.shapeHighlightCollection = [];
2171
+ this.legendHighlightCollection = [];
2172
+ this.shapePreviousColor = [];
2173
+ this.selectedNonLegendShapes = [];
2174
+ this.legendLinearGradient = null;
2175
+ this.currentLayer = null;
2176
+ this.defsElement = null;
2177
+ this.legendElement = [];
2178
+ this.oldShapeElement = null;
2159
2179
  this.removeEventListener();
2180
+ this.maps = null;
2160
2181
  };
2161
2182
  return Legend;
2162
2183
  }());
@@ -8,13 +8,12 @@ export declare class Marker {
8
8
  private isMarkerExplode;
9
9
  private trackElements;
10
10
  private markerSVGObject;
11
- private previousExplodeId;
12
11
  /**
13
12
  * @private
14
13
  */
15
14
  sameMarkerData: MarkerClusterData[];
16
15
  constructor(maps: Maps);
17
- markerRender(layerElement: Element, layerIndex: number, factor: number, type: string): void;
16
+ markerRender(maps: Maps, layerElement: Element, layerIndex: number, factor: number, type: string): void;
18
17
  /**
19
18
  * To find zoom level for individual layers like India, USA.
20
19
  *
@@ -60,9 +59,8 @@ export declare class Marker {
60
59
  /**
61
60
  * To destroy the layers.
62
61
  *
63
- * @param {Maps} maps - Specifies the instance of the map
64
62
  * @returns {void}
65
63
  * @private
66
64
  */
67
- destroy(maps: Maps): void;
65
+ destroy(): void;
68
66
  }
@@ -12,43 +12,43 @@ var Marker = /** @class */ (function () {
12
12
  this.trackElements = [];
13
13
  this.sameMarkerData = [];
14
14
  }
15
- Marker.prototype.markerRender = function (layerElement, layerIndex, factor, type) {
15
+ Marker.prototype.markerRender = function (maps, layerElement, layerIndex, factor, type) {
16
16
  var _this = this;
17
17
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
18
  var templateFn;
19
19
  var markerCount = 0;
20
20
  var nullCount = 0;
21
21
  var markerTemplateCount = 0;
22
- this.maps.translateType = 'marker';
23
- var currentLayer = this.maps.layersCollection[layerIndex];
24
- this.markerSVGObject = this.maps.renderer.createGroup({
25
- id: this.maps.element.id + '_Markers_Group',
22
+ maps.translateType = 'marker';
23
+ var currentLayer = maps.layersCollection[layerIndex];
24
+ this.markerSVGObject = maps.renderer.createGroup({
25
+ id: maps.element.id + '_Markers_Group',
26
26
  class: 'GroupElement',
27
27
  style: 'pointer-events: auto;'
28
28
  });
29
29
  var markerTemplateEle = createElement('div', {
30
- id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
31
- className: this.maps.element.id + '_template',
30
+ id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
31
+ className: maps.element.id + '_template',
32
32
  styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
33
- 'top:' + this.maps.mapAreaRect.y + 'px;' +
34
- 'left:' + this.maps.mapAreaRect.x + 'px;' +
35
- 'height:' + this.maps.mapAreaRect.height + 'px;' +
36
- 'width:' + this.maps.mapAreaRect.width + 'px;'
33
+ 'top:' + maps.mapAreaRect.y + 'px;' +
34
+ 'left:' + maps.mapAreaRect.x + 'px;' +
35
+ 'height:' + maps.mapAreaRect.height + 'px;' +
36
+ 'width:' + maps.mapAreaRect.width + 'px;'
37
37
  });
38
38
  currentLayer.markerSettings.map(function (markerSettings, markerIndex) {
39
39
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
40
  var markerData = markerSettings.dataSource;
41
41
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
42
  Array.prototype.forEach.call(markerData, function (data, dataIndex) {
43
- _this.maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : _this.maps.markerNullCount;
43
+ maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
44
44
  var eventArgs = {
45
45
  cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
46
46
  width: markerSettings.width, imageUrl: markerSettings.imageUrl, shape: markerSettings.shape,
47
- template: markerSettings.template, data: data, maps: _this.maps, marker: markerSettings,
47
+ template: markerSettings.template, data: data, maps: maps, marker: markerSettings,
48
48
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
49
49
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
50
50
  };
51
- _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
51
+ maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
52
52
  eventArgs = markerColorChoose(eventArgs, data);
53
53
  eventArgs = markerShapeChoose(eventArgs, data);
54
54
  var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
@@ -59,56 +59,56 @@ var Marker = /** @class */ (function () {
59
59
  parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
60
60
  var offset = markerSettings.offset;
61
61
  if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(lng) && !isNullOrUndefined(lat)) {
62
- var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
62
+ var markerID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
63
63
  + markerIndex + '_dataIndex_' + dataIndex;
64
- var location_1 = (_this.maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, _this.maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, _this.maps);
65
- var animate = currentLayer.animationDuration !== 0 || isNullOrUndefined(_this.maps.zoomModule);
64
+ var location_1 = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
65
+ var animate = currentLayer.animationDuration !== 0 || isNullOrUndefined(maps.zoomModule);
66
66
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
- var translate = (_this.maps.isTileMap) ? (currentLayer.type === 'SubLayer' && isNullOrUndefined(_this.maps.zoomModule)) ? location_1 = convertTileLatLongToPoint(new MapLocation(lng, lat), _this.maps.tileZoomLevel, _this.maps.tileTranslatePoint, true) : new Object() :
68
- !isNullOrUndefined(_this.maps.zoomModule) && _this.maps.zoomSettings.zoomFactor > 1 ?
69
- getZoomTranslate(_this.maps, currentLayer, animate) :
70
- getTranslate(_this.maps, currentLayer, animate);
71
- var scale = type === 'AddMarker' ? _this.maps.scale : translate['scale'];
72
- var transPoint = type === 'AddMarker' ? _this.maps.translatePoint : translate['location'];
67
+ var translate = (maps.isTileMap) ? (currentLayer.type === 'SubLayer' && isNullOrUndefined(maps.zoomModule)) ? location_1 = convertTileLatLongToPoint(new MapLocation(lng, lat), maps.tileZoomLevel, maps.tileTranslatePoint, true) : new Object() :
68
+ !isNullOrUndefined(maps.zoomModule) && maps.zoomSettings.zoomFactor > 1 ?
69
+ getZoomTranslate(maps, currentLayer, animate) :
70
+ getTranslate(maps, currentLayer, animate);
71
+ var scale = type === 'AddMarker' ? maps.scale : translate['scale'];
72
+ var transPoint = type === 'AddMarker' ? maps.translatePoint : translate['location'];
73
73
  if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
74
74
  markerTemplateCount++;
75
- markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location_1, transPoint, scale, offset, _this.maps);
75
+ markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location_1, transPoint, scale, offset, maps);
76
76
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
77
- _this.maps.renderReactTemplates();
77
+ maps.renderReactTemplates();
78
78
  }
79
79
  else if (!eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
80
80
  markerCount++;
81
- marker(eventArgs, markerSettings, markerData, dataIndex, location_1, transPoint, markerID, offset, scale, _this.maps, _this.markerSVGObject);
81
+ marker(eventArgs, markerSettings, markerData, dataIndex, location_1, transPoint, markerID, offset, scale, maps, _this.markerSVGObject);
82
82
  }
83
83
  }
84
84
  nullCount += (!isNaN(lat) && !isNaN(lng)) ? 0 : 1;
85
85
  markerTemplateCount += (eventArgs.cancel) ? 1 : 0;
86
86
  markerCount += (eventArgs.cancel) ? 1 : 0;
87
- _this.maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
88
- var markerDataLength = markerData.length - _this.maps.markerNullCount;
87
+ maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? maps.markerNullCount + 1 : maps.markerNullCount;
88
+ var markerDataLength = markerData.length - maps.markerNullCount;
89
89
  if (_this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
90
90
  layerElement.appendChild(_this.markerSVGObject);
91
91
  if (currentLayer.markerClusterSettings.allowClustering) {
92
- _this.maps.svgObject.appendChild(_this.markerSVGObject);
93
- _this.maps.element.appendChild(_this.maps.svgObject);
92
+ maps.svgObject.appendChild(_this.markerSVGObject);
93
+ maps.element.appendChild(maps.svgObject);
94
94
  if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
95
- && _this.maps.zoomSettings.enable) {
95
+ && maps.zoomSettings.enable) {
96
96
  layerElement.appendChild(_this.markerSVGObject);
97
97
  }
98
98
  else {
99
- clusterTemplate(currentLayer, _this.markerSVGObject, _this.maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
99
+ clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
100
100
  }
101
101
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
102
- _this.maps.renderReactTemplates();
102
+ maps.renderReactTemplates();
103
103
  }
104
104
  }
105
- if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
106
- getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
107
- if (_this.maps.checkInitialRender) {
105
+ if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
106
+ getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
107
+ if (maps.checkInitialRender) {
108
108
  if (currentLayer.markerClusterSettings.allowClustering) {
109
- clusterTemplate(currentLayer, markerTemplateEle, _this.maps, layerIndex, _this.markerSVGObject, layerElement, false, false);
109
+ clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, _this.markerSVGObject, layerElement, false, false);
110
110
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
111
- _this.maps.renderReactTemplates();
111
+ maps.renderReactTemplates();
112
112
  }
113
113
  }
114
114
  }
@@ -354,7 +354,7 @@ var Marker = /** @class */ (function () {
354
354
  }
355
355
  if ((target.indexOf('_cluster_') > -1)) {
356
356
  var isClusterSame = false;
357
- var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? target.split('_datalabel_')[0] : target);
357
+ var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? layer.markerClusterSettings.shape === 'Balloon' ? target.split('_datalabel_')[0] + '_Group' : target.split('_datalabel_')[0] : layer.markerClusterSettings.shape === 'Balloon' ? target + '_Group' : target);
358
358
  var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerHTML.split(',').map(Number) : clusterElement.innerHTML.split(',').map(Number);
359
359
  collection_1 = [];
360
360
  for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
@@ -424,14 +424,14 @@ var Marker = /** @class */ (function () {
424
424
  /**
425
425
  * To destroy the layers.
426
426
  *
427
- * @param {Maps} maps - Specifies the instance of the map
428
427
  * @returns {void}
429
428
  * @private
430
429
  */
431
- Marker.prototype.destroy = function (maps) {
432
- /**
433
- * Destroy method performed here
434
- */
430
+ Marker.prototype.destroy = function () {
431
+ this.maps = null;
432
+ this.trackElements = [];
433
+ this.markerSVGObject = null;
434
+ this.sameMarkerData = [];
435
435
  };
436
436
  return Marker;
437
437
  }());
@@ -20,9 +20,8 @@ export declare class NavigationLine {
20
20
  /**
21
21
  * To destroy the layers.
22
22
  *
23
- * @param {Maps} maps - Specifies the instance of the map
24
23
  * @returns {void}
25
24
  * @private
26
25
  */
27
- destroy(maps: Maps): void;
26
+ destroy(): void;
28
27
  }