@syncfusion/ej2-maps 20.3.56 → 20.4.38
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 +16 -1
- package/CHANGELOG.md +9 -1
- package/README.md +65 -51
- 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 +915 -722
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +901 -712
- 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 +33 -20
- package/src/maps/layers/bing-map.d.ts +1 -0
- package/src/maps/layers/bing-map.js +1 -0
- package/src/maps/layers/bubble.d.ts +4 -0
- package/src/maps/layers/bubble.js +7 -3
- package/src/maps/layers/color-mapping.d.ts +5 -0
- package/src/maps/layers/color-mapping.js +5 -3
- package/src/maps/layers/data-label.d.ts +0 -1
- package/src/maps/layers/data-label.js +5 -12
- package/src/maps/layers/layer-panel.d.ts +7 -7
- package/src/maps/layers/layer-panel.js +98 -53
- package/src/maps/layers/legend.js +19 -19
- package/src/maps/layers/marker.d.ts +13 -0
- package/src/maps/layers/marker.js +124 -107
- package/src/maps/layers/navigation-selected-line.d.ts +5 -0
- package/src/maps/layers/navigation-selected-line.js +111 -104
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +17 -0
- package/src/maps/maps.js +448 -364
- package/src/maps/model/base.js +1 -1
- package/src/maps/model/export-image.d.ts +4 -3
- package/src/maps/model/export-image.js +7 -6
- package/src/maps/model/export-pdf.d.ts +6 -6
- package/src/maps/model/export-pdf.js +8 -7
- package/src/maps/model/interface.d.ts +2 -2
- package/src/maps/model/print.d.ts +4 -2
- package/src/maps/model/print.js +6 -3
- package/src/maps/user-interaction/annotation.js +0 -2
- package/src/maps/user-interaction/highlight.js +4 -3
- package/src/maps/user-interaction/selection.js +4 -2
- package/src/maps/user-interaction/tooltip.js +5 -5
- package/src/maps/user-interaction/zoom.d.ts +5 -0
- package/src/maps/user-interaction/zoom.js +7 -7
- package/src/maps/utils/helper.d.ts +2 -0
- package/src/maps/utils/helper.js +37 -30
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.
|
|
3
|
+
* version : 20.4.38
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-maps@16.41.15",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-AJeqU+5oKxydk2JxnnlmjkQJKj7Tfc1E2JmVBTHThnYmGITjVcXpAQjZXL+KZF+KfO5VjCoXk6k2xqS71MpuKg==",
|
|
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": "https://nexus.syncfusion.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-maps/-/ej2-maps-16.41.15.tgz",
|
|
27
|
+
"_shasum": "0509b31a50ba9ceb45a7f9bba8a1bc054b018ceb",
|
|
28
28
|
"_spec": "@syncfusion/ej2-maps@*",
|
|
29
29
|
"_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~20.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~20.
|
|
40
|
-
"@syncfusion/ej2-compression": "~20.
|
|
41
|
-
"@syncfusion/ej2-data": "~20.
|
|
42
|
-
"@syncfusion/ej2-file-utils": "~20.
|
|
43
|
-
"@syncfusion/ej2-pdf-export": "~20.
|
|
44
|
-
"@syncfusion/ej2-svg-base": "~20.
|
|
38
|
+
"@syncfusion/ej2-base": "~20.4.38",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~20.4.38",
|
|
40
|
+
"@syncfusion/ej2-compression": "~20.4.38",
|
|
41
|
+
"@syncfusion/ej2-data": "~20.4.38",
|
|
42
|
+
"@syncfusion/ej2-file-utils": "~20.4.38",
|
|
43
|
+
"@syncfusion/ej2-pdf-export": "~20.4.38",
|
|
44
|
+
"@syncfusion/ej2-svg-base": "~20.4.38"
|
|
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",
|
|
@@ -53,23 +53,36 @@
|
|
|
53
53
|
"syncfusion",
|
|
54
54
|
"web-components",
|
|
55
55
|
"ej2-maps",
|
|
56
|
+
"javascript",
|
|
56
57
|
"typescript",
|
|
57
58
|
"maps",
|
|
58
|
-
"
|
|
59
|
+
"geoJSON",
|
|
60
|
+
"shapes",
|
|
61
|
+
"custom-shapes",
|
|
59
62
|
"OSM",
|
|
63
|
+
"openstreetmap",
|
|
64
|
+
"bing maps",
|
|
65
|
+
"azure maps",
|
|
66
|
+
"google maps",
|
|
60
67
|
"projection",
|
|
68
|
+
"layer",
|
|
69
|
+
"sublayer",
|
|
61
70
|
"bubble",
|
|
62
71
|
"color-mapping",
|
|
63
72
|
"marker",
|
|
73
|
+
"cluster",
|
|
64
74
|
"data-label",
|
|
65
75
|
"navigation-line",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
76
|
+
"zoom",
|
|
77
|
+
"pan",
|
|
78
|
+
"point",
|
|
79
|
+
"multipoint",
|
|
80
|
+
"linestring",
|
|
81
|
+
"multilinestring",
|
|
82
|
+
"polygon",
|
|
83
|
+
"multipolygon",
|
|
84
|
+
"geometry-collection",
|
|
85
|
+
"feature-collection"
|
|
73
86
|
],
|
|
74
87
|
"license": "SEE LICENSE IN license",
|
|
75
88
|
"main": "./dist/ej2-maps.umd.min.js",
|
|
@@ -80,6 +93,6 @@
|
|
|
80
93
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
81
94
|
},
|
|
82
95
|
"typings": "index.d.ts",
|
|
83
|
-
"version": "20.
|
|
96
|
+
"version": "20.4.38",
|
|
84
97
|
"sideEffects": false
|
|
85
98
|
}
|
|
@@ -25,6 +25,8 @@ export declare class Bubble {
|
|
|
25
25
|
/**
|
|
26
26
|
* To check and trigger bubble click event
|
|
27
27
|
*
|
|
28
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
29
|
+
* @returns {void}
|
|
28
30
|
* @private
|
|
29
31
|
*/
|
|
30
32
|
bubbleClick(e: PointerEvent): void;
|
|
@@ -38,6 +40,8 @@ export declare class Bubble {
|
|
|
38
40
|
/**
|
|
39
41
|
* To check and trigger bubble move event
|
|
40
42
|
*
|
|
43
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
44
|
+
* @retruns {void}
|
|
41
45
|
* @private
|
|
42
46
|
*/
|
|
43
47
|
bubbleMove(e: PointerEvent): void;
|
|
@@ -29,7 +29,8 @@ var Bubble = /** @class */ (function () {
|
|
|
29
29
|
var layerData = layer.layerData;
|
|
30
30
|
var colorValuePath = bubbleSettings.colorValuePath;
|
|
31
31
|
var equalValue = (!isNullOrUndefined(colorValuePath)) ? ((colorValuePath.indexOf('.') > -1) ?
|
|
32
|
-
(getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : shapeData[colorValuePath]) :
|
|
32
|
+
(getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : shapeData[colorValuePath]) :
|
|
33
|
+
shapeData[colorValuePath];
|
|
33
34
|
var colorValue = (!isNullOrUndefined(colorValuePath)) ? ((colorValuePath.indexOf('.') > -1) ?
|
|
34
35
|
Number(getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : Number(shapeData[colorValuePath])) :
|
|
35
36
|
Number(shapeData[colorValuePath]);
|
|
@@ -183,16 +184,17 @@ var Bubble = /** @class */ (function () {
|
|
|
183
184
|
}
|
|
184
185
|
else {
|
|
185
186
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
186
|
-
shape.map(function (current
|
|
187
|
+
shape.map(function (current) {
|
|
187
188
|
points.push(new Point(current['point']['x'], current['point']['y']));
|
|
188
189
|
});
|
|
189
190
|
}
|
|
190
191
|
return points;
|
|
191
192
|
};
|
|
192
|
-
// eslint-disable-next-line valid-jsdoc
|
|
193
193
|
/**
|
|
194
194
|
* To check and trigger bubble click event
|
|
195
195
|
*
|
|
196
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
197
|
+
* @returns {void}
|
|
196
198
|
* @private
|
|
197
199
|
*/
|
|
198
200
|
Bubble.prototype.bubbleClick = function (e) {
|
|
@@ -238,6 +240,8 @@ var Bubble = /** @class */ (function () {
|
|
|
238
240
|
/**
|
|
239
241
|
* To check and trigger bubble move event
|
|
240
242
|
*
|
|
243
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
244
|
+
* @retruns {void}
|
|
241
245
|
* @private
|
|
242
246
|
*/
|
|
243
247
|
Bubble.prototype.bubbleMove = function (e) {
|
|
@@ -18,6 +18,11 @@ export declare class ColorMapping {
|
|
|
18
18
|
getShapeColorMapping(shapeSettings: ShapeSettingsModel, layerData: any, color: string): any;
|
|
19
19
|
/**
|
|
20
20
|
* To color by value and color mapping
|
|
21
|
+
*
|
|
22
|
+
* @param {ColorMappingSettingsModel[]} colorMapping - Specifies the color mapping instance.
|
|
23
|
+
* @param {number} colorValue - Specifies the color value
|
|
24
|
+
* @param {string} equalValue - Specifies the equal value.
|
|
25
|
+
* @returns {any} - Returns the color mapping values.
|
|
21
26
|
*/
|
|
22
27
|
getColorByValue(colorMapping: ColorMappingSettingsModel[], colorValue: number, equalValue: string): any;
|
|
23
28
|
deSaturationColor(colorMapping: ColorMappingSettingsModel, color: string, rangeValue: number, equalValue: string): number;
|
|
@@ -29,6 +29,11 @@ var ColorMapping = /** @class */ (function () {
|
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* To color by value and color mapping
|
|
32
|
+
*
|
|
33
|
+
* @param {ColorMappingSettingsModel[]} colorMapping - Specifies the color mapping instance.
|
|
34
|
+
* @param {number} colorValue - Specifies the color value
|
|
35
|
+
* @param {string} equalValue - Specifies the equal value.
|
|
36
|
+
* @returns {any} - Returns the color mapping values.
|
|
32
37
|
*/
|
|
33
38
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
39
|
ColorMapping.prototype.getColorByValue = function (colorMapping, colorValue, equalValue) {
|
|
@@ -37,7 +42,6 @@ var ColorMapping = /** @class */ (function () {
|
|
|
37
42
|
}
|
|
38
43
|
var fill = '';
|
|
39
44
|
var opacity;
|
|
40
|
-
var gradientColor;
|
|
41
45
|
var gradientFill;
|
|
42
46
|
for (var _i = 0, colorMapping_1 = colorMapping; _i < colorMapping_1.length; _i++) {
|
|
43
47
|
var colorMap = colorMapping_1[_i];
|
|
@@ -103,10 +107,8 @@ var ColorMapping = /** @class */ (function () {
|
|
|
103
107
|
var previousOffset = colorMap.from;
|
|
104
108
|
var nextOffset = colorMap.to;
|
|
105
109
|
var percent = 0;
|
|
106
|
-
var prev1;
|
|
107
110
|
var full = nextOffset - previousOffset;
|
|
108
111
|
var midColor;
|
|
109
|
-
var midreturn;
|
|
110
112
|
percent = (value - previousOffset) / full;
|
|
111
113
|
var previousColor;
|
|
112
114
|
var nextColor;
|
|
@@ -51,7 +51,6 @@ var DataLabel = /** @class */ (function () {
|
|
|
51
51
|
var _this = this;
|
|
52
52
|
var dataLabel = layer.dataLabelSettings;
|
|
53
53
|
var style = layer.dataLabelSettings.textStyle;
|
|
54
|
-
var markerEle;
|
|
55
54
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
55
|
var templateFn;
|
|
57
56
|
var options;
|
|
@@ -63,8 +62,6 @@ var DataLabel = /** @class */ (function () {
|
|
|
63
62
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
63
|
var shapeData = shape;
|
|
65
64
|
var element;
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
67
|
-
var data;
|
|
68
65
|
var text = '';
|
|
69
66
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
67
|
var datasrcObj;
|
|
@@ -186,7 +183,6 @@ var DataLabel = /** @class */ (function () {
|
|
|
186
183
|
location['y'] = ((location['y'] + zoomTransPoint['y']) * scale);
|
|
187
184
|
}
|
|
188
185
|
location['y'] = (this.maps.projectionType === 'Mercator') || layer.geometryType === 'Normal' ? location['y'] : (-location['y']);
|
|
189
|
-
data = location;
|
|
190
186
|
if (!isNullOrUndefined(this.maps.format) && !isNaN(parseFloat(text))) {
|
|
191
187
|
if (this.maps.useGroupingSeparator) {
|
|
192
188
|
text = Internalize(this.maps, parseFloat(text));
|
|
@@ -204,8 +200,6 @@ var DataLabel = /** @class */ (function () {
|
|
|
204
200
|
if (eventargs_1.cancel) {
|
|
205
201
|
return;
|
|
206
202
|
}
|
|
207
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
208
|
-
var border = { color: 'yellow' };
|
|
209
203
|
var position = [];
|
|
210
204
|
var width = zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied
|
|
211
205
|
&& _this.maps.zoomShapeCollection.length > index ? _this.maps.zoomShapeCollection[index]['width'] :
|
|
@@ -326,8 +320,8 @@ var DataLabel = /** @class */ (function () {
|
|
|
326
320
|
}
|
|
327
321
|
if (trimmedLable.length > 1) {
|
|
328
322
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
329
|
-
var
|
|
330
|
-
if (
|
|
323
|
+
var border = eventargs_1.border;
|
|
324
|
+
if (border['width'] > 1) {
|
|
331
325
|
var fill = eventargs_1.fill;
|
|
332
326
|
var opacity = dataLabelSettings.opacity;
|
|
333
327
|
var rx = dataLabelSettings.rx;
|
|
@@ -343,8 +337,8 @@ var DataLabel = /** @class */ (function () {
|
|
|
343
337
|
x = ((location['x'] + transPoint['x']) * scale) - textSize['width'] / 2;
|
|
344
338
|
y = ((location['y'] + transPoint['y']) * scale) - textSize['height'] / 2;
|
|
345
339
|
}
|
|
346
|
-
|
|
347
|
-
var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill,
|
|
340
|
+
border.opacity = isNullOrUndefined(border.opacity) ? opacity : border.opacity;
|
|
341
|
+
var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border, opacity, new Rect((x + labelArgs.offsetX), (y + labelArgs.offsetY), textSize['width'], textSize['height']), rx, ry);
|
|
348
342
|
var rect = _this.maps.renderer.drawRectangle(rectOptions);
|
|
349
343
|
group.appendChild(rect);
|
|
350
344
|
}
|
|
@@ -391,7 +385,7 @@ var DataLabel = /** @class */ (function () {
|
|
|
391
385
|
}
|
|
392
386
|
else {
|
|
393
387
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
394
|
-
shapes.map(function (current
|
|
388
|
+
shapes.map(function (current) {
|
|
395
389
|
points.push(new Point(current['point']['x'], current['point']['y']));
|
|
396
390
|
});
|
|
397
391
|
}
|
|
@@ -406,7 +400,6 @@ var DataLabel = /** @class */ (function () {
|
|
|
406
400
|
return 'DataLabel';
|
|
407
401
|
};
|
|
408
402
|
/**
|
|
409
|
-
*
|
|
410
403
|
* @returns {void}
|
|
411
404
|
* @private
|
|
412
405
|
*/
|
|
@@ -45,11 +45,11 @@ export declare class LayerPanel {
|
|
|
45
45
|
/**
|
|
46
46
|
* layer features as bubble, marker, datalabel, navigation line.
|
|
47
47
|
*
|
|
48
|
-
* @param {
|
|
49
|
-
* @param {
|
|
50
|
-
* @param {
|
|
51
|
-
* @param {
|
|
52
|
-
* @param {
|
|
48
|
+
* @param {Element} groupElement - Specifies the element to append the group.
|
|
49
|
+
* @param {Element} pathEle - Specifies the svg element.
|
|
50
|
+
* @param {string} drawingType - Specifies the data type.
|
|
51
|
+
* @param {any} currentShapeData - Specifies the layer of shapedata.
|
|
52
|
+
* @param {number} index - Specifies the tab index.
|
|
53
53
|
* @returns {void}
|
|
54
54
|
*/
|
|
55
55
|
private pathAttributeCalculate;
|
|
@@ -68,11 +68,11 @@ export declare class LayerPanel {
|
|
|
68
68
|
*
|
|
69
69
|
* @param {LayerSettings} layer - Specifies the layer
|
|
70
70
|
* @param {number} layerIndex - Specifies the layer index
|
|
71
|
-
* @param {
|
|
71
|
+
* @param {any[]} shape - Specifies the shape
|
|
72
72
|
* @param {Element} group - Specifies the group
|
|
73
73
|
* @param {number} shapeIndex - Specifies the shape index
|
|
74
74
|
* @param {HTMLElement} labelTemplateEle - Specifies the label template element
|
|
75
|
-
* @param {
|
|
75
|
+
* @param {any[]} intersect - Specifies the intersect
|
|
76
76
|
* @returns {void}
|
|
77
77
|
*/
|
|
78
78
|
private renderLabel;
|