@syncfusion/ej2-maps 21.1.37 → 21.1.41
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 +15 -1
- 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 +34 -47
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +34 -47
- 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/maps.d.ts +1 -7
- package/src/maps/maps.js +26 -40
- package/src/maps/user-interaction/selection.js +2 -2
- package/src/maps/user-interaction/zoom.js +2 -3
- package/src/maps/utils/helper.js +4 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.1.
|
|
3
|
+
* version : 21.1.41
|
|
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@21.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-maps@21.1.38",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-c71dZus+LhjA/wl4pVp8K6bUPD0saJvxdhJwWCiztGmHq1rimww/cHBVA8l8XXyqVWE2aVl9baZNrlnO5Nlp0A==",
|
|
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-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-21.1.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-21.1.38.tgz",
|
|
27
|
+
"_shasum": "361a02226d73f9daa669a99091c29efcb30957c0",
|
|
28
28
|
"_spec": "@syncfusion/ej2-maps@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~21.1.
|
|
38
|
+
"@syncfusion/ej2-base": "~21.1.40",
|
|
39
39
|
"@syncfusion/ej2-buttons": "~21.1.37",
|
|
40
40
|
"@syncfusion/ej2-compression": "~21.1.37",
|
|
41
|
-
"@syncfusion/ej2-data": "~21.1.
|
|
41
|
+
"@syncfusion/ej2-data": "~21.1.38",
|
|
42
42
|
"@syncfusion/ej2-file-utils": "~21.1.37",
|
|
43
43
|
"@syncfusion/ej2-pdf-export": "~21.1.37",
|
|
44
|
-
"@syncfusion/ej2-svg-base": "~21.1.
|
|
44
|
+
"@syncfusion/ej2-svg-base": "~21.1.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",
|
|
@@ -93,6 +93,6 @@
|
|
|
93
93
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
94
94
|
},
|
|
95
95
|
"typings": "index.d.ts",
|
|
96
|
-
"version": "21.1.
|
|
96
|
+
"version": "21.1.41",
|
|
97
97
|
"sideEffects": false
|
|
98
98
|
}
|
package/src/maps/maps.d.ts
CHANGED
|
@@ -798,6 +798,7 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
798
798
|
* @returns {void}
|
|
799
799
|
*/
|
|
800
800
|
private addTabIndex;
|
|
801
|
+
private setSecondaryElementPosition;
|
|
801
802
|
private zoomingChange;
|
|
802
803
|
private createSecondaryElement;
|
|
803
804
|
/**
|
|
@@ -1078,13 +1079,6 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
1078
1079
|
* @returns {boolean} - Returns whether the navigation lines are visible or not.
|
|
1079
1080
|
*/
|
|
1080
1081
|
private isNavigationVisible;
|
|
1081
|
-
/**
|
|
1082
|
-
* To find space between the secondary element and svg element.
|
|
1083
|
-
*
|
|
1084
|
-
* @returns {Point} - Returns the left and top value of the secondary element of Maps.
|
|
1085
|
-
* @private
|
|
1086
|
-
*/
|
|
1087
|
-
getExtraPosition(): Point;
|
|
1088
1082
|
/**
|
|
1089
1083
|
* To find marker visibility
|
|
1090
1084
|
*/
|
package/src/maps/maps.js
CHANGED
|
@@ -398,15 +398,8 @@ var Maps = /** @class */ (function (_super) {
|
|
|
398
398
|
if (!isNullOrUndefined(this.svgObject)) {
|
|
399
399
|
this.element.appendChild(this.svgObject);
|
|
400
400
|
}
|
|
401
|
-
|
|
401
|
+
this.setSecondaryElementPosition();
|
|
402
402
|
for (var i = 0; i < this.layers.length; i++) {
|
|
403
|
-
if (position.x !== 0 || position.y !== 0) {
|
|
404
|
-
var markerTemplate = document.getElementById(this.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
|
|
405
|
-
if (!isNullOrUndefined(markerTemplate)) {
|
|
406
|
-
markerTemplate.style.top = this.mapAreaRect.y + position.y + 'px';
|
|
407
|
-
markerTemplate.style.left = this.mapAreaRect.x + position.x + 'px';
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
403
|
if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
|
|
411
404
|
this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
|
|
412
405
|
var checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
|
|
@@ -596,15 +589,13 @@ var Maps = /** @class */ (function (_super) {
|
|
|
596
589
|
this.element.setAttribute('role', '');
|
|
597
590
|
this.element.tabIndex = this.tabIndex;
|
|
598
591
|
};
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
// }
|
|
607
|
-
// }
|
|
592
|
+
Maps.prototype.setSecondaryElementPosition = function () {
|
|
593
|
+
var element = getElementByID(this.element.id + '_Secondary_Element');
|
|
594
|
+
var rect = this.element.getBoundingClientRect();
|
|
595
|
+
var svgRect = getElementByID(this.element.id + '_svg').getBoundingClientRect();
|
|
596
|
+
element.style.marginLeft = Math.max(svgRect.left - rect.left, 0) + 'px';
|
|
597
|
+
element.style.marginTop = Math.max(svgRect.top - rect.top, 0) + 'px';
|
|
598
|
+
};
|
|
608
599
|
Maps.prototype.zoomingChange = function () {
|
|
609
600
|
var left;
|
|
610
601
|
var top;
|
|
@@ -1177,7 +1168,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1177
1168
|
latLongValue.latitude = -latLongValue.latitude;
|
|
1178
1169
|
}
|
|
1179
1170
|
}
|
|
1180
|
-
else if (targetId.indexOf('_MarkerIndex_') > -1 && this.markerModule) {
|
|
1171
|
+
else if (targetId.indexOf('_MarkerIndex_') > -1 && this.markerModule && !this.markerDragArgument) {
|
|
1181
1172
|
var markerIndex = parseInt(targetId.split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
1182
1173
|
var dataIndex = parseInt(targetId.split('_dataIndex_')[1].split('_')[0], 10);
|
|
1183
1174
|
if (!isNaN(markerIndex) && !isNaN(dataIndex)) {
|
|
@@ -1188,6 +1179,23 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1188
1179
|
latLongValue = { latitude: null, longitude: null };
|
|
1189
1180
|
}
|
|
1190
1181
|
}
|
|
1182
|
+
else if (targetId.indexOf('_MarkerIndex_') > -1 && this.markerModule && this.markerDragArgument) {
|
|
1183
|
+
var element = document.getElementById(this.element.id + '_LayerIndex_' + this.markerDragArgument.layerIndex);
|
|
1184
|
+
var elementRect = element.getBoundingClientRect();
|
|
1185
|
+
var location_3 = new MapLocation(pageX > elementRect.left ? Math.abs(elementRect.left - pageX) : 0, pageY > elementRect.top ? Math.abs(elementRect.top - pageY) : 0);
|
|
1186
|
+
var minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * this.mapLayerPanel.currentFactor);
|
|
1187
|
+
var minLatitude = Math.abs(this.baseMapBounds.latitude.max * this.mapLayerPanel.currentFactor);
|
|
1188
|
+
latLongValue = {
|
|
1189
|
+
latitude: Math.abs(this.baseMapBounds.latitude.max - (location_3.y / (this.mapLayerPanel.currentFactor * this.scale))),
|
|
1190
|
+
longitude: Math.abs((location_3.x / (this.mapLayerPanel.currentFactor * this.scale)) + this.baseMapBounds.longitude.min)
|
|
1191
|
+
};
|
|
1192
|
+
if (this.baseMapBounds.longitude.min < 0 && minLongitude > location_3.x) {
|
|
1193
|
+
latLongValue.longitude = -latLongValue.longitude;
|
|
1194
|
+
}
|
|
1195
|
+
if (this.baseMapBounds.latitude.min < 0 && minLatitude > location_3.y) {
|
|
1196
|
+
latLongValue.latitude = -latLongValue.latitude;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1191
1199
|
else {
|
|
1192
1200
|
latLongValue = { latitude: null, longitude: null };
|
|
1193
1201
|
}
|
|
@@ -2208,28 +2216,6 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2208
2216
|
});
|
|
2209
2217
|
return isVisible;
|
|
2210
2218
|
};
|
|
2211
|
-
/**
|
|
2212
|
-
* To find space between the secondary element and svg element.
|
|
2213
|
-
*
|
|
2214
|
-
* @returns {Point} - Returns the left and top value of the secondary element of Maps.
|
|
2215
|
-
* @private
|
|
2216
|
-
*/
|
|
2217
|
-
Maps.prototype.getExtraPosition = function () {
|
|
2218
|
-
var top = 0;
|
|
2219
|
-
var left = 0;
|
|
2220
|
-
var svgElement = getElement(this.element.id + '_svg');
|
|
2221
|
-
if (!isNullOrUndefined(svgElement)) {
|
|
2222
|
-
var svgClientRects = svgElement.getClientRects();
|
|
2223
|
-
var mapsClientRects = (getElement(this.element.id + '_Secondary_Element')).getClientRects();
|
|
2224
|
-
if (svgClientRects.length !== 0 && mapsClientRects.length !== 0) {
|
|
2225
|
-
var svgClientRect = svgClientRects[0];
|
|
2226
|
-
var mapsClientRect = mapsClientRects[0];
|
|
2227
|
-
top = svgClientRect.top - mapsClientRect.top;
|
|
2228
|
-
left = svgClientRect.left - mapsClientRect.left;
|
|
2229
|
-
}
|
|
2230
|
-
}
|
|
2231
|
-
return new Point(left, top);
|
|
2232
|
-
};
|
|
2233
2219
|
/**
|
|
2234
2220
|
* To find marker visibility
|
|
2235
2221
|
*/
|
|
@@ -71,7 +71,7 @@ var Selection = /** @class */ (function () {
|
|
|
71
71
|
this.selectionsettings = this.maps.layers[layerIndex].markerSettings[markerIndex].selectionSettings;
|
|
72
72
|
this.selectionType = 'Marker';
|
|
73
73
|
}
|
|
74
|
-
else {
|
|
74
|
+
else if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
75
75
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
76
76
|
shapeData = null;
|
|
77
77
|
data = {
|
|
@@ -81,7 +81,7 @@ var Selection = /** @class */ (function () {
|
|
|
81
81
|
this.selectionsettings = this.maps.layers[layerIndex].navigationLineSettings[index].selectionSettings;
|
|
82
82
|
this.selectionType = 'navigationline';
|
|
83
83
|
}
|
|
84
|
-
if (this.selectionsettings.enable) {
|
|
84
|
+
if (!isNullOrUndefined(this.selectionsettings) && this.selectionsettings.enable) {
|
|
85
85
|
this.selectElement(targetElement, layerIndex, data, shapeData);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -1553,9 +1553,8 @@ var Zoom = /** @class */ (function () {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
break;
|
|
1555
1555
|
}
|
|
1556
|
-
|
|
1557
|
-
element.style.
|
|
1558
|
-
element.style.top = y + extraPosition.y + 'px';
|
|
1556
|
+
element.style.left = x + 'px';
|
|
1557
|
+
element.style.top = y + 'px';
|
|
1559
1558
|
var color = this.maps.toolbarProperties.highlightColor || this.maps.themeStyle.zoomSelectionColor;
|
|
1560
1559
|
var css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
|
|
1561
1560
|
'.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
|
package/src/maps/utils/helper.js
CHANGED
|
@@ -56,6 +56,7 @@ export function stringToNumber(value, containerSize) {
|
|
|
56
56
|
export function calculateSize(maps) {
|
|
57
57
|
maps.element.style.height = !isNullOrUndefined(maps.height) ? maps.height : 'auto';
|
|
58
58
|
maps.element.style.width = !isNullOrUndefined(maps.width) ? maps.width : 'auto';
|
|
59
|
+
maps.element.style.setProperty("display", "block");
|
|
59
60
|
var containerWidth = maps.element.clientWidth;
|
|
60
61
|
var containerHeight = maps.element.clientHeight;
|
|
61
62
|
var containerElementWidth = stringToNumber(maps.element.style.width, containerWidth);
|
|
@@ -1852,8 +1853,9 @@ export function findMidPointOfPolygon(points, type, geometryType) {
|
|
|
1852
1853
|
ySum = ySum + Math.abs(((startY + startY1) * (((startX * startY1) - (startX1 * startY)))));
|
|
1853
1854
|
}
|
|
1854
1855
|
sum = 0.5 * sum;
|
|
1855
|
-
|
|
1856
|
-
|
|
1856
|
+
var pointValue = points.some(function (point) { return point.x < 5 && point.y < 5; }) && geometryType === 'Normal' ? 6 : 4;
|
|
1857
|
+
xSum = (1 / (pointValue * sum)) * xSum;
|
|
1858
|
+
ySum = (1 / (pointValue * sum)) * ySum;
|
|
1857
1859
|
/* Code for finding nearest points in polygon related to midPoint*/
|
|
1858
1860
|
var rightMinPoint = { x: 0, y: 0 };
|
|
1859
1861
|
var rightMaxPoint = { x: 0, y: 0 };
|