@syncfusion/ej2-maps 20.2.36 → 20.2.45

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 : 20.2.36
3
+ * version : 20.2.45
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@16.39.0",
3
+ "_id": "@syncfusion/ej2-maps@20.2.43",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-udFrFSHobgtPOukgW1CI/Q+jLYQhCmy/ccsCgNQaR4HwvUt/elKftvpnWVDYPg8zoYR57rQWeqacwgrYNHVfhA==",
5
+ "_integrity": "sha512-308cXHFmR8U6mS1c43fdPzHz1njXi1DoiRYfcI+cLf0pqdQw6CO0oqKX3tQgxEs2d3jJjanXcXg1x3SdvMnRmg==",
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-release/@syncfusion/ej2-maps/-/ej2-maps-16.39.0.tgz",
27
- "_shasum": "734582b258450188397b1405beccd43aaede5a5a",
26
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-20.2.43.tgz",
27
+ "_shasum": "55de91fc150f29a81e5fd5d6a87846a8b47e9ff7",
28
28
  "_spec": "@syncfusion/ej2-maps@*",
29
29
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
30
30
  "author": {
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~20.2.36",
39
- "@syncfusion/ej2-buttons": "~20.2.36",
40
- "@syncfusion/ej2-compression": "~20.2.36",
41
- "@syncfusion/ej2-data": "~20.2.36",
42
- "@syncfusion/ej2-file-utils": "~20.2.36",
43
- "@syncfusion/ej2-pdf-export": "~20.2.36",
44
- "@syncfusion/ej2-svg-base": "~20.2.36"
38
+ "@syncfusion/ej2-base": "~20.2.45",
39
+ "@syncfusion/ej2-buttons": "~20.2.45",
40
+ "@syncfusion/ej2-compression": "~20.2.45",
41
+ "@syncfusion/ej2-data": "~20.2.45",
42
+ "@syncfusion/ej2-file-utils": "~20.2.45",
43
+ "@syncfusion/ej2-pdf-export": "~20.2.45",
44
+ "@syncfusion/ej2-svg-base": "~20.2.45"
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",
@@ -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.36",
83
+ "version": "20.2.45",
84
84
  "sideEffects": false
85
85
  }
@@ -150,7 +150,7 @@ var Bubble = /** @class */ (function () {
150
150
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
151
151
  var translate;
152
152
  var animate = layer.animationDuration !== 0 || isNullOrUndefined(_this.maps.zoomModule);
153
- if (_this.maps.zoomSettings.zoomFactor > 1 && !isNullOrUndefined(_this.maps.zoomModule)) {
153
+ if (_this.maps.zoomSettings.zoomFactor > 1 && !isNullOrUndefined(_this.maps.zoomModule) && !_this.maps.isTileMap) {
154
154
  translate = getZoomTranslate(_this.maps, layer, animate);
155
155
  }
156
156
  else {
@@ -98,7 +98,7 @@ var DataLabel = /** @class */ (function () {
98
98
  var shapeWidth;
99
99
  var scaleZoomValue = !isNullOrUndefined(this.maps.scale) ? Math.floor(this.maps.scale) : 1;
100
100
  var zoomLabelsPosition = this.maps.zoomSettings.enable ? !isNullOrUndefined(this.maps.zoomShapeCollection) &&
101
- this.maps.zoomShapeCollection.length > 0 : this.maps.zoomSettings.enable;
101
+ this.maps.zoomShapeCollection.length > 0 && !this.maps.isAddLayer : this.maps.zoomSettings.enable;
102
102
  this.maps.translateType = 'labels';
103
103
  for (var j = 0; j < properties.length; j++) {
104
104
  if (shapeProperties[properties[j]]) {
@@ -1243,7 +1243,7 @@ var LayerPanel = /** @class */ (function () {
1243
1243
  else {
1244
1244
  if (type !== 'Pan' && element1 && element) {
1245
1245
  element1.appendChild(element.children[0]);
1246
- if (!isNullOrUndefined(document.getElementById(_this.mapObject.element.id + '_animated_tiles'))) {
1246
+ if (!_this.mapObject.isAddLayer && !isNullOrUndefined(document.getElementById(_this.mapObject.element.id + '_animated_tiles'))) {
1247
1247
  document.getElementById(_this.mapObject.element.id + '_animated_tiles').id =
1248
1248
  _this.mapObject.element.id + '_animated_tiles_old';
1249
1249
  }
@@ -1,4 +1,4 @@
1
- import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Ajax } from '@syncfusion/ej2-base';import { EventHandler, Browser, EmitType, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';import { ModuleDeclaration } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { Size, createSvg, Point, removeElement, triggerShapeEvent, showTooltip, checkShapeDataFields, MapLocation, getMousePosition, calculateSize } from './utils/helper';import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, mergeSeparateCluster, customizeStyle, querySelector } from './utils/helper';import { createStyle } from './utils/helper';import { ZoomSettings, LegendSettings, Tile } from './model/base';import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';import { ZoomSettingsModel, LegendSettingsModel, LayerSettingsModel, BubbleSettingsModel } from './model/base-model';import { MarkerSettingsModel, SelectionSettingsModel , InitialMarkerSelectionSettingsModel} from './model/base-model';import { TitleSettingsModel, BorderModel, MarginModel, CenterPositionModel, InitialShapeSelectionSettingsModel } from './model/base-model';import { MapsAreaSettingsModel, AnnotationModel } from './model/base-model';import { Bubble } from './layers/bubble';import { Legend } from './layers/legend';import { Marker } from './layers/marker';import { Highlight } from './user-interaction/highlight';import { Selection } from './user-interaction/selection';import { MapsTooltip } from './user-interaction/tooltip';import { Zoom } from './user-interaction/zoom';import { load, click, rightClick, loaded, doubleClick, resize, shapeSelected, itemSelection, zoomIn } from './model/constants';import { ProjectionType, MapsTheme, PanDirection, TooltipGesture } from './utils/enum';import { getThemeStyle, Theme } from './model/theme';import { BingMap } from './layers/bing-map';import { ILoadEventArgs, ILoadedEventArgs, IMouseEventArgs, IResizeEventArgs, ITooltipRenderEventArgs } from './model/interface';import { GeoPosition, ITooltipRenderCompleteEventArgs, ILegendRenderingEventArgs } from './model/interface';import { ILayerRenderingEventArgs, IShapeRenderingEventArgs, IMarkerRenderingEventArgs, IMarkerClickEventArgs } from './model/interface';import { IMarkerMoveEventArgs, ILabelRenderingEventArgs, IBubbleMoveEventArgs, IBubbleClickEventArgs } from './model/interface';import { IMarkerClusterClickEventArgs, IMarkerClusterMoveEventArgs, IMarkerClusterRenderingEventArgs } from './model/interface';import { ISelectionEventArgs, IShapeSelectedEventArgs, IMapPanEventArgs, IMapZoomEventArgs } from './model/interface';import { IBubbleRenderingEventArgs, IAnimationCompleteEventArgs, IPrintEventArgs, IThemeStyle } from './model/interface';import { LayerPanel } from './layers/layer-panel';import { GeoLocation, Rect, RectOption, measureText, getElementByID, MapAjax, processResult, getElementsByClassName } from '../maps/utils/helper';import { findPosition, textTrim, TextOption, renderTextElement, convertGeoToPoint, calculateZoomLevel } from '../maps/utils/helper';import { Annotations } from '../maps/user-interaction/annotation';import { FontModel, DataLabel, MarkerSettings, IAnnotationRenderingEventArgs } from './index';import { NavigationLineSettingsModel, changeBorderWidth } from './index';import { NavigationLine } from './layers/navigation-selected-line';import { DataManager, Query } from '@syncfusion/ej2-data';import { ExportType } from '../maps/utils/enum';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { Print } from './model/print';import { PdfExport } from './model/export-pdf';import { ImageExport } from './model/export-image';
1
+ import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Ajax } from '@syncfusion/ej2-base';import { EventHandler, Browser, EmitType, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';import { ModuleDeclaration } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { Size, createSvg, Point, removeElement, triggerShapeEvent, showTooltip, checkShapeDataFields, MapLocation, getMousePosition, calculateSize } from './utils/helper';import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, mergeSeparateCluster, customizeStyle, querySelector } from './utils/helper';import { createStyle } from './utils/helper';import { ZoomSettings, LegendSettings, Tile } from './model/base';import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';import { ZoomSettingsModel, LegendSettingsModel, LayerSettingsModel, BubbleSettingsModel } from './model/base-model';import { MarkerSettingsModel, SelectionSettingsModel , InitialMarkerSelectionSettingsModel} from './model/base-model';import { TitleSettingsModel, BorderModel, MarginModel, CenterPositionModel, InitialShapeSelectionSettingsModel } from './model/base-model';import { MapsAreaSettingsModel, AnnotationModel } from './model/base-model';import { Bubble } from './layers/bubble';import { Legend } from './layers/legend';import { Marker } from './layers/marker';import { Highlight } from './user-interaction/highlight';import { Selection } from './user-interaction/selection';import { MapsTooltip } from './user-interaction/tooltip';import { Zoom } from './user-interaction/zoom';import { load, click, onclick, rightClick, loaded, doubleClick, resize, shapeSelected, itemSelection, zoomIn } from './model/constants';import { ProjectionType, MapsTheme, PanDirection, TooltipGesture } from './utils/enum';import { getThemeStyle, Theme } from './model/theme';import { BingMap } from './layers/bing-map';import { ILoadEventArgs, ILoadedEventArgs, IMouseEventArgs, IResizeEventArgs, ITooltipRenderEventArgs } from './model/interface';import { GeoPosition, ITooltipRenderCompleteEventArgs, ILegendRenderingEventArgs } from './model/interface';import { ILayerRenderingEventArgs, IShapeRenderingEventArgs, IMarkerRenderingEventArgs, IMarkerClickEventArgs } from './model/interface';import { IMarkerMoveEventArgs, ILabelRenderingEventArgs, IBubbleMoveEventArgs, IBubbleClickEventArgs } from './model/interface';import { IMarkerClusterClickEventArgs, IMarkerClusterMoveEventArgs, IMarkerClusterRenderingEventArgs } from './model/interface';import { ISelectionEventArgs, IShapeSelectedEventArgs, IMapPanEventArgs, IMapZoomEventArgs } from './model/interface';import { IBubbleRenderingEventArgs, IAnimationCompleteEventArgs, IPrintEventArgs, IThemeStyle } from './model/interface';import { LayerPanel } from './layers/layer-panel';import { GeoLocation, Rect, RectOption, measureText, getElementByID, MapAjax, processResult, getElementsByClassName } from '../maps/utils/helper';import { findPosition, textTrim, TextOption, renderTextElement, convertGeoToPoint, calculateZoomLevel } from '../maps/utils/helper';import { Annotations } from '../maps/user-interaction/annotation';import { FontModel, DataLabel, MarkerSettings, IAnnotationRenderingEventArgs } from './index';import { NavigationLineSettingsModel, changeBorderWidth } from './index';import { NavigationLine } from './layers/navigation-selected-line';import { DataManager, Query } from '@syncfusion/ej2-data';import { ExportType } from '../maps/utils/enum';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { Print } from './model/print';import { PdfExport } from './model/export-pdf';import { ImageExport } from './model/export-image';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -173,12 +173,20 @@ export interface MapsModel extends ComponentModel{
173
173
  loaded?: EmitType<ILoadedEventArgs>;
174
174
 
175
175
  /**
176
- * Triggers when clicking an element in maps.
176
+ * Triggers when a user clicks on an element in Maps.
177
177
  *
178
178
  * @event click
179
+
179
180
  */
180
181
  click?: EmitType<IMouseEventArgs>;
181
182
 
183
+ /**
184
+ * Triggers when a user clicks on an element in Maps.
185
+ *
186
+ * @event onclick
187
+ */
188
+ onclick?: EmitType<IMouseEventArgs>;
189
+
182
190
  /**
183
191
  * Triggers when performing the double click operation on an element in maps.
184
192
  *
@@ -248,11 +248,18 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
248
248
  */
249
249
  loaded: EmitType<ILoadedEventArgs>;
250
250
  /**
251
- * Triggers when clicking an element in maps.
251
+ * Triggers when a user clicks on an element in Maps.
252
252
  *
253
253
  * @event click
254
+
254
255
  */
255
256
  click: EmitType<IMouseEventArgs>;
257
+ /**
258
+ * Triggers when a user clicks on an element in Maps.
259
+ *
260
+ * @event onclick
261
+ */
262
+ onclick: EmitType<IMouseEventArgs>;
256
263
  /**
257
264
  * Triggers when performing the double click operation on an element in maps.
258
265
  *
@@ -437,6 +444,12 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
437
444
  * @private
438
445
  */
439
446
  availableSize: Size;
447
+ /**
448
+ * whether it is layer add or not.
449
+ *
450
+ * @private
451
+ */
452
+ isAddLayer: boolean;
440
453
  /**
441
454
  * Specifies the localization object.
442
455
  *
@@ -818,6 +831,7 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
818
831
  * @param {PointerEvent} e - Specifies the pointer event on maps.
819
832
  */
820
833
  mapsOnClick(e: PointerEvent): void;
834
+ private clickHandler;
821
835
  private triggerShapeSelection;
822
836
  private getClickLocation;
823
837
  /**
package/src/maps/maps.js CHANGED
@@ -35,7 +35,7 @@ import { createStyle } from './utils/helper';
35
35
  import { ZoomSettings, LegendSettings } from './model/base';
36
36
  import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';
37
37
  import { Marker } from './layers/marker';
38
- import { load, click, loaded, doubleClick, resize, shapeSelected, zoomIn } from './model/constants';
38
+ import { load, click, onclick, loaded, doubleClick, resize, shapeSelected, zoomIn } from './model/constants';
39
39
  import { getThemeStyle, Theme } from './model/theme';
40
40
  import { BingMap } from './layers/bing-map';
41
41
  import { LayerPanel } from './layers/layer-panel';
@@ -236,6 +236,7 @@ var Maps = /** @class */ (function (_super) {
236
236
  this.renderArea();
237
237
  this.processRequestJsonData();
238
238
  this.renderComplete();
239
+ this.isAddLayer = !this.isTileMap ? false : this.isAddLayer;
239
240
  };
240
241
  /**
241
242
  * To Initialize the control rendering.
@@ -1042,24 +1043,35 @@ var Maps = /** @class */ (function (_super) {
1042
1043
  latitude: latitude, longitude: longitude,
1043
1044
  isShapeSelected: this.SelectedElement(targetEle)
1044
1045
  };
1045
- this.trigger('click', eventArgs_1, function (mouseArgs) {
1046
- if (targetEle.id.indexOf('shapeIndex') > -1) {
1047
- _this.mergeCluster();
1048
- if (getElement(_this.element.id + '_mapsTooltip') &&
1049
- _this.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_') > -1) {
1050
- removeElement(_this.element.id + '_mapsTooltip');
1051
- }
1052
- }
1053
- if (_this.markerModule) {
1054
- _this.markerModule.markerClusterClick(e);
1055
- }
1056
- if (!eventArgs_1.cancel) {
1057
- _this.notify(click, targetEle);
1058
- }
1059
- if (!eventArgs_1.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
1060
- _this.triggerShapeSelection(targetEle);
1061
- }
1062
- });
1046
+ if (this.onclick) {
1047
+ eventArgs_1.name = onclick;
1048
+ this.trigger('onclick', eventArgs_1, function (mouseArgs) {
1049
+ _this.clickHandler(e, eventArgs_1, targetEle);
1050
+ });
1051
+ }
1052
+ else {
1053
+ this.trigger('click', eventArgs_1, function (mouseArgs) {
1054
+ _this.clickHandler(e, eventArgs_1, targetEle);
1055
+ });
1056
+ }
1057
+ }
1058
+ };
1059
+ Maps.prototype.clickHandler = function (e, eventArgs, targetEle) {
1060
+ if (targetEle.id.indexOf('shapeIndex') > -1) {
1061
+ this.mergeCluster();
1062
+ if (getElement(this.element.id + '_mapsTooltip') &&
1063
+ this.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_') > -1) {
1064
+ removeElement(this.element.id + '_mapsTooltip');
1065
+ }
1066
+ }
1067
+ if (this.markerModule) {
1068
+ this.markerModule.markerClusterClick(e);
1069
+ }
1070
+ if (!eventArgs.cancel) {
1071
+ this.notify(click, targetEle);
1072
+ }
1073
+ if (!eventArgs.cancel && targetEle.id.indexOf('shapeIndex') !== -1) {
1074
+ this.triggerShapeSelection(targetEle);
1063
1075
  }
1064
1076
  };
1065
1077
  Maps.prototype.triggerShapeSelection = function (targetEle) {
@@ -1159,13 +1171,6 @@ var Maps = /** @class */ (function (_super) {
1159
1171
  latitude = latLongValue.latitude;
1160
1172
  longitude = latLongValue.longitude;
1161
1173
  }
1162
- var eventArgs = {
1163
- cancel: false, name: click, target: targetId, x: e.clientX, y: e.clientY,
1164
- latitude: latitude, longitude: longitude, isShapeSelected: this.SelectedElement(targetEle)
1165
- };
1166
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1167
- this.trigger('click', eventArgs, function (mouseArgs) {
1168
- });
1169
1174
  }
1170
1175
  this.titleTooltip(e, pageX, pageY, true);
1171
1176
  if (!isNullOrUndefined(this.legendModule)) {
@@ -1173,7 +1178,7 @@ var Maps = /** @class */ (function (_super) {
1173
1178
  }
1174
1179
  }
1175
1180
  this.notify(Browser.touchEndEvent, e);
1176
- if (e.cancelable) {
1181
+ if (e.cancelable && !this.isTouch) {
1177
1182
  e.preventDefault();
1178
1183
  }
1179
1184
  return false;
@@ -1451,8 +1456,10 @@ var Maps = /** @class */ (function (_super) {
1451
1456
  * @param {Object} layer - Specifies the layer for the maps.
1452
1457
  */
1453
1458
  Maps.prototype.addLayer = function (layer) {
1454
- this.layers.push(new LayerSettings(this.layers[0], 'layers', layer));
1455
- this.refresh();
1459
+ var mapsLayer = this.layers;
1460
+ mapsLayer.push(layer);
1461
+ this.isAddLayer = true;
1462
+ this.layers = mapsLayer;
1456
1463
  };
1457
1464
  /**
1458
1465
  * This method is used to remove a layer from map.
@@ -1461,8 +1468,9 @@ var Maps = /** @class */ (function (_super) {
1461
1468
  * @returns {void}
1462
1469
  */
1463
1470
  Maps.prototype.removeLayer = function (index) {
1464
- this.layers.splice(index, 1);
1465
- this.refresh();
1471
+ var mapsLayer = this.layers;
1472
+ mapsLayer.splice(index, 1);
1473
+ this.layers = mapsLayer;
1466
1474
  };
1467
1475
  /**
1468
1476
  * This method is used to add markers dynamically in the maps.
@@ -1747,6 +1755,7 @@ var Maps = /** @class */ (function (_super) {
1747
1755
  Maps.prototype.onPropertyChanged = function (newProp, oldProp) {
1748
1756
  var render = false;
1749
1757
  var isMarker = false;
1758
+ var isLayer = false;
1750
1759
  var isStaticMapType = false;
1751
1760
  var layerEle;
1752
1761
  if (newProp['layers']) {
@@ -1767,6 +1776,7 @@ var Maps = /** @class */ (function (_super) {
1767
1776
  case 'legendSettings':
1768
1777
  case 'baseLayerIndex':
1769
1778
  if (prop === 'layers') {
1779
+ isLayer = true;
1770
1780
  var layerPropLength = Object.keys(newProp.layers).length;
1771
1781
  for (var x = 0; x < layerPropLength; x++) {
1772
1782
  if (!isNullOrUndefined(newProp.layers[x])) {
@@ -1791,7 +1801,7 @@ var Maps = /** @class */ (function (_super) {
1791
1801
  break;
1792
1802
  case 'zoomSettings':
1793
1803
  if (!isNullOrUndefined(oldProp.zoomSettings)) {
1794
- if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor) {
1804
+ if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor && !isLayer) {
1795
1805
  render = false;
1796
1806
  }
1797
1807
  else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
@@ -2287,6 +2297,9 @@ var Maps = /** @class */ (function (_super) {
2287
2297
  __decorate([
2288
2298
  Event()
2289
2299
  ], Maps.prototype, "click", void 0);
2300
+ __decorate([
2301
+ Event()
2302
+ ], Maps.prototype, "onclick", void 0);
2290
2303
  __decorate([
2291
2304
  Event()
2292
2305
  ], Maps.prototype, "doubleClick", void 0);
@@ -19,6 +19,12 @@ export declare const loaded: string;
19
19
  * @private
20
20
  */
21
21
  export declare const click: string;
22
+ /**
23
+ * Specifies the maps onclick event name.
24
+ *
25
+ * @private
26
+ */
27
+ export declare const onclick: string;
22
28
  /**
23
29
  * Specifies the maps right click event name.
24
30
  *
@@ -19,6 +19,12 @@ export var loaded = 'loaded';
19
19
  * @private
20
20
  */
21
21
  export var click = 'click';
22
+ /**
23
+ * Specifies the maps onclick event name.
24
+ *
25
+ * @private
26
+ */
27
+ export var onclick = 'onclick';
22
28
  /**
23
29
  * Specifies the maps right click event name.
24
30
  *
@@ -1,6 +1,6 @@
1
1
  import { click, itemSelection } from '../index';
2
2
  import { getElement, createStyle, customizeStyle, removeClass, getTargetElement, getElementByID } from '../utils/helper';
3
- import { isNullOrUndefined, Browser } from '@syncfusion/ej2-base';
3
+ import { isNullOrUndefined } from '@syncfusion/ej2-base';
4
4
  /**
5
5
  * Selection module class
6
6
  */
@@ -17,7 +17,6 @@ var Selection = /** @class */ (function () {
17
17
  Selection.prototype.addEventListener = function () {
18
18
  if (!this.maps.isDestroyed) {
19
19
  this.maps.on(click, this.mouseClick, this);
20
- this.maps.on(Browser.touchEndEvent, this.mouseClick, this);
21
20
  }
22
21
  };
23
22
  /**
@@ -30,7 +29,6 @@ var Selection = /** @class */ (function () {
30
29
  return;
31
30
  }
32
31
  this.maps.off(click, this.mouseClick);
33
- this.maps.off(Browser.touchEndEvent, this.mouseClick);
34
32
  };
35
33
  Selection.prototype.mouseClick = function (targetElement) {
36
34
  if (!isNullOrUndefined(targetElement['type']) && targetElement['type'].indexOf('touch') !== -1 &&
@@ -184,7 +184,7 @@ var MapsTooltip = /** @class */ (function () {
184
184
  options: tooltipOption,
185
185
  fill: option.fill,
186
186
  maps: this.maps,
187
- element: target, eventArgs: e
187
+ element: target, eventArgs: e, content: !isNullOrUndefined(currentData) ? currentData.toString() : ''
188
188
  };
189
189
  this.maps.trigger(tooltipRender, tooltipArgs, function (args) {
190
190
  if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
@@ -202,7 +202,7 @@ var MapsTooltip = /** @class */ (function () {
202
202
  header: '',
203
203
  data: option['data'],
204
204
  template: option['template'],
205
- content: [currentData.toString()],
205
+ content: tooltipArgs.content.toString() != currentData.toString() ? [tooltipArgs.content.toString()] : [currentData.toString()],
206
206
  shapes: [],
207
207
  location: option['location'],
208
208
  palette: [markerFill],
@@ -218,7 +218,7 @@ var MapsTooltip = /** @class */ (function () {
218
218
  header: '',
219
219
  data: tooltipArgs.options['data'],
220
220
  template: tooltipArgs.options['template'],
221
- content: [currentData.toString()],
221
+ content: tooltipArgs.content.toString() != currentData.toString() ? [tooltipArgs.content.toString()] : [currentData.toString()],
222
222
  shapes: [],
223
223
  location: tooltipArgs.options['location'],
224
224
  palette: [markerFill],
@@ -411,7 +411,7 @@ var Zoom = /** @class */ (function () {
411
411
  if (this.maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
412
412
  currentEle.remove();
413
413
  if (layerElement.children.length > 0 && layerElement.children[0]) {
414
- layerElement.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index), layerElement.children[0]);
414
+ layerElement.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index), layerElement.children[1]);
415
415
  }
416
416
  else {
417
417
  layerElement.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index));
@@ -520,16 +520,17 @@ var Zoom = /** @class */ (function () {
520
520
  }
521
521
  }
522
522
  }
523
- else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1) {
523
+ else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(this.maps.layers[this.index])) {
524
524
  this.intersect = [];
525
525
  this.maps.zoomLabelPositions = [];
526
526
  this.maps.zoomLabelPositions = this.maps.dataLabelModule.dataLabelCollections;
527
+ var labelAnimate = !this.maps.isTileMap && animate;
527
528
  for (var k = 0; k < currentEle.childElementCount; k++) {
528
529
  if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
529
530
  var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
530
531
  this.zoomshapewidth = currentEle.childNodes[k].getBoundingClientRect();
531
532
  this.maps.zoomShapeCollection.push(this.zoomshapewidth);
532
- this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', animate);
533
+ this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', labelAnimate);
533
534
  var dataLabel = this.maps.layers[this.index].dataLabelSettings;
534
535
  var border = dataLabel.border;
535
536
  if (k > 0 && border['width'] > 1) {
@@ -746,7 +747,7 @@ var Zoom = /** @class */ (function () {
746
747
  }
747
748
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Hide') {
748
749
  if (scale > 1) {
749
- text = (this.zoomshapewidth['width'] >= zoomtextSize['width']) ? zoomtext : '';
750
+ text = ((this.maps.dataLabelShape[l] * scale) >= zoomtextSize['width']) ? zoomtext : '';
750
751
  element.innerHTML = text;
751
752
  }
752
753
  else {
@@ -756,7 +757,7 @@ var Zoom = /** @class */ (function () {
756
757
  }
757
758
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Trim') {
758
759
  if (scale > 1) {
759
- zoomtrimLabel = textTrim(this.zoomshapewidth['width'], zoomtext, style);
760
+ zoomtrimLabel = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
760
761
  text = zoomtrimLabel;
761
762
  element.innerHTML = text;
762
763
  }
@@ -794,7 +795,7 @@ var Zoom = /** @class */ (function () {
794
795
  || textLocations['heightTop'] > this.intersect[j]['heightBottom']) {
795
796
  trimmedLable = !isNullOrUndefined(text) ? text : zoomtext;
796
797
  if (scale > 1) {
797
- trimmedLable = textTrim(this.zoomshapewidth['width'], trimmedLable, style);
798
+ trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), trimmedLable, style);
798
799
  }
799
800
  element.innerHTML = trimmedLable;
800
801
  }
@@ -820,11 +821,11 @@ var Zoom = /** @class */ (function () {
820
821
  }
821
822
  this.intersect.push(textLocations);
822
823
  if (isNullOrUndefined(trimmedLable)) {
823
- trimmedLable = textTrim(this.zoomshapewidth['width'], zoomtext, style);
824
+ trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
824
825
  element.innerHTML = trimmedLable;
825
826
  }
826
827
  }
827
- else {
828
+ if (animate || duration > 0) {
828
829
  smoothTranslate(element, 0, duration, new MapLocation(labelX, labelY));
829
830
  }
830
831
  }
@@ -1112,6 +1113,7 @@ var Zoom = /** @class */ (function () {
1112
1113
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
1113
1114
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
1114
1115
  }
1116
+ _this.maps.isAddLayer = false;
1115
1117
  }, animationDuration);
1116
1118
  }
1117
1119
  }
@@ -1026,8 +1026,8 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
1026
1026
  shapeCustom['borderWidth'] = eventArg.border.width;
1027
1027
  shapeCustom['borderOpacity'] = isNullOrUndefined(eventArg.border.opacity) ? clusters_1.opacity : eventArg.border.opacity;
1028
1028
  }
1029
- tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX : ((location_1.x + transPoint.x + eventArg.width) * maps.mapScaleValue);
1030
- tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY : ((location_1.y + transPoint.y + (eventArg.height / 2)) * maps.mapScaleValue);
1029
+ tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX : tempX + postionY - (eventArg.width / 2);
1030
+ tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY : tempY - (eventArg.height / 2);
1031
1031
  if (maps.isTileMap && !maps.zoomSettings.enable) {
1032
1032
  tempX = location_1.x;
1033
1033
  tempY = location_1.y;
@@ -1106,7 +1106,7 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
1106
1106
  getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
1107
1107
  layerElement.appendChild(markerCollection);
1108
1108
  }
1109
- var markerCluster = document.getElementById(maps.element.id + '_LayerIndex_0_markerCluster');
1109
+ var markerCluster = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_markerCluster');
1110
1110
  if (!isNullOrUndefined(markerCluster)) {
1111
1111
  markerCluster.remove();
1112
1112
  }
@@ -2255,6 +2255,8 @@ export function getZoomTranslate(mapObject, layer, animate) {
2255
2255
  }
2256
2256
  }
2257
2257
  scaleFactor = (mapObject.enablePersistence) ? (mapObject.mapScaleValue === 0 ? 1 : mapObject.mapScaleValue) : scaleFactor;
2258
+ mapObject.widthBeforeRefresh = mapObject.availableSize.width;
2259
+ mapObject.heightBeforeRefresh = mapObject.availableSize.height;
2258
2260
  return { scale: animate ? 1 : scaleFactor, location: new Point(x, y) };
2259
2261
  }
2260
2262
  /**
@@ -3140,7 +3142,11 @@ export function animate(element, delay, duration, process, end) {
3140
3142
  else {
3141
3143
  window.cancelAnimationFrame(clearAnimation);
3142
3144
  end.call(_this, { element: element });
3143
- element.setAttribute('style', markerStyle);
3145
+ if (element.id.indexOf('Marker') > -1) {
3146
+ console.log(element);
3147
+ var markerElement = getElementByID(element.id.split('_')[0] + '_Markers_Group');
3148
+ markerElement.setAttribute('style', markerStyle);
3149
+ }
3144
3150
  }
3145
3151
  };
3146
3152
  clearAnimation = window.requestAnimationFrame(startAnimation);