@syncfusion/ej2-maps 25.1.37 → 25.1.40
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/.eslintrc.json +260 -0
- package/CHANGELOG.md +9 -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 +620 -396
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +601 -378
- 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 +7 -7
- package/src/maps/layers/bubble.d.ts +17 -2
- package/src/maps/layers/bubble.js +20 -5
- package/src/maps/layers/color-mapping.d.ts +1 -1
- package/src/maps/layers/color-mapping.js +4 -0
- package/src/maps/layers/data-label.d.ts +2 -2
- package/src/maps/layers/data-label.js +4 -6
- package/src/maps/layers/layer-panel.d.ts +9 -7
- package/src/maps/layers/layer-panel.js +124 -121
- package/src/maps/layers/legend.d.ts +7 -6
- package/src/maps/layers/legend.js +41 -24
- package/src/maps/layers/marker.d.ts +7 -2
- package/src/maps/layers/marker.js +14 -10
- package/src/maps/layers/navigation-selected-line.js +1 -0
- package/src/maps/layers/polygon.js +5 -1
- package/src/maps/maps-model.d.ts +9 -9
- package/src/maps/maps.d.ts +30 -12
- package/src/maps/maps.js +88 -59
- package/src/maps/model/base-model.d.ts +3 -2
- package/src/maps/model/base.d.ts +10 -9
- package/src/maps/model/base.js +1 -1
- package/src/maps/model/export-image.js +1 -1
- package/src/maps/model/export-pdf.js +3 -3
- package/src/maps/model/interface.d.ts +1 -0
- package/src/maps/model/print.js +2 -0
- package/src/maps/model/theme.js +12 -12
- package/src/maps/user-interaction/annotation.d.ts +5 -0
- package/src/maps/user-interaction/annotation.js +6 -2
- package/src/maps/user-interaction/highlight.d.ts +13 -1
- package/src/maps/user-interaction/highlight.js +12 -2
- package/src/maps/user-interaction/selection.d.ts +13 -1
- package/src/maps/user-interaction/selection.js +19 -13
- package/src/maps/user-interaction/tooltip.d.ts +14 -0
- package/src/maps/user-interaction/tooltip.js +16 -1
- package/src/maps/user-interaction/zoom.d.ts +55 -10
- package/src/maps/user-interaction/zoom.js +146 -104
- package/src/maps/utils/helper.d.ts +64 -36
- package/src/maps/utils/helper.js +82 -52
- package/tslint.json +111 -0
package/src/maps/model/theme.js
CHANGED
|
@@ -354,7 +354,7 @@ export function getThemeStyle(theme) {
|
|
|
354
354
|
shapeFill: '#A6A6A6',
|
|
355
355
|
rectangleZoomFillColor: '#d3d3d3',
|
|
356
356
|
rectangleZoomFillOpacity: 0.5,
|
|
357
|
-
rectangleZoomBorderColor:
|
|
357
|
+
rectangleZoomBorderColor: '#009900'
|
|
358
358
|
};
|
|
359
359
|
break;
|
|
360
360
|
case 'highcontrast':
|
|
@@ -379,7 +379,7 @@ export function getThemeStyle(theme) {
|
|
|
379
379
|
shapeFill: '#A6A6A6',
|
|
380
380
|
rectangleZoomFillColor: '#d3d3d3',
|
|
381
381
|
rectangleZoomFillOpacity: 0.5,
|
|
382
|
-
rectangleZoomBorderColor:
|
|
382
|
+
rectangleZoomBorderColor: '#009900'
|
|
383
383
|
};
|
|
384
384
|
break;
|
|
385
385
|
case 'bootstrap4':
|
|
@@ -407,7 +407,7 @@ export function getThemeStyle(theme) {
|
|
|
407
407
|
shapeFill: '#A6A6A6',
|
|
408
408
|
rectangleZoomFillColor: '#d3d3d3',
|
|
409
409
|
rectangleZoomFillOpacity: 0.5,
|
|
410
|
-
rectangleZoomBorderColor:
|
|
410
|
+
rectangleZoomBorderColor: '#009900'
|
|
411
411
|
};
|
|
412
412
|
break;
|
|
413
413
|
case 'tailwind':
|
|
@@ -435,7 +435,7 @@ export function getThemeStyle(theme) {
|
|
|
435
435
|
shapeFill: '#E5E7EB',
|
|
436
436
|
rectangleZoomFillColor: '#d3d3d3',
|
|
437
437
|
rectangleZoomFillOpacity: 0.5,
|
|
438
|
-
rectangleZoomBorderColor:
|
|
438
|
+
rectangleZoomBorderColor: '#009900'
|
|
439
439
|
};
|
|
440
440
|
break;
|
|
441
441
|
case 'tailwinddark':
|
|
@@ -463,7 +463,7 @@ export function getThemeStyle(theme) {
|
|
|
463
463
|
shapeFill: '#374151',
|
|
464
464
|
rectangleZoomFillColor: '#d3d3d3',
|
|
465
465
|
rectangleZoomFillOpacity: 0.5,
|
|
466
|
-
rectangleZoomBorderColor:
|
|
466
|
+
rectangleZoomBorderColor: '#009900'
|
|
467
467
|
};
|
|
468
468
|
break;
|
|
469
469
|
case 'bootstrap5':
|
|
@@ -491,7 +491,7 @@ export function getThemeStyle(theme) {
|
|
|
491
491
|
shapeFill: '#E9ECEF',
|
|
492
492
|
rectangleZoomFillColor: '#d3d3d3',
|
|
493
493
|
rectangleZoomFillOpacity: 0.5,
|
|
494
|
-
rectangleZoomBorderColor:
|
|
494
|
+
rectangleZoomBorderColor: '#009900'
|
|
495
495
|
};
|
|
496
496
|
break;
|
|
497
497
|
case 'bootstrap5dark':
|
|
@@ -519,7 +519,7 @@ export function getThemeStyle(theme) {
|
|
|
519
519
|
shapeFill: '#495057',
|
|
520
520
|
rectangleZoomFillColor: '#d3d3d3',
|
|
521
521
|
rectangleZoomFillOpacity: 0.5,
|
|
522
|
-
rectangleZoomBorderColor:
|
|
522
|
+
rectangleZoomBorderColor: '#009900'
|
|
523
523
|
};
|
|
524
524
|
break;
|
|
525
525
|
case 'fluent':
|
|
@@ -547,7 +547,7 @@ export function getThemeStyle(theme) {
|
|
|
547
547
|
shapeFill: '#F3F2F1',
|
|
548
548
|
rectangleZoomFillColor: '#d3d3d3',
|
|
549
549
|
rectangleZoomFillOpacity: 0.5,
|
|
550
|
-
rectangleZoomBorderColor:
|
|
550
|
+
rectangleZoomBorderColor: '#009900'
|
|
551
551
|
};
|
|
552
552
|
break;
|
|
553
553
|
case 'fluentdark':
|
|
@@ -575,7 +575,7 @@ export function getThemeStyle(theme) {
|
|
|
575
575
|
shapeFill: '#252423',
|
|
576
576
|
rectangleZoomFillColor: '#d3d3d3',
|
|
577
577
|
rectangleZoomFillOpacity: 0.5,
|
|
578
|
-
rectangleZoomBorderColor:
|
|
578
|
+
rectangleZoomBorderColor: '#009900'
|
|
579
579
|
};
|
|
580
580
|
break;
|
|
581
581
|
case 'material3':
|
|
@@ -604,7 +604,7 @@ export function getThemeStyle(theme) {
|
|
|
604
604
|
shapeFill: '#E7E0EC',
|
|
605
605
|
rectangleZoomFillColor: '#6750A4',
|
|
606
606
|
rectangleZoomFillOpacity: 0.24,
|
|
607
|
-
rectangleZoomBorderColor:
|
|
607
|
+
rectangleZoomBorderColor: '#6750A4'
|
|
608
608
|
};
|
|
609
609
|
break;
|
|
610
610
|
case 'material3dark':
|
|
@@ -633,7 +633,7 @@ export function getThemeStyle(theme) {
|
|
|
633
633
|
shapeFill: '#49454F',
|
|
634
634
|
rectangleZoomFillColor: '#D0BCFF',
|
|
635
635
|
rectangleZoomFillOpacity: 0.24,
|
|
636
|
-
rectangleZoomBorderColor:
|
|
636
|
+
rectangleZoomBorderColor: '#D0BCFF'
|
|
637
637
|
};
|
|
638
638
|
break;
|
|
639
639
|
default:
|
|
@@ -658,7 +658,7 @@ export function getThemeStyle(theme) {
|
|
|
658
658
|
shapeFill: '#A6A6A6',
|
|
659
659
|
rectangleZoomFillColor: '#d3d3d3',
|
|
660
660
|
rectangleZoomFillOpacity: 0.5,
|
|
661
|
-
rectangleZoomBorderColor:
|
|
661
|
+
rectangleZoomBorderColor: '#009900'
|
|
662
662
|
};
|
|
663
663
|
break;
|
|
664
664
|
}
|
|
@@ -9,6 +9,11 @@ export declare class Annotations {
|
|
|
9
9
|
/**
|
|
10
10
|
* To create annotation elements
|
|
11
11
|
*
|
|
12
|
+
* @param {HTMLElement} parentElement - Specifies the parent element in the map.
|
|
13
|
+
* @param {Annotation} annotation - Specifies the options for customizing the annotation element in maps.
|
|
14
|
+
* @param {number} annotationIndex - Specifies the index of the annotation.
|
|
15
|
+
* @returns {void}
|
|
16
|
+
*
|
|
12
17
|
* @private
|
|
13
18
|
*/
|
|
14
19
|
createAnnotationTemplate(parentElement: HTMLElement, annotation: Annotation, annotationIndex: number): void;
|
|
@@ -26,10 +26,14 @@ var Annotations = /** @class */ (function () {
|
|
|
26
26
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
27
|
this.map.renderReactTemplates();
|
|
28
28
|
};
|
|
29
|
-
// eslint-disable-next-line valid-jsdoc
|
|
30
29
|
/**
|
|
31
30
|
* To create annotation elements
|
|
32
31
|
*
|
|
32
|
+
* @param {HTMLElement} parentElement - Specifies the parent element in the map.
|
|
33
|
+
* @param {Annotation} annotation - Specifies the options for customizing the annotation element in maps.
|
|
34
|
+
* @param {number} annotationIndex - Specifies the index of the annotation.
|
|
35
|
+
* @returns {void}
|
|
36
|
+
*
|
|
33
37
|
* @private
|
|
34
38
|
*/
|
|
35
39
|
Annotations.prototype.createAnnotationTemplate = function (parentElement, annotation, annotationIndex) {
|
|
@@ -41,7 +45,6 @@ var Annotations = /** @class */ (function () {
|
|
|
41
45
|
var map = this.map;
|
|
42
46
|
var templateElement;
|
|
43
47
|
var availSize = map.availableSize;
|
|
44
|
-
var id = map.element.id + '_Annotation_' + annotationIndex;
|
|
45
48
|
var childElement = createElement('div', {
|
|
46
49
|
id: map.element.id + '_Annotation_' + annotationIndex
|
|
47
50
|
});
|
|
@@ -50,6 +53,7 @@ var Annotations = /** @class */ (function () {
|
|
|
50
53
|
cancel: false, name: annotationRendering, content: annotation.content,
|
|
51
54
|
annotation: annotation
|
|
52
55
|
};
|
|
56
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
53
57
|
this.map.trigger(annotationRendering, argsData, function (annotationArgs) {
|
|
54
58
|
if (argsData.cancel) {
|
|
55
59
|
return;
|
|
@@ -24,14 +24,26 @@ export declare class Highlight {
|
|
|
24
24
|
private removeEventListener;
|
|
25
25
|
/**
|
|
26
26
|
* Public method for highlight module
|
|
27
|
+
*
|
|
28
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
29
|
+
* @param {string} name - Specifies the name.
|
|
30
|
+
* @param {boolean} enable - Specifies the enabling of highlight in map.
|
|
31
|
+
* @returns {void}
|
|
27
32
|
* @private
|
|
28
33
|
*/
|
|
29
34
|
addHighlight(layerIndex: number, name: string, enable: boolean): void;
|
|
30
35
|
private mouseMove;
|
|
31
36
|
/**
|
|
37
|
+
* Handles the highlighting events in map
|
|
38
|
+
*
|
|
39
|
+
* @param {Element} targetElement - Specifies the target element.
|
|
40
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
41
|
+
* @param {object} data - Specifies the data for the map.
|
|
42
|
+
* @param {object} shapeData - Specifies the data for the map to render.
|
|
43
|
+
* @returns {void}
|
|
32
44
|
* @private
|
|
33
45
|
*/
|
|
34
|
-
handleHighlight(targetElement: Element, layerIndex: number, data:
|
|
46
|
+
handleHighlight(targetElement: Element, layerIndex: number, data: object, shapeData: object): void;
|
|
35
47
|
private mapHighlight;
|
|
36
48
|
private highlightMap;
|
|
37
49
|
/**
|
|
@@ -33,9 +33,13 @@ var Highlight = /** @class */ (function () {
|
|
|
33
33
|
this.maps.off(Browser.touchMoveEvent, this.mouseMove);
|
|
34
34
|
this.maps.off(Browser.touchStartEvent, this.mouseMove);
|
|
35
35
|
};
|
|
36
|
-
// eslint-disable-next-line valid-jsdoc
|
|
37
36
|
/**
|
|
38
37
|
* Public method for highlight module
|
|
38
|
+
*
|
|
39
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
40
|
+
* @param {string} name - Specifies the name.
|
|
41
|
+
* @param {boolean} enable - Specifies the enabling of highlight in map.
|
|
42
|
+
* @returns {void}
|
|
39
43
|
* @private
|
|
40
44
|
*/
|
|
41
45
|
Highlight.prototype.addHighlight = function (layerIndex, name, enable) {
|
|
@@ -142,9 +146,15 @@ var Highlight = /** @class */ (function () {
|
|
|
142
146
|
}
|
|
143
147
|
};
|
|
144
148
|
/**
|
|
149
|
+
* Handles the highlighting events in map
|
|
150
|
+
*
|
|
151
|
+
* @param {Element} targetElement - Specifies the target element.
|
|
152
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
153
|
+
* @param {object} data - Specifies the data for the map.
|
|
154
|
+
* @param {object} shapeData - Specifies the data for the map to render.
|
|
155
|
+
* @returns {void}
|
|
145
156
|
* @private
|
|
146
157
|
*/
|
|
147
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
148
158
|
Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
|
|
149
159
|
if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule
|
|
150
160
|
&& this.maps.legendSettings.type === 'Layers') {
|
|
@@ -28,11 +28,23 @@ export declare class Selection {
|
|
|
28
28
|
private removeEventListener;
|
|
29
29
|
private mouseClick;
|
|
30
30
|
/**
|
|
31
|
+
* Selects the element in the map
|
|
32
|
+
*
|
|
33
|
+
* @param {Element} targetElement - Specifies the target element.
|
|
34
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
35
|
+
* @param {object} data - Specifies the data for the map.
|
|
36
|
+
* @param {object} shapeData - Specifies the data for the map to render.
|
|
37
|
+
* @returns {void}
|
|
31
38
|
* @private
|
|
32
39
|
*/
|
|
33
|
-
selectElement(targetElement: Element, layerIndex: number, data:
|
|
40
|
+
selectElement(targetElement: Element, layerIndex: number, data: object, shapeData: object): void;
|
|
34
41
|
/**
|
|
35
42
|
* Public method for selection
|
|
43
|
+
*
|
|
44
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
45
|
+
* @param {string} name - Specifies the name.
|
|
46
|
+
* @param {boolean} enable - Specifies the enabling of selection in map.
|
|
47
|
+
* @returns {void}
|
|
36
48
|
* @private
|
|
37
49
|
*/
|
|
38
50
|
addSelection(layerIndex: number, name: string, enable: boolean): void;
|
|
@@ -99,9 +99,15 @@ var Selection = /** @class */ (function () {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
/**
|
|
102
|
+
* Selects the element in the map
|
|
103
|
+
*
|
|
104
|
+
* @param {Element} targetElement - Specifies the target element.
|
|
105
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
106
|
+
* @param {object} data - Specifies the data for the map.
|
|
107
|
+
* @param {object} shapeData - Specifies the data for the map to render.
|
|
108
|
+
* @returns {void}
|
|
102
109
|
* @private
|
|
103
110
|
*/
|
|
104
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
105
111
|
Selection.prototype.selectElement = function (targetElement, layerIndex, data, shapeData) {
|
|
106
112
|
this.maps.mapSelect = targetElement ? true : false;
|
|
107
113
|
if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
@@ -113,9 +119,13 @@ var Selection = /** @class */ (function () {
|
|
|
113
119
|
this.selectMap(targetElement, shapeData, data);
|
|
114
120
|
}
|
|
115
121
|
};
|
|
116
|
-
// eslint-disable-next-line valid-jsdoc
|
|
117
122
|
/**
|
|
118
123
|
* Public method for selection
|
|
124
|
+
*
|
|
125
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
126
|
+
* @param {string} name - Specifies the name.
|
|
127
|
+
* @param {boolean} enable - Specifies the enabling of selection in map.
|
|
128
|
+
* @returns {void}
|
|
119
129
|
* @private
|
|
120
130
|
*/
|
|
121
131
|
Selection.prototype.addSelection = function (layerIndex, name, enable) {
|
|
@@ -138,12 +148,7 @@ var Selection = /** @class */ (function () {
|
|
|
138
148
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
139
149
|
Selection.prototype.selectMap = function (targetElement, shapeData, data) {
|
|
140
150
|
var _this = this;
|
|
141
|
-
var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
142
|
-
var parentElement;
|
|
143
|
-
var children;
|
|
144
|
-
var selectionClass;
|
|
145
151
|
var isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
|
|
146
|
-
var selectionsettings = this.selectionsettings;
|
|
147
152
|
var border = {
|
|
148
153
|
color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) :
|
|
149
154
|
this.selectionsettings.border.color,
|
|
@@ -162,6 +167,7 @@ var Selection = /** @class */ (function () {
|
|
|
162
167
|
data: data,
|
|
163
168
|
maps: this.maps
|
|
164
169
|
};
|
|
170
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
165
171
|
this.maps.trigger('itemSelection', eventArgs, function (observedArgs) {
|
|
166
172
|
eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ?
|
|
167
173
|
_this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
|
|
@@ -178,9 +184,9 @@ var Selection = /** @class */ (function () {
|
|
|
178
184
|
}
|
|
179
185
|
if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
180
186
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
181
|
-
var
|
|
182
|
-
targetElement.setAttribute('stroke-width', _this.maps.layers[
|
|
183
|
-
targetElement.setAttribute('stroke', _this.maps.layers[
|
|
187
|
+
var layerIndex = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
188
|
+
targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex].navigationLineSettings[index].width.toString());
|
|
189
|
+
targetElement.setAttribute('stroke', _this.maps.layers[layerIndex].navigationLineSettings[index].color);
|
|
184
190
|
}
|
|
185
191
|
}
|
|
186
192
|
else {
|
|
@@ -215,9 +221,9 @@ var Selection = /** @class */ (function () {
|
|
|
215
221
|
}
|
|
216
222
|
if (ele.id.indexOf('NavigationIndex') > -1) {
|
|
217
223
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
218
|
-
var
|
|
219
|
-
ele.setAttribute('stroke-width', _this.maps.layers[
|
|
220
|
-
ele.setAttribute('stroke', _this.maps.layers[
|
|
224
|
+
var layerIndex = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
225
|
+
ele.setAttribute('stroke-width', _this.maps.layers[layerIndex].navigationLineSettings[index].width.toString());
|
|
226
|
+
ele.setAttribute('stroke', _this.maps.layers[layerIndex].navigationLineSettings[index].color);
|
|
221
227
|
}
|
|
222
228
|
}
|
|
223
229
|
if (!isLineStringShape) {
|
|
@@ -18,6 +18,8 @@ export declare class MapsTooltip {
|
|
|
18
18
|
tooltipTargetID: string;
|
|
19
19
|
constructor(maps: Maps);
|
|
20
20
|
/**
|
|
21
|
+
* @param {PointerEvent} e - Specifies the event.
|
|
22
|
+
* @returns {void}
|
|
21
23
|
* @private
|
|
22
24
|
*/
|
|
23
25
|
renderTooltip(e: PointerEvent): void;
|
|
@@ -31,20 +33,32 @@ export declare class MapsTooltip {
|
|
|
31
33
|
private setTooltipContent;
|
|
32
34
|
private formatter;
|
|
33
35
|
/**
|
|
36
|
+
* Handles the mouse up
|
|
37
|
+
*
|
|
38
|
+
* @param {PointerEvent} e - Specifies the event
|
|
39
|
+
* @returns {void}
|
|
34
40
|
* @private
|
|
35
41
|
*/
|
|
36
42
|
mouseUpHandler(e: PointerEvent): void;
|
|
37
43
|
/**
|
|
44
|
+
* Removes the tooltip
|
|
45
|
+
*
|
|
46
|
+
* @returns {boolean} - Returns the boolean whether tooltip is removed or not.
|
|
38
47
|
* @private
|
|
39
48
|
*/
|
|
40
49
|
removeTooltip(): boolean;
|
|
41
50
|
private clearTooltip;
|
|
42
51
|
/**
|
|
43
52
|
* To bind events for tooltip module
|
|
53
|
+
*
|
|
54
|
+
* @returns {void}
|
|
44
55
|
* @private
|
|
45
56
|
*/
|
|
46
57
|
addEventListener(): void;
|
|
47
58
|
/**
|
|
59
|
+
* Removes the event listeners
|
|
60
|
+
*
|
|
61
|
+
* @returns {void}
|
|
48
62
|
* @private
|
|
49
63
|
*/
|
|
50
64
|
removeEventListener(): void;
|
|
@@ -12,6 +12,8 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
12
12
|
this.addEventListener();
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
+
* @param {PointerEvent} e - Specifies the event.
|
|
16
|
+
* @returns {void}
|
|
15
17
|
* @private
|
|
16
18
|
*/
|
|
17
19
|
MapsTooltip.prototype.renderTooltip = function (e) {
|
|
@@ -201,6 +203,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
201
203
|
}
|
|
202
204
|
document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
|
|
203
205
|
}
|
|
206
|
+
// eslint-disable-next-line no-constant-condition
|
|
204
207
|
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) {
|
|
205
208
|
if (isPolygon) {
|
|
206
209
|
polygon.tooltipTemplate = polygon.tooltipTemplate[Object.keys(polygon.tooltipTemplate)[0]];
|
|
@@ -360,6 +363,10 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
360
363
|
return format;
|
|
361
364
|
};
|
|
362
365
|
/**
|
|
366
|
+
* Handles the mouse up
|
|
367
|
+
*
|
|
368
|
+
* @param {PointerEvent} e - Specifies the event
|
|
369
|
+
* @returns {void}
|
|
363
370
|
* @private
|
|
364
371
|
*/
|
|
365
372
|
MapsTooltip.prototype.mouseUpHandler = function (e) {
|
|
@@ -372,6 +379,9 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
372
379
|
}
|
|
373
380
|
};
|
|
374
381
|
/**
|
|
382
|
+
* Removes the tooltip
|
|
383
|
+
*
|
|
384
|
+
* @returns {boolean} - Returns the boolean whether tooltip is removed or not.
|
|
375
385
|
* @private
|
|
376
386
|
*/
|
|
377
387
|
MapsTooltip.prototype.removeTooltip = function () {
|
|
@@ -383,6 +393,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
383
393
|
return isTooltipRemoved;
|
|
384
394
|
};
|
|
385
395
|
MapsTooltip.prototype.clearTooltip = function (element) {
|
|
396
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
386
397
|
var tooltipElement = element.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
|
|
387
398
|
if (isNullOrUndefined(tooltipElement)) {
|
|
388
399
|
var isTooltipRemoved = this.removeTooltip();
|
|
@@ -392,9 +403,10 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
392
403
|
}
|
|
393
404
|
}
|
|
394
405
|
};
|
|
395
|
-
// eslint-disable-next-line valid-jsdoc
|
|
396
406
|
/**
|
|
397
407
|
* To bind events for tooltip module
|
|
408
|
+
*
|
|
409
|
+
* @returns {void}
|
|
398
410
|
* @private
|
|
399
411
|
*/
|
|
400
412
|
MapsTooltip.prototype.addEventListener = function () {
|
|
@@ -414,6 +426,9 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
414
426
|
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
415
427
|
};
|
|
416
428
|
/**
|
|
429
|
+
* Removes the event listeners
|
|
430
|
+
*
|
|
431
|
+
* @returns {void}
|
|
417
432
|
* @private
|
|
418
433
|
*/
|
|
419
434
|
MapsTooltip.prototype.removeEventListener = function () {
|
|
@@ -52,7 +52,7 @@ export declare class Zoom {
|
|
|
52
52
|
/** @private */
|
|
53
53
|
browserName: string;
|
|
54
54
|
/** @private */
|
|
55
|
-
isPointer:
|
|
55
|
+
isPointer: boolean;
|
|
56
56
|
private handled;
|
|
57
57
|
private fingers;
|
|
58
58
|
/** @private */
|
|
@@ -66,12 +66,11 @@ export declare class Zoom {
|
|
|
66
66
|
private startTouches;
|
|
67
67
|
private index;
|
|
68
68
|
private templateCount;
|
|
69
|
-
private
|
|
70
|
-
private distanceY;
|
|
69
|
+
private pinchDistance;
|
|
71
70
|
/** @private */
|
|
72
|
-
mouseDownLatLong:
|
|
71
|
+
mouseDownLatLong: object;
|
|
73
72
|
/** @private */
|
|
74
|
-
mouseMoveLatLong:
|
|
73
|
+
mouseMoveLatLong: object;
|
|
75
74
|
/** @private */
|
|
76
75
|
isSingleClick: boolean;
|
|
77
76
|
/** @private */
|
|
@@ -91,17 +90,22 @@ export declare class Zoom {
|
|
|
91
90
|
private triggerZoomEvent;
|
|
92
91
|
private getTileTranslatePosition;
|
|
93
92
|
/**
|
|
93
|
+
* @returns {void}
|
|
94
94
|
* @private
|
|
95
95
|
*/
|
|
96
96
|
performRectZooming(): void;
|
|
97
97
|
private setInteraction;
|
|
98
98
|
private updateInteraction;
|
|
99
99
|
/**
|
|
100
|
+
* @param {PointerEvent} e - Specifies the vent in the map
|
|
101
|
+
* @returns {void}
|
|
100
102
|
* @private
|
|
101
103
|
*/
|
|
102
104
|
performPinchZooming(e: PointerEvent | TouchEvent): void;
|
|
105
|
+
private getTouchCenterPoint;
|
|
103
106
|
private triggerZoomComplete;
|
|
104
107
|
/**
|
|
108
|
+
* @returns {void}
|
|
105
109
|
* @private
|
|
106
110
|
*/
|
|
107
111
|
drawZoomRectangle(): void;
|
|
@@ -117,6 +121,10 @@ export declare class Zoom {
|
|
|
117
121
|
*/
|
|
118
122
|
private animateTransform;
|
|
119
123
|
/**
|
|
124
|
+
* @param {Maps} maps - Specifies the Map control
|
|
125
|
+
* @param {boolean} animate - Specifies the animation is available or not
|
|
126
|
+
* @param {boolean} isPanning - Specifies that it is panning or not
|
|
127
|
+
* @returns {void}
|
|
120
128
|
* @private
|
|
121
129
|
*/
|
|
122
130
|
applyTransform(maps: Maps, animate?: boolean, isPanning?: boolean): void;
|
|
@@ -139,21 +147,26 @@ export declare class Zoom {
|
|
|
139
147
|
* @param {PanDirection} direction - Specifies the direction of the panning.
|
|
140
148
|
* @param {number} xDifference - Specifies the distance moved in the horizontal direction.
|
|
141
149
|
* @param {number} yDifference - Specifies the distance moved in the vertical direction.
|
|
142
|
-
* @param {PointerEvent | TouchEvent | KeyboardEvent}
|
|
150
|
+
* @param {PointerEvent | TouchEvent | KeyboardEvent} event - Specifies the pointer event argument.
|
|
143
151
|
* @returns {void}
|
|
144
152
|
* @private
|
|
145
153
|
*/
|
|
146
|
-
panning(direction: PanDirection, xDifference: number, yDifference: number,
|
|
147
|
-
private toAlignSublayer;
|
|
154
|
+
panning(direction: PanDirection, xDifference: number, yDifference: number, event?: PointerEvent | TouchEvent | KeyboardEvent): void;
|
|
148
155
|
/**
|
|
156
|
+
* @param {number} zoomFactor - Specifies the factor for zooming
|
|
157
|
+
* @param {string} type - Specifies the type
|
|
158
|
+
* @returns {void}
|
|
149
159
|
* @private
|
|
150
160
|
*/
|
|
151
161
|
toolBarZooming(zoomFactor: number, type: string): void;
|
|
152
162
|
/**
|
|
163
|
+
* @returns {void}
|
|
153
164
|
* @private
|
|
154
165
|
*/
|
|
155
166
|
createZoomingToolbars(): void;
|
|
156
167
|
/**
|
|
168
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
169
|
+
* @returns {void}
|
|
157
170
|
* @private
|
|
158
171
|
*/
|
|
159
172
|
performToolBarAction(e: PointerEvent): void;
|
|
@@ -166,24 +179,37 @@ export declare class Zoom {
|
|
|
166
179
|
private panningStyle;
|
|
167
180
|
private applySelection;
|
|
168
181
|
/**
|
|
182
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
183
|
+
* @returns {void}
|
|
169
184
|
* @private
|
|
170
185
|
*/
|
|
171
186
|
showTooltip(e: PointerEvent): void;
|
|
172
187
|
/**
|
|
188
|
+
* @returns {void}
|
|
173
189
|
* @private
|
|
174
190
|
*/
|
|
175
191
|
removeTooltip(): void;
|
|
176
192
|
/**
|
|
193
|
+
* @returns {void}
|
|
177
194
|
* @private
|
|
178
195
|
*/
|
|
179
196
|
alignToolBar(): void;
|
|
180
197
|
/**
|
|
198
|
+
* @param {number} factor - Specifies the factor for toolbar
|
|
199
|
+
* @param {string} id - Specifies the id
|
|
200
|
+
* @returns {void}
|
|
181
201
|
* @private
|
|
182
202
|
*/
|
|
183
203
|
removeToolbarOpacity(factor: number, id: string): void;
|
|
184
204
|
private setOpacity;
|
|
185
205
|
private removeZoomOpacity;
|
|
186
206
|
/**
|
|
207
|
+
* @param {string} zoomClassStyle - Specifies the style for zoom class.
|
|
208
|
+
* @param {string} zoomInClassStyle - Specifies the style for zoom in.
|
|
209
|
+
* @param {string} zoomOutClassStyle - Specifies the style for zoom out.
|
|
210
|
+
* @param {string} panClassStyle - Specifies the style for pan.
|
|
211
|
+
* @param {string} resetClassStyle - Specifies the style for reset.
|
|
212
|
+
* @returns {void}
|
|
187
213
|
* @private
|
|
188
214
|
*/
|
|
189
215
|
removeToolbarClass(zoomClassStyle: string, zoomInClassStyle: string, zoomOutClassStyle: string, panClassStyle: string, resetClassStyle: string): void;
|
|
@@ -193,32 +219,44 @@ export declare class Zoom {
|
|
|
193
219
|
* To bind events.
|
|
194
220
|
*
|
|
195
221
|
* @param {Element} element - Specifies the element.
|
|
196
|
-
* @param {
|
|
222
|
+
* @param {Function} process - Specifies the process.
|
|
197
223
|
* @returns {void}
|
|
198
224
|
* @private
|
|
199
225
|
*/
|
|
200
|
-
wireEvents(element: Element, process:
|
|
226
|
+
wireEvents(element: Element, process: Function): void;
|
|
201
227
|
/**
|
|
228
|
+
* @param {WheelEvent} e - Specifies the wheel event in the map for zooming
|
|
229
|
+
* @returns {void}
|
|
202
230
|
* @private
|
|
203
231
|
*/
|
|
204
232
|
mapMouseWheel(e: WheelEvent): void;
|
|
205
233
|
/**
|
|
234
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
235
|
+
* @returns {void}
|
|
206
236
|
* @private
|
|
207
237
|
*/
|
|
208
238
|
doubleClick(e: PointerEvent): void;
|
|
209
239
|
/**
|
|
240
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
241
|
+
* @returns {void}
|
|
210
242
|
* @private
|
|
211
243
|
*/
|
|
212
244
|
mouseDownHandler(e: PointerEvent | TouchEvent): void;
|
|
213
245
|
/**
|
|
246
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
247
|
+
* @returns {void}
|
|
214
248
|
* @private
|
|
215
249
|
*/
|
|
216
250
|
mouseMoveHandler(e: PointerEvent | TouchEvent): void;
|
|
217
251
|
/**
|
|
252
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
253
|
+
* @returns {void}
|
|
218
254
|
* @private
|
|
219
255
|
*/
|
|
220
256
|
mouseUpHandler(e: PointerEvent | TouchEvent): void;
|
|
221
257
|
/**
|
|
258
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
259
|
+
* @returns {void}
|
|
222
260
|
* @private
|
|
223
261
|
*/
|
|
224
262
|
mouseCancelHandler(e: PointerEvent): void;
|
|
@@ -231,14 +269,21 @@ export declare class Zoom {
|
|
|
231
269
|
*/
|
|
232
270
|
click(e: PointerEvent): void;
|
|
233
271
|
/**
|
|
272
|
+
* Gets the Mouse Position
|
|
273
|
+
*
|
|
274
|
+
* @param {number} pageX - Specifies the Page x in map
|
|
275
|
+
* @param {number} pageY - Specifies the Page y in map
|
|
276
|
+
* @returns {Point} - returns the mouse point position
|
|
234
277
|
* @private
|
|
235
278
|
*/
|
|
236
279
|
getMousePosition(pageX: number, pageY: number): Point;
|
|
237
280
|
/**
|
|
281
|
+
* @returns {void}
|
|
238
282
|
* @private
|
|
239
283
|
*/
|
|
240
284
|
addEventListener(): void;
|
|
241
285
|
/**
|
|
286
|
+
* @returns {void}
|
|
242
287
|
* @private
|
|
243
288
|
*/
|
|
244
289
|
removeEventListener(): void;
|