@syncfusion/ej2-maps 25.2.3 → 25.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/ej2-maps.min.js +2 -2
- 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 +322 -202
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +331 -205
- 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 +8 -8
- package/src/maps/layers/bubble.d.ts +3 -4
- package/src/maps/layers/bubble.js +3 -4
- package/src/maps/layers/color-mapping.d.ts +2 -2
- package/src/maps/layers/color-mapping.js +2 -2
- package/src/maps/layers/data-label.d.ts +1 -1
- package/src/maps/layers/data-label.js +1 -1
- package/src/maps/layers/layer-panel.d.ts +7 -7
- package/src/maps/layers/layer-panel.js +11 -20
- package/src/maps/layers/legend.d.ts +9 -0
- package/src/maps/layers/legend.js +96 -19
- package/src/maps/layers/marker.d.ts +8 -8
- package/src/maps/layers/marker.js +8 -8
- package/src/maps/layers/navigation-selected-line.d.ts +1 -1
- package/src/maps/layers/navigation-selected-line.js +1 -1
- package/src/maps/layers/polygon.d.ts +1 -1
- package/src/maps/layers/polygon.js +1 -1
- package/src/maps/maps.d.ts +24 -26
- package/src/maps/maps.js +32 -30
- package/src/maps/model/base-model.d.ts +18 -2
- package/src/maps/model/base.d.ts +16 -2
- package/src/maps/model/base.js +7 -1
- package/src/maps/model/constants.d.ts +0 -4
- package/src/maps/model/constants.js +0 -4
- package/src/maps/model/interface.d.ts +2 -1
- package/src/maps/model/print.d.ts +3 -3
- package/src/maps/model/print.js +3 -3
- package/src/maps/model/theme.d.ts +1 -1
- package/src/maps/model/theme.js +1 -1
- package/src/maps/user-interaction/annotation.d.ts +1 -2
- package/src/maps/user-interaction/annotation.js +1 -2
- package/src/maps/user-interaction/highlight.d.ts +4 -4
- package/src/maps/user-interaction/highlight.js +4 -4
- package/src/maps/user-interaction/selection.d.ts +5 -5
- package/src/maps/user-interaction/selection.js +5 -5
- package/src/maps/user-interaction/tooltip.d.ts +6 -6
- package/src/maps/user-interaction/tooltip.js +18 -11
- package/src/maps/user-interaction/zoom.d.ts +6 -4
- package/src/maps/user-interaction/zoom.js +23 -10
- package/src/maps/utils/helper.d.ts +87 -72
- package/src/maps/utils/helper.js +114 -78
package/src/maps/model/base.d.ts
CHANGED
|
@@ -398,6 +398,13 @@ export declare class TooltipSettings extends ChildProperty<TooltipSettings> {
|
|
|
398
398
|
* @default null
|
|
399
399
|
*/
|
|
400
400
|
valuePath: string;
|
|
401
|
+
/**
|
|
402
|
+
* Specifies the value within which the tooltip will be removed on a mobile device. The value represents time in milliseconds.
|
|
403
|
+
* If the value is set to 0, the tooltip will not be removed. If the value is set to greater than 0, the tooltip will be removed at the specified time.
|
|
404
|
+
*
|
|
405
|
+
* @default 2000
|
|
406
|
+
*/
|
|
407
|
+
duration: number;
|
|
401
408
|
}
|
|
402
409
|
/**
|
|
403
410
|
* Specifies the properties such as visibility, fill, border and text style to customize the tooltip.
|
|
@@ -423,6 +430,13 @@ export declare class PolygonTooltipSettings extends ChildProperty<PolygonTooltip
|
|
|
423
430
|
* Gets or sets the font properties of the text content of the tooltip element of the polygon shape.
|
|
424
431
|
*/
|
|
425
432
|
textStyle: FontModel;
|
|
433
|
+
/**
|
|
434
|
+
* Specifies the value within which the tooltip will be removed on a mobile device. The value represents time in milliseconds.
|
|
435
|
+
* If the value is set to 0, the tooltip will not be removed. If the value is set to greater than 0, the tooltip will be removed at the specified time.
|
|
436
|
+
*
|
|
437
|
+
* @default 2000
|
|
438
|
+
*/
|
|
439
|
+
duration: number;
|
|
426
440
|
}
|
|
427
441
|
/**
|
|
428
442
|
* Gets or sets the options to customize the margin of the maps.
|
|
@@ -1717,8 +1731,8 @@ export declare class LayerSettings extends ChildProperty<LayerSettings> {
|
|
|
1717
1731
|
type: Type;
|
|
1718
1732
|
/**
|
|
1719
1733
|
* Gets or sets the geometry type for the layer in maps. There are two types: Geographic and Normal.
|
|
1720
|
-
*
|
|
1721
|
-
*
|
|
1734
|
+
* - Geographic type renders the shape maps with geographical coordinate system.
|
|
1735
|
+
* - Normal type renders the shape maps using default coordinate system.
|
|
1722
1736
|
*
|
|
1723
1737
|
* @default Geographic
|
|
1724
1738
|
*/
|
package/src/maps/model/base.js
CHANGED
|
@@ -300,6 +300,9 @@ var TooltipSettings = /** @class */ (function (_super) {
|
|
|
300
300
|
__decorate([
|
|
301
301
|
Property(null)
|
|
302
302
|
], TooltipSettings.prototype, "valuePath", void 0);
|
|
303
|
+
__decorate([
|
|
304
|
+
Property(2000)
|
|
305
|
+
], TooltipSettings.prototype, "duration", void 0);
|
|
303
306
|
return TooltipSettings;
|
|
304
307
|
}(ChildProperty));
|
|
305
308
|
export { TooltipSettings };
|
|
@@ -323,6 +326,9 @@ var PolygonTooltipSettings = /** @class */ (function (_super) {
|
|
|
323
326
|
__decorate([
|
|
324
327
|
Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
|
|
325
328
|
], PolygonTooltipSettings.prototype, "textStyle", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
Property(2000)
|
|
331
|
+
], PolygonTooltipSettings.prototype, "duration", void 0);
|
|
326
332
|
return PolygonTooltipSettings;
|
|
327
333
|
}(ChildProperty));
|
|
328
334
|
export { PolygonTooltipSettings };
|
|
@@ -1155,7 +1161,7 @@ export { MarkerBase };
|
|
|
1155
1161
|
*/
|
|
1156
1162
|
var MarkerSettings = /** @class */ (function (_super) {
|
|
1157
1163
|
__extends(MarkerSettings, _super);
|
|
1158
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1164
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1159
1165
|
function MarkerSettings(parent, propName, defaultValue, isArray) {
|
|
1160
1166
|
return _super.call(this, parent, propName, defaultValue, isArray) || this;
|
|
1161
1167
|
}
|
|
@@ -203,21 +203,17 @@ export declare const zoomComplete: string;
|
|
|
203
203
|
export declare const itemHighlight: string;
|
|
204
204
|
/**
|
|
205
205
|
* Specifies the maps before print event name.
|
|
206
|
-
*
|
|
207
206
|
*/
|
|
208
207
|
export declare const beforePrint: string;
|
|
209
208
|
/**
|
|
210
209
|
* Specifies the maps zoom in event name.
|
|
211
|
-
*
|
|
212
210
|
*/
|
|
213
211
|
export declare const zoomIn: string;
|
|
214
212
|
/**
|
|
215
213
|
* Specifies the maps zoom out event name.
|
|
216
|
-
*
|
|
217
214
|
*/
|
|
218
215
|
export declare const zoomOut: string;
|
|
219
216
|
/**
|
|
220
217
|
* Specifies the maps pan event name.
|
|
221
|
-
*
|
|
222
218
|
*/
|
|
223
219
|
export declare const pan: string;
|
|
@@ -203,21 +203,17 @@ export var zoomComplete = 'zoomComplete';
|
|
|
203
203
|
export var itemHighlight = 'itemHighlight';
|
|
204
204
|
/**
|
|
205
205
|
* Specifies the maps before print event name.
|
|
206
|
-
*
|
|
207
206
|
*/
|
|
208
207
|
export var beforePrint = 'beforePrint';
|
|
209
208
|
/**
|
|
210
209
|
* Specifies the maps zoom in event name.
|
|
211
|
-
*
|
|
212
210
|
*/
|
|
213
211
|
export var zoomIn = 'zoomIn';
|
|
214
212
|
/**
|
|
215
213
|
* Specifies the maps zoom out event name.
|
|
216
|
-
*
|
|
217
214
|
*/
|
|
218
215
|
export var zoomOut = 'zoomOut';
|
|
219
216
|
/**
|
|
220
217
|
* Specifies the maps pan event name.
|
|
221
|
-
*
|
|
222
218
|
*/
|
|
223
219
|
export var pan = 'pan';
|
|
@@ -65,7 +65,8 @@ export interface ILoadedEventArgs extends IMinMaxLatitudeLongitude, IMapsEventAr
|
|
|
65
65
|
* Specifies the event argument of the load event in maps.
|
|
66
66
|
*/
|
|
67
67
|
export interface ILoadEventArgs extends IMapsEventArgs {
|
|
68
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* Defines the current maps instance.
|
|
69
70
|
*
|
|
70
71
|
|
|
71
72
|
*/
|
|
@@ -6,13 +6,13 @@ import { Maps } from '../../index';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class Print {
|
|
8
8
|
/**
|
|
9
|
-
* Constructor for Maps
|
|
9
|
+
* Constructor for Maps.
|
|
10
10
|
*
|
|
11
11
|
* @param {Maps} control - Specifies the instance of the Maps
|
|
12
12
|
*/
|
|
13
13
|
constructor(control: Maps);
|
|
14
14
|
/**
|
|
15
|
-
* To print the Maps
|
|
15
|
+
* To print the Maps.
|
|
16
16
|
*
|
|
17
17
|
* @param {Maps} maps -Specifies the Maps instance.
|
|
18
18
|
* @param {string[] | string | Element} elements - Specifies the element of the Maps
|
|
@@ -21,7 +21,7 @@ export declare class Print {
|
|
|
21
21
|
*/
|
|
22
22
|
print(maps: Maps, elements?: string[] | string | Element): void;
|
|
23
23
|
/**
|
|
24
|
-
* To get the html string of the Maps
|
|
24
|
+
* To get the html string of the Maps.
|
|
25
25
|
*
|
|
26
26
|
* @param {Maps} maps -Specifies the Maps instance.
|
|
27
27
|
* @param {string[] | string | Element} elements - Specifies the html element
|
package/src/maps/model/print.js
CHANGED
|
@@ -8,7 +8,7 @@ import { beforePrint } from '../model/constants';
|
|
|
8
8
|
*/
|
|
9
9
|
var Print = /** @class */ (function () {
|
|
10
10
|
/**
|
|
11
|
-
* Constructor for Maps
|
|
11
|
+
* Constructor for Maps.
|
|
12
12
|
*
|
|
13
13
|
* @param {Maps} control - Specifies the instance of the Maps
|
|
14
14
|
*/
|
|
@@ -16,7 +16,7 @@ var Print = /** @class */ (function () {
|
|
|
16
16
|
function Print(control) {
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* To print the Maps
|
|
19
|
+
* To print the Maps.
|
|
20
20
|
*
|
|
21
21
|
* @param {Maps} maps -Specifies the Maps instance.
|
|
22
22
|
* @param {string[] | string | Element} elements - Specifies the element of the Maps
|
|
@@ -38,7 +38,7 @@ var Print = /** @class */ (function () {
|
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
|
-
* To get the html string of the Maps
|
|
41
|
+
* To get the html string of the Maps.
|
|
42
42
|
*
|
|
43
43
|
* @param {Maps} maps -Specifies the Maps instance.
|
|
44
44
|
* @param {string[] | string | Element} elements - Specifies the html element
|
|
@@ -89,7 +89,7 @@ export declare namespace DarkTheme {
|
|
|
89
89
|
const legendLabelFont: IFontMapping;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
|
-
* Method to get the theme style
|
|
92
|
+
* Method to get the theme style.
|
|
93
93
|
*
|
|
94
94
|
* @param {MapsTheme} theme - Specifies the theme.
|
|
95
95
|
* @returns {IThemeStyle} - Returns the theme style.
|
package/src/maps/model/theme.js
CHANGED
|
@@ -309,7 +309,7 @@ export var DarkTheme;
|
|
|
309
309
|
};
|
|
310
310
|
})(DarkTheme || (DarkTheme = {}));
|
|
311
311
|
/**
|
|
312
|
-
* Method to get the theme style
|
|
312
|
+
* Method to get the theme style.
|
|
313
313
|
*
|
|
314
314
|
* @param {MapsTheme} theme - Specifies the theme.
|
|
315
315
|
* @returns {IThemeStyle} - Returns the theme style.
|
|
@@ -7,13 +7,12 @@ export declare class Annotations {
|
|
|
7
7
|
constructor(map: Maps);
|
|
8
8
|
renderAnnotationElements(): void;
|
|
9
9
|
/**
|
|
10
|
-
* To create annotation elements
|
|
10
|
+
* To create annotation elements.
|
|
11
11
|
*
|
|
12
12
|
* @param {HTMLElement} parentElement - Specifies the parent element in the map.
|
|
13
13
|
* @param {Annotation} annotation - Specifies the options for customizing the annotation element in maps.
|
|
14
14
|
* @param {number} annotationIndex - Specifies the index of the annotation.
|
|
15
15
|
* @returns {void}
|
|
16
|
-
*
|
|
17
16
|
* @private
|
|
18
17
|
*/
|
|
19
18
|
createAnnotationTemplate(parentElement: HTMLElement, annotation: Annotation, annotationIndex: number): void;
|
|
@@ -27,13 +27,12 @@ var Annotations = /** @class */ (function () {
|
|
|
27
27
|
this.map.renderReactTemplates();
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* To create annotation elements
|
|
30
|
+
* To create annotation elements.
|
|
31
31
|
*
|
|
32
32
|
* @param {HTMLElement} parentElement - Specifies the parent element in the map.
|
|
33
33
|
* @param {Annotation} annotation - Specifies the options for customizing the annotation element in maps.
|
|
34
34
|
* @param {number} annotationIndex - Specifies the index of the annotation.
|
|
35
35
|
* @returns {void}
|
|
36
|
-
*
|
|
37
36
|
* @private
|
|
38
37
|
*/
|
|
39
38
|
Annotations.prototype.createAnnotationTemplate = function (parentElement, annotation, annotationIndex) {
|
|
@@ -11,19 +11,19 @@ export declare class Highlight {
|
|
|
11
11
|
highlightSettings: HighlightSettingsModel;
|
|
12
12
|
constructor(maps: Maps);
|
|
13
13
|
/**
|
|
14
|
-
* To bind events for highlight module
|
|
14
|
+
* To bind events for highlight module.
|
|
15
15
|
*
|
|
16
16
|
* @returns {void}
|
|
17
17
|
*/
|
|
18
18
|
private addEventListener;
|
|
19
19
|
/**
|
|
20
|
-
* To unbind events for highlight module
|
|
20
|
+
* To unbind events for highlight module.
|
|
21
21
|
*
|
|
22
22
|
* @returns {void}
|
|
23
23
|
*/
|
|
24
24
|
private removeEventListener;
|
|
25
25
|
/**
|
|
26
|
-
* Public method for highlight module
|
|
26
|
+
* Public method for highlight module.
|
|
27
27
|
*
|
|
28
28
|
* @param {number} layerIndex - Specifies the index of the layer.
|
|
29
29
|
* @param {string} name - Specifies the name.
|
|
@@ -34,7 +34,7 @@ export declare class Highlight {
|
|
|
34
34
|
addHighlight(layerIndex: number, name: string, enable: boolean): void;
|
|
35
35
|
private mouseMove;
|
|
36
36
|
/**
|
|
37
|
-
* Handles the highlighting events in map
|
|
37
|
+
* Handles the highlighting events in map.
|
|
38
38
|
*
|
|
39
39
|
* @param {Element} targetElement - Specifies the target element.
|
|
40
40
|
* @param {number} layerIndex - Specifies the index of the layer.
|
|
@@ -10,7 +10,7 @@ var Highlight = /** @class */ (function () {
|
|
|
10
10
|
this.addEventListener();
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* To bind events for highlight module
|
|
13
|
+
* To bind events for highlight module.
|
|
14
14
|
*
|
|
15
15
|
* @returns {void}
|
|
16
16
|
*/
|
|
@@ -22,7 +22,7 @@ var Highlight = /** @class */ (function () {
|
|
|
22
22
|
this.maps.on(Browser.touchStartEvent, this.mouseMove, this);
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
|
-
* To unbind events for highlight module
|
|
25
|
+
* To unbind events for highlight module.
|
|
26
26
|
*
|
|
27
27
|
* @returns {void}
|
|
28
28
|
*/
|
|
@@ -34,7 +34,7 @@ var Highlight = /** @class */ (function () {
|
|
|
34
34
|
this.maps.off(Browser.touchStartEvent, this.mouseMove);
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
* Public method for highlight module
|
|
37
|
+
* Public method for highlight module.
|
|
38
38
|
*
|
|
39
39
|
* @param {number} layerIndex - Specifies the index of the layer.
|
|
40
40
|
* @param {string} name - Specifies the name.
|
|
@@ -146,7 +146,7 @@ var Highlight = /** @class */ (function () {
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
/**
|
|
149
|
-
* Handles the highlighting events in map
|
|
149
|
+
* Handles the highlighting events in map.
|
|
150
150
|
*
|
|
151
151
|
* @param {Element} targetElement - Specifies the target element.
|
|
152
152
|
* @param {number} layerIndex - Specifies the index of the layer.
|
|
@@ -15,20 +15,20 @@ export declare class Selection {
|
|
|
15
15
|
selectionType: string;
|
|
16
16
|
constructor(maps: Maps);
|
|
17
17
|
/**
|
|
18
|
-
* For binding events to selection module
|
|
18
|
+
* For binding events to selection module.
|
|
19
19
|
*
|
|
20
20
|
* @returns {void}
|
|
21
21
|
*/
|
|
22
22
|
private addEventListener;
|
|
23
23
|
/**
|
|
24
|
-
* For removing events from selection
|
|
24
|
+
* For removing events from selection module.
|
|
25
25
|
*
|
|
26
26
|
* @returns {void}
|
|
27
27
|
*/
|
|
28
28
|
private removeEventListener;
|
|
29
29
|
private mouseClick;
|
|
30
30
|
/**
|
|
31
|
-
* Selects the element in the map
|
|
31
|
+
* Selects the element in the map.
|
|
32
32
|
*
|
|
33
33
|
* @param {Element} targetElement - Specifies the target element.
|
|
34
34
|
* @param {number} layerIndex - Specifies the index of the layer.
|
|
@@ -39,7 +39,7 @@ export declare class Selection {
|
|
|
39
39
|
*/
|
|
40
40
|
selectElement(targetElement: Element, layerIndex: number, data: object, shapeData: object): void;
|
|
41
41
|
/**
|
|
42
|
-
* Public method for selection
|
|
42
|
+
* Public method for selection.
|
|
43
43
|
*
|
|
44
44
|
* @param {number} layerIndex - Specifies the index of the layer.
|
|
45
45
|
* @param {string} name - Specifies the name.
|
|
@@ -49,7 +49,7 @@ export declare class Selection {
|
|
|
49
49
|
*/
|
|
50
50
|
addSelection(layerIndex: number, name: string, enable: boolean): void;
|
|
51
51
|
/**
|
|
52
|
-
* Method for selection
|
|
52
|
+
* Method for selection.
|
|
53
53
|
*
|
|
54
54
|
* @param {Element} targetElement - Specifies the target element
|
|
55
55
|
* @param {any} shapeData - Specifies the shape data
|
|
@@ -10,7 +10,7 @@ var Selection = /** @class */ (function () {
|
|
|
10
10
|
this.addEventListener();
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* For binding events to selection module
|
|
13
|
+
* For binding events to selection module.
|
|
14
14
|
*
|
|
15
15
|
* @returns {void}
|
|
16
16
|
*/
|
|
@@ -20,7 +20,7 @@ var Selection = /** @class */ (function () {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
|
-
* For removing events from selection
|
|
23
|
+
* For removing events from selection module.
|
|
24
24
|
*
|
|
25
25
|
* @returns {void}
|
|
26
26
|
*/
|
|
@@ -99,7 +99,7 @@ var Selection = /** @class */ (function () {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
|
-
* Selects the element in the map
|
|
102
|
+
* Selects the element in the map.
|
|
103
103
|
*
|
|
104
104
|
* @param {Element} targetElement - Specifies the target element.
|
|
105
105
|
* @param {number} layerIndex - Specifies the index of the layer.
|
|
@@ -120,7 +120,7 @@ var Selection = /** @class */ (function () {
|
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
|
-
* Public method for selection
|
|
123
|
+
* Public method for selection.
|
|
124
124
|
*
|
|
125
125
|
* @param {number} layerIndex - Specifies the index of the layer.
|
|
126
126
|
* @param {string} name - Specifies the name.
|
|
@@ -138,7 +138,7 @@ var Selection = /** @class */ (function () {
|
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
/**
|
|
141
|
-
* Method for selection
|
|
141
|
+
* Method for selection.
|
|
142
142
|
*
|
|
143
143
|
* @param {Element} targetElement - Specifies the target element
|
|
144
144
|
* @param {any} shapeData - Specifies the shape data
|
|
@@ -11,7 +11,7 @@ export declare class MapsTooltip {
|
|
|
11
11
|
svgTooltip: Tooltip;
|
|
12
12
|
private isTouch;
|
|
13
13
|
private tooltipId;
|
|
14
|
-
private
|
|
14
|
+
private tooltipTimer;
|
|
15
15
|
/**
|
|
16
16
|
* @private
|
|
17
17
|
*/
|
|
@@ -24,7 +24,7 @@ export declare class MapsTooltip {
|
|
|
24
24
|
*/
|
|
25
25
|
renderTooltip(e: PointerEvent): void;
|
|
26
26
|
/**
|
|
27
|
-
* To get content for the current toolitp
|
|
27
|
+
* To get content for the current toolitp.
|
|
28
28
|
*
|
|
29
29
|
* @param {TooltipSettingsModel} options - Specifies the options for rendering tooltip
|
|
30
30
|
* @param {any} templateData - Specifies the template data
|
|
@@ -33,7 +33,7 @@ export declare class MapsTooltip {
|
|
|
33
33
|
private setTooltipContent;
|
|
34
34
|
private formatter;
|
|
35
35
|
/**
|
|
36
|
-
* Handles the mouse up
|
|
36
|
+
* Handles the mouse up.
|
|
37
37
|
*
|
|
38
38
|
* @param {PointerEvent} e - Specifies the event
|
|
39
39
|
* @returns {void}
|
|
@@ -41,7 +41,7 @@ export declare class MapsTooltip {
|
|
|
41
41
|
*/
|
|
42
42
|
mouseUpHandler(e: PointerEvent): void;
|
|
43
43
|
/**
|
|
44
|
-
* Removes the tooltip
|
|
44
|
+
* Removes the tooltip.
|
|
45
45
|
*
|
|
46
46
|
* @returns {boolean} - Returns the boolean whether tooltip is removed or not.
|
|
47
47
|
* @private
|
|
@@ -49,14 +49,14 @@ export declare class MapsTooltip {
|
|
|
49
49
|
removeTooltip(): boolean;
|
|
50
50
|
private clearTooltip;
|
|
51
51
|
/**
|
|
52
|
-
* To bind events for tooltip module
|
|
52
|
+
* To bind events for tooltip module.
|
|
53
53
|
*
|
|
54
54
|
* @returns {void}
|
|
55
55
|
* @private
|
|
56
56
|
*/
|
|
57
57
|
addEventListener(): void;
|
|
58
58
|
/**
|
|
59
|
-
* Removes the event listeners
|
|
59
|
+
* Removes the event listeners.
|
|
60
60
|
*
|
|
61
61
|
* @returns {void}
|
|
62
62
|
* @private
|
|
@@ -36,10 +36,6 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
36
36
|
pageY = e.pageY;
|
|
37
37
|
target = e.target;
|
|
38
38
|
}
|
|
39
|
-
if (this.maps.isDevice) {
|
|
40
|
-
clearTimeout(this.clearTimeout);
|
|
41
|
-
this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
|
|
42
|
-
}
|
|
43
39
|
if (target.id.indexOf(this.maps.element.id) === -1) {
|
|
44
40
|
var ancestor = target.closest('.' + this.maps.element.id + '_marker_template_element');
|
|
45
41
|
if (!isNullOrUndefined(ancestor) && ancestor.id.indexOf('_MarkerIndex_') > -1) {
|
|
@@ -206,9 +202,11 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
206
202
|
// eslint-disable-next-line no-constant-condition
|
|
207
203
|
if (typeof (isPolygon ? polygon.tooltipTemplate !== 'function' : option.template !== 'function') && (isPolygon ? polygon.tooltipTemplate !== null : option.template !== null) && Object.keys(typeof (isPolygon ? polygon.tooltipTemplate === 'object' : option.template === 'object') ? (isPolygon ? polygon.tooltipTemplate : option.template) : {}).length === 1) {
|
|
208
204
|
if (isPolygon) {
|
|
205
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
209
206
|
polygon.tooltipTemplate = polygon.tooltipTemplate[Object.keys(polygon.tooltipTemplate)[0]];
|
|
210
207
|
}
|
|
211
208
|
else {
|
|
209
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
212
210
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
213
211
|
}
|
|
214
212
|
}
|
|
@@ -293,6 +291,15 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
293
291
|
_this.svgTooltip.appendTo(tooltipEle);
|
|
294
292
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
295
293
|
_this.maps.renderReactTemplates();
|
|
294
|
+
if (_this.maps.isDevice) {
|
|
295
|
+
var timer = targetId.indexOf('_MarkerIndex_') > -1 || targetId.indexOf('_BubbleIndex_') > -1
|
|
296
|
+
|| targetId.indexOf('_shapeIndex_') > -1 ? option.duration : polygonTooltipOption.duration;
|
|
297
|
+
timer = (!isNullOrUndefined(timer) && timer > 0) ? timer : (timer < 0) ? 2000 : null;
|
|
298
|
+
if (timer !== null) {
|
|
299
|
+
clearTimeout(_this.tooltipTimer);
|
|
300
|
+
_this.tooltipTimer = setTimeout(_this.removeTooltip.bind(_this), timer);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
296
303
|
}
|
|
297
304
|
else {
|
|
298
305
|
_this.clearTooltip(e.target);
|
|
@@ -329,7 +336,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
329
336
|
}
|
|
330
337
|
};
|
|
331
338
|
/**
|
|
332
|
-
* To get content for the current toolitp
|
|
339
|
+
* To get content for the current toolitp.
|
|
333
340
|
*
|
|
334
341
|
* @param {TooltipSettingsModel} options - Specifies the options for rendering tooltip
|
|
335
342
|
* @param {any} templateData - Specifies the template data
|
|
@@ -363,7 +370,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
363
370
|
return format;
|
|
364
371
|
};
|
|
365
372
|
/**
|
|
366
|
-
* Handles the mouse up
|
|
373
|
+
* Handles the mouse up.
|
|
367
374
|
*
|
|
368
375
|
* @param {PointerEvent} e - Specifies the event
|
|
369
376
|
* @returns {void}
|
|
@@ -373,13 +380,13 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
373
380
|
if (!isNullOrUndefined(this.maps)) {
|
|
374
381
|
this.renderTooltip(e);
|
|
375
382
|
if (this.maps.tooltipDisplayMode === 'MouseMove') {
|
|
376
|
-
clearTimeout(this.
|
|
377
|
-
this.
|
|
383
|
+
clearTimeout(this.tooltipTimer);
|
|
384
|
+
this.tooltipTimer = setTimeout(this.removeTooltip.bind(this), 2000);
|
|
378
385
|
}
|
|
379
386
|
}
|
|
380
387
|
};
|
|
381
388
|
/**
|
|
382
|
-
* Removes the tooltip
|
|
389
|
+
* Removes the tooltip.
|
|
383
390
|
*
|
|
384
391
|
* @returns {boolean} - Returns the boolean whether tooltip is removed or not.
|
|
385
392
|
* @private
|
|
@@ -404,7 +411,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
404
411
|
}
|
|
405
412
|
};
|
|
406
413
|
/**
|
|
407
|
-
* To bind events for tooltip module
|
|
414
|
+
* To bind events for tooltip module.
|
|
408
415
|
*
|
|
409
416
|
* @returns {void}
|
|
410
417
|
* @private
|
|
@@ -426,7 +433,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
426
433
|
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
427
434
|
};
|
|
428
435
|
/**
|
|
429
|
-
* Removes the event listeners
|
|
436
|
+
* Removes the event listeners.
|
|
430
437
|
*
|
|
431
438
|
* @returns {void}
|
|
432
439
|
* @private
|
|
@@ -57,6 +57,8 @@ export declare class Zoom {
|
|
|
57
57
|
private fingers;
|
|
58
58
|
/** @private */
|
|
59
59
|
firstMove: boolean;
|
|
60
|
+
/** @private */
|
|
61
|
+
isPanningInProgress: boolean;
|
|
60
62
|
private isPan;
|
|
61
63
|
private isZoomFinal;
|
|
62
64
|
private isZoomSelection;
|
|
@@ -77,7 +79,7 @@ export declare class Zoom {
|
|
|
77
79
|
layerCollectionEle: Element;
|
|
78
80
|
constructor(maps: Maps);
|
|
79
81
|
/**
|
|
80
|
-
* To perform zooming for maps
|
|
82
|
+
* To perform zooming for maps.
|
|
81
83
|
*
|
|
82
84
|
* @param {Point} position - Specifies the position.
|
|
83
85
|
* @param {number} newZoomFactor - Specifies the zoom factor.
|
|
@@ -110,7 +112,7 @@ export declare class Zoom {
|
|
|
110
112
|
*/
|
|
111
113
|
drawZoomRectangle(): void;
|
|
112
114
|
/**
|
|
113
|
-
* To animate the zooming process
|
|
115
|
+
* To animate the zooming process.
|
|
114
116
|
*
|
|
115
117
|
* @param {Element} element - Specifies the element
|
|
116
118
|
* @param {boolean} animate - Specifies the boolean value
|
|
@@ -130,7 +132,7 @@ export declare class Zoom {
|
|
|
130
132
|
applyTransform(maps: Maps, animate?: boolean, isPanning?: boolean): void;
|
|
131
133
|
private markerTranslates;
|
|
132
134
|
/**
|
|
133
|
-
* To translate the layer template elements
|
|
135
|
+
* To translate the layer template elements.
|
|
134
136
|
*
|
|
135
137
|
* @param {number} x - Specifies the x value
|
|
136
138
|
* @param {number} y - Specifies the y value
|
|
@@ -269,7 +271,7 @@ export declare class Zoom {
|
|
|
269
271
|
*/
|
|
270
272
|
click(e: PointerEvent): void;
|
|
271
273
|
/**
|
|
272
|
-
* Gets the Mouse Position
|
|
274
|
+
* Gets the Mouse Position.
|
|
273
275
|
*
|
|
274
276
|
* @param {number} pageX - Specifies the Page x in map
|
|
275
277
|
* @param {number} pageY - Specifies the Page y in map
|
|
@@ -25,6 +25,8 @@ var Zoom = /** @class */ (function () {
|
|
|
25
25
|
/** @private */
|
|
26
26
|
this.isPointer = Browser.isPointer;
|
|
27
27
|
this.handled = false;
|
|
28
|
+
/** @private */
|
|
29
|
+
this.isPanningInProgress = false;
|
|
28
30
|
this.isPan = false;
|
|
29
31
|
this.isZoomFinal = false;
|
|
30
32
|
this.isZoomSelection = false;
|
|
@@ -47,7 +49,7 @@ var Zoom = /** @class */ (function () {
|
|
|
47
49
|
this.addEventListener();
|
|
48
50
|
}
|
|
49
51
|
/**
|
|
50
|
-
* To perform zooming for maps
|
|
52
|
+
* To perform zooming for maps.
|
|
51
53
|
*
|
|
52
54
|
* @param {Point} position - Specifies the position.
|
|
53
55
|
* @param {number} newZoomFactor - Specifies the zoom factor.
|
|
@@ -475,7 +477,7 @@ var Zoom = /** @class */ (function () {
|
|
|
475
477
|
}
|
|
476
478
|
};
|
|
477
479
|
/**
|
|
478
|
-
* To animate the zooming process
|
|
480
|
+
* To animate the zooming process.
|
|
479
481
|
*
|
|
480
482
|
* @param {Element} element - Specifies the element
|
|
481
483
|
* @param {boolean} animate - Specifies the boolean value
|
|
@@ -513,6 +515,7 @@ var Zoom = /** @class */ (function () {
|
|
|
513
515
|
var y = maps.translatePoint.y;
|
|
514
516
|
var currentLabelIndex = 0;
|
|
515
517
|
maps.zoomShapeCollection = [];
|
|
518
|
+
this.isPanningInProgress = isPanning || false;
|
|
516
519
|
if (document.getElementById(maps.element.id + '_mapsTooltip')) {
|
|
517
520
|
removeElement(maps.element.id + '_mapsTooltip');
|
|
518
521
|
}
|
|
@@ -556,7 +559,7 @@ var Zoom = /** @class */ (function () {
|
|
|
556
559
|
}
|
|
557
560
|
}
|
|
558
561
|
else if (currentEle.id.indexOf('_Markers_Group') > -1) {
|
|
559
|
-
if ((!this_1.isPanModeEnabled) && !isNullOrUndefined(currentEle.childNodes[0])) {
|
|
562
|
+
if ((!this_1.isPanModeEnabled || !isPanning) && !isNullOrUndefined(currentEle.childNodes[0])) {
|
|
560
563
|
this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement);
|
|
561
564
|
}
|
|
562
565
|
currentEle = layerElement.childNodes[j];
|
|
@@ -823,7 +826,7 @@ var Zoom = /** @class */ (function () {
|
|
|
823
826
|
});
|
|
824
827
|
};
|
|
825
828
|
/**
|
|
826
|
-
* To translate the layer template elements
|
|
829
|
+
* To translate the layer template elements.
|
|
827
830
|
*
|
|
828
831
|
* @param {number} x - Specifies the x value
|
|
829
832
|
* @param {number} y - Specifies the y value
|
|
@@ -1546,10 +1549,15 @@ var Zoom = /** @class */ (function () {
|
|
|
1546
1549
|
break;
|
|
1547
1550
|
case 'zoomin':
|
|
1548
1551
|
map.staticMapZoom = map.tileZoomLevel;
|
|
1549
|
-
if (map.staticMapZoom > 0 && map.staticMapZoom <
|
|
1552
|
+
if (map.staticMapZoom > 0 && map.staticMapZoom < map.zoomSettings.maxZoom) {
|
|
1550
1553
|
map.staticMapZoom += 1;
|
|
1551
1554
|
}
|
|
1552
|
-
|
|
1555
|
+
if (map.isTileMap && map.tileZoomLevel >= map.zoomSettings.minZoom && map.tileZoomLevel < map.zoomSettings.maxZoom) {
|
|
1556
|
+
this.toolBarZooming(map.tileZoomLevel + 1, 'ZoomIn');
|
|
1557
|
+
}
|
|
1558
|
+
else if (!map.isTileMap) {
|
|
1559
|
+
this.toolBarZooming(map.scale + 1, 'ZoomIn');
|
|
1560
|
+
}
|
|
1553
1561
|
scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
1554
1562
|
if (!this.isZoomSelection) {
|
|
1555
1563
|
if (scale === map.zoomSettings.maxZoom || scale > 1 || (scale === 1 && this.maps.isTileMap)) {
|
|
@@ -1909,9 +1917,14 @@ var Zoom = /** @class */ (function () {
|
|
|
1909
1917
|
-(e.detail) / 3 > 0 ? 'ZoomIn' : 'ZoomOut' : (e.wheelDelta / 120) > 0 ? 'ZoomIn' : 'ZoomOut';
|
|
1910
1918
|
if (direction === 'ZoomIn') {
|
|
1911
1919
|
map.mapScaleValue = value + delta;
|
|
1912
|
-
map.
|
|
1913
|
-
|
|
1914
|
-
map.staticMapZoom
|
|
1920
|
+
if (map.isTileMap) {
|
|
1921
|
+
map.staticMapZoom = map.tileZoomLevel;
|
|
1922
|
+
if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
|
|
1923
|
+
map.staticMapZoom += 1;
|
|
1924
|
+
this.performZooming(position, (value + delta), direction);
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
else {
|
|
1915
1928
|
this.performZooming(position, (value + delta), direction);
|
|
1916
1929
|
}
|
|
1917
1930
|
}
|
|
@@ -2195,7 +2208,7 @@ var Zoom = /** @class */ (function () {
|
|
|
2195
2208
|
}
|
|
2196
2209
|
};
|
|
2197
2210
|
/**
|
|
2198
|
-
* Gets the Mouse Position
|
|
2211
|
+
* Gets the Mouse Position.
|
|
2199
2212
|
*
|
|
2200
2213
|
* @param {number} pageX - Specifies the Page x in map
|
|
2201
2214
|
* @param {number} pageY - Specifies the Page y in map
|