@syncfusion/ej2-maps 20.2.38 → 20.2.43
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.
- package/CHANGELOG.md +14 -1
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +71 -46
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +71 -46
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/bubble.js +1 -1
- package/src/maps/layers/data-label.js +1 -1
- package/src/maps/layers/layer-panel.js +1 -1
- package/src/maps/maps-model.d.ts +10 -2
- package/src/maps/maps.d.ts +15 -1
- package/src/maps/maps.js +44 -31
- package/src/maps/model/constants.d.ts +6 -0
- package/src/maps/model/constants.js +6 -0
- package/src/maps/user-interaction/selection.js +1 -3
- package/src/maps/user-interaction/tooltip.js +3 -3
- package/src/maps/user-interaction/zoom.js +5 -3
- package/src/maps/utils/helper.js +10 -4
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.2.
|
|
3
|
+
* version : 20.2.43
|
|
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.
|
|
3
|
+
"_id": "@syncfusion/ej2-maps@20.2.38",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-UOiAGl0YecIdQ6KMk4w6Snl5FbAew3Sh5xIc4USb02ifGE0COIbTJRiVX3f6SwX5nN46OjfTrXdoKRsaP7ghCw==",
|
|
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.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-20.2.38.tgz",
|
|
27
|
+
"_shasum": "1dc693b859a8fa576e66143e1a9bc74162d316e2",
|
|
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.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~20.2.
|
|
40
|
-
"@syncfusion/ej2-compression": "~20.2.
|
|
41
|
-
"@syncfusion/ej2-data": "~20.2.
|
|
42
|
-
"@syncfusion/ej2-file-utils": "~20.2.
|
|
43
|
-
"@syncfusion/ej2-pdf-export": "~20.2.
|
|
44
|
-
"@syncfusion/ej2-svg-base": "~20.2.
|
|
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"
|
|
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.
|
|
83
|
+
"version": "20.2.43",
|
|
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
|
}
|
package/src/maps/maps-model.d.ts
CHANGED
|
@@ -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
|
|
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
|
*
|
package/src/maps/maps.d.ts
CHANGED
|
@@ -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
|
|
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.
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
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)) {
|
|
@@ -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
|
-
|
|
1455
|
-
|
|
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
|
|
1465
|
-
|
|
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
|
|
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[
|
|
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',
|
|
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) {
|
|
@@ -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
|
}
|
package/src/maps/utils/helper.js
CHANGED
|
@@ -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 :
|
|
1030
|
-
tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY :
|
|
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 + '
|
|
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.
|
|
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);
|