@syncfusion/ej2-maps 25.1.35 → 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/CHANGELOG.md +17 -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 +624 -398
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +605 -380
- 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 +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 +150 -106
- package/src/maps/utils/helper.d.ts +64 -36
- package/src/maps/utils/helper.js +82 -52
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { click, legendRendering } from '../index';
|
|
2
|
-
import { Rect, measureText, PathOption, textTrim, drawBalloon, removeClass, querySelector,
|
|
2
|
+
import { Rect, measureText, PathOption, textTrim, drawBalloon, removeClass, querySelector, maintainStyleClass, getValueFromObject, getTemplateFunction } from '../utils/helper';
|
|
3
3
|
import { RectOption, Size, TextOption, Point, renderTextElement, drawSymbol, checkPropertyPath, getElement } from '../utils/helper';
|
|
4
4
|
import { isNullOrUndefined, Browser, EventHandler, remove, extend } from '@syncfusion/ej2-base';
|
|
5
5
|
import { Theme } from '../model/theme';
|
|
@@ -155,7 +155,6 @@ var Legend = /** @class */ (function () {
|
|
|
155
155
|
var shapeWidth = legend.shapeWidth;
|
|
156
156
|
var shapeLocation = [];
|
|
157
157
|
var textLocation = [];
|
|
158
|
-
var legendRectCollection = [];
|
|
159
158
|
var position = legend.position;
|
|
160
159
|
var labelAction = legend.labelDisplayMode;
|
|
161
160
|
var arrangement = (legend.orientation === 'None') ? ((position === 'Top' || position === 'Bottom')
|
|
@@ -277,7 +276,6 @@ var Legend = /** @class */ (function () {
|
|
|
277
276
|
j = 0;
|
|
278
277
|
shapeLocation = [];
|
|
279
278
|
textLocation = [];
|
|
280
|
-
legendRectCollection = [];
|
|
281
279
|
shapeX = startX;
|
|
282
280
|
shapeY = startY;
|
|
283
281
|
}
|
|
@@ -299,7 +297,6 @@ var Legend = /** @class */ (function () {
|
|
|
299
297
|
if ((nextPositionX + shapePadding + legendTextSize.width) > legendWidth) {
|
|
300
298
|
shapeX = startX;
|
|
301
299
|
shapeY = startY;
|
|
302
|
-
legendRectCollection = [];
|
|
303
300
|
textLocation = [];
|
|
304
301
|
shapeLocation = [];
|
|
305
302
|
this.getPageChanged();
|
|
@@ -366,9 +363,9 @@ var Legend = /** @class */ (function () {
|
|
|
366
363
|
* Get the legend collections
|
|
367
364
|
*
|
|
368
365
|
* @param {number} layerIndex - Specifies the layer index
|
|
369
|
-
* @param {
|
|
366
|
+
* @param {any[]} layerData - Specifies the layer data
|
|
370
367
|
* @param {ColorMappingSettings[]} colorMapping - Specifies the color mapping
|
|
371
|
-
* @param {
|
|
368
|
+
* @param {any[]} dataSource - Specifies the data source
|
|
372
369
|
* @param {string} dataPath - Specifies the data path
|
|
373
370
|
* @param {string} colorValuePath - Specifies the color value path
|
|
374
371
|
* @param {string | string[]} propertyPath - Specifies the property path
|
|
@@ -410,6 +407,7 @@ var Legend = /** @class */ (function () {
|
|
|
410
407
|
// eslint-disable-next-line valid-jsdoc
|
|
411
408
|
/**
|
|
412
409
|
* To draw the legend shape and text.
|
|
410
|
+
*
|
|
413
411
|
* @private
|
|
414
412
|
*/
|
|
415
413
|
Legend.prototype.drawLegend = function () {
|
|
@@ -454,7 +452,7 @@ var Legend = /** @class */ (function () {
|
|
|
454
452
|
}
|
|
455
453
|
};
|
|
456
454
|
/**
|
|
457
|
-
* @param {
|
|
455
|
+
* @param {number} page - Specifies the legend page.
|
|
458
456
|
* @returns {void}
|
|
459
457
|
* @private
|
|
460
458
|
*/
|
|
@@ -478,8 +476,6 @@ var Legend = /** @class */ (function () {
|
|
|
478
476
|
var legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
|
|
479
477
|
var legendText = collection['DisplayText'];
|
|
480
478
|
var pagingArrowPadding = 4;
|
|
481
|
-
var shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
|
|
482
|
-
legend.shape : 'Image') : collection['legendShape']);
|
|
483
479
|
var strokeColor = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
|
|
484
480
|
|| legend.shape === 'Cross') ? isNullOrUndefined(legend.fill) ? '#000000' : legend.fill : shapeBorder.color;
|
|
485
481
|
var strokeWidth = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
|
|
@@ -864,9 +860,7 @@ var Legend = /** @class */ (function () {
|
|
|
864
860
|
}
|
|
865
861
|
}
|
|
866
862
|
};
|
|
867
|
-
Legend.prototype.shapeHighLightAndSelection = function (
|
|
868
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
869
|
-
targetElement, data, module, getValue, layerIndex) {
|
|
863
|
+
Legend.prototype.shapeHighLightAndSelection = function (targetElement, data, module, getValue, layerIndex) {
|
|
870
864
|
if (data !== undefined) {
|
|
871
865
|
this.updateLegendElement();
|
|
872
866
|
this.shapeToggled = true;
|
|
@@ -1292,9 +1286,12 @@ var Legend = /** @class */ (function () {
|
|
|
1292
1286
|
}
|
|
1293
1287
|
if (legendTitle) {
|
|
1294
1288
|
textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
|
|
1295
|
-
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily
|
|
1296
|
-
|
|
1297
|
-
textStyle.
|
|
1289
|
+
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily
|
|
1290
|
+
: this.maps.themeStyle.fontFamily;
|
|
1291
|
+
textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size
|
|
1292
|
+
: this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
|
|
1293
|
+
textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight
|
|
1294
|
+
: this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
|
|
1298
1295
|
textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
|
|
1299
1296
|
var element = renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
1300
1297
|
element.setAttribute('aria-label', legendTitle);
|
|
@@ -1398,7 +1395,6 @@ var Legend = /** @class */ (function () {
|
|
|
1398
1395
|
var field = marker.legendText;
|
|
1399
1396
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1400
1397
|
var templateFn;
|
|
1401
|
-
var isDuplicate;
|
|
1402
1398
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1403
1399
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
1404
1400
|
var imageSrc = null;
|
|
@@ -1410,6 +1406,7 @@ var Legend = /** @class */ (function () {
|
|
|
1410
1406
|
var templateElement = templateFn(_this.maps);
|
|
1411
1407
|
var markerEle = isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] :
|
|
1412
1408
|
templateElement;
|
|
1409
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1413
1410
|
imageSrc = markerEle.querySelector('img').src;
|
|
1414
1411
|
}
|
|
1415
1412
|
var text = isNullOrUndefined(data[field]) ? '' : data[field];
|
|
@@ -1550,7 +1547,6 @@ var Legend = /** @class */ (function () {
|
|
|
1550
1547
|
var equalValues = [];
|
|
1551
1548
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1552
1549
|
var legendText;
|
|
1553
|
-
var legendIndex = 0;
|
|
1554
1550
|
var equalData = [];
|
|
1555
1551
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1556
1552
|
var outOfRangeValues = [];
|
|
@@ -1593,7 +1589,6 @@ var Legend = /** @class */ (function () {
|
|
|
1593
1589
|
}
|
|
1594
1590
|
var legendFill = (isNullOrUndefined(fill)) ? Object.prototype.toString.call(colorMap.color) === '[object Array]'
|
|
1595
1591
|
? colorMap.color[0] : colorMap.color : fill;
|
|
1596
|
-
legendIndex++;
|
|
1597
1592
|
this_2.getOverallLegendItemsCollection(legendText, legendFill, equalData, colorMap.showLegend);
|
|
1598
1593
|
}
|
|
1599
1594
|
else if (isNullOrUndefined(colorMap.minOpacity) && isNullOrUndefined(colorMap.maxOpacity) && isNullOrUndefined(colorMap.value)
|
|
@@ -1609,7 +1604,6 @@ var Legend = /** @class */ (function () {
|
|
|
1609
1604
|
}
|
|
1610
1605
|
});
|
|
1611
1606
|
if (outOfRangeValues.length === 0) {
|
|
1612
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1613
1607
|
var range_1 = false;
|
|
1614
1608
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1615
1609
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
@@ -1634,7 +1628,6 @@ var Legend = /** @class */ (function () {
|
|
|
1634
1628
|
var outfill = ((Object.prototype.toString.call(colorMap.color) === '[object Array]'))
|
|
1635
1629
|
? colorMap.color[0] : colorMap.color;
|
|
1636
1630
|
var legendOutFill = outfill;
|
|
1637
|
-
legendIndex++;
|
|
1638
1631
|
this_2.getOverallLegendItemsCollection(legendText, legendOutFill, outOfRange, colorMap.showLegend);
|
|
1639
1632
|
}
|
|
1640
1633
|
};
|
|
@@ -1851,7 +1844,12 @@ var Legend = /** @class */ (function () {
|
|
|
1851
1844
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
1852
1845
|
}
|
|
1853
1846
|
else {
|
|
1854
|
-
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
1847
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
1848
|
+
? 0 : this.maps.layers[k].shapeSettings.border.width,
|
|
1849
|
+
/* eslint-disable-next-line max-len */
|
|
1850
|
+
isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
1851
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
1852
|
+
: this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[k].shapeSettings.fill);
|
|
1855
1853
|
}
|
|
1856
1854
|
}
|
|
1857
1855
|
}
|
|
@@ -1920,7 +1918,12 @@ var Legend = /** @class */ (function () {
|
|
|
1920
1918
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
1921
1919
|
}
|
|
1922
1920
|
else {
|
|
1923
|
-
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width)
|
|
1921
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width)
|
|
1922
|
+
? 0 : this.maps.layers[j].shapeSettings.border.width,
|
|
1923
|
+
/* eslint-disable-next-line max-len */
|
|
1924
|
+
isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity)
|
|
1925
|
+
? this.maps.layers[j].shapeSettings.opacity
|
|
1926
|
+
: this.maps.layers[j].shapeSettings.border.opacity, this.maps.layers[j].shapeSettings.fill);
|
|
1924
1927
|
}
|
|
1925
1928
|
}
|
|
1926
1929
|
}
|
|
@@ -1998,7 +2001,15 @@ var Legend = /** @class */ (function () {
|
|
|
1998
2001
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
1999
2002
|
}
|
|
2000
2003
|
else {
|
|
2001
|
-
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color,
|
|
2004
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color,
|
|
2005
|
+
/* eslint-disable-next-line max-len */
|
|
2006
|
+
(isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
2007
|
+
? 0
|
|
2008
|
+
: this.maps.layers[k].shapeSettings.border.width),
|
|
2009
|
+
/* eslint-disable-next-line max-len */
|
|
2010
|
+
(isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
2011
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
2012
|
+
: this.maps.layers[k].shapeSettings.border.opacity), this.maps.layers[k].shapeSettings.fill);
|
|
2002
2013
|
}
|
|
2003
2014
|
}
|
|
2004
2015
|
}
|
|
@@ -2069,7 +2080,13 @@ var Legend = /** @class */ (function () {
|
|
|
2069
2080
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
2070
2081
|
}
|
|
2071
2082
|
else {
|
|
2072
|
-
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
2083
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
2084
|
+
? 0
|
|
2085
|
+
: this.maps.layers[k].shapeSettings.border.width,
|
|
2086
|
+
/* eslint-disable-next-line max-len */
|
|
2087
|
+
isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
2088
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
2089
|
+
: this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[0].shapeSettings.fill);
|
|
2073
2090
|
}
|
|
2074
2091
|
}
|
|
2075
2092
|
}
|
|
@@ -35,6 +35,7 @@ export declare class Marker {
|
|
|
35
35
|
calculateZoomCenterPositionAndFactor(layersCollection: LayerSettings[]): void;
|
|
36
36
|
/**
|
|
37
37
|
* To check and trigger marker click event
|
|
38
|
+
*
|
|
38
39
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
39
40
|
* @returns {void}
|
|
40
41
|
* @private
|
|
@@ -42,6 +43,7 @@ export declare class Marker {
|
|
|
42
43
|
markerClick(e: PointerEvent): void;
|
|
43
44
|
/**
|
|
44
45
|
* To check and trigger Cluster click event
|
|
46
|
+
*
|
|
45
47
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
46
48
|
* @returns {void}
|
|
47
49
|
* @private
|
|
@@ -51,7 +53,7 @@ export declare class Marker {
|
|
|
51
53
|
* To get marker from target id
|
|
52
54
|
*
|
|
53
55
|
* @param {string} target - Specifies the target
|
|
54
|
-
* @returns {
|
|
56
|
+
* @returns {object} - Returns the marker, data, clusterCollection, markCollection
|
|
55
57
|
*/
|
|
56
58
|
private getMarker;
|
|
57
59
|
/**
|
|
@@ -70,7 +72,10 @@ export declare class Marker {
|
|
|
70
72
|
* @private
|
|
71
73
|
*/
|
|
72
74
|
markerClusterMouseMove(e: PointerEvent): void;
|
|
73
|
-
/** @private
|
|
75
|
+
/** @private
|
|
76
|
+
*
|
|
77
|
+
* @returns {void}
|
|
78
|
+
*/
|
|
74
79
|
initializeMarkerClusterList(): void;
|
|
75
80
|
/**
|
|
76
81
|
* Get module name.
|
|
@@ -58,6 +58,7 @@ var Marker = /** @class */ (function () {
|
|
|
58
58
|
border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
|
|
59
59
|
shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
|
|
60
60
|
};
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
61
62
|
maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
62
63
|
eventArgs = markerColorChoose(eventArgs, data);
|
|
63
64
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
@@ -164,9 +165,6 @@ var Marker = /** @class */ (function () {
|
|
|
164
165
|
var maxLat_1;
|
|
165
166
|
var minLat_1;
|
|
166
167
|
var maxLong_1;
|
|
167
|
-
var latZoom = void 0;
|
|
168
|
-
var lngZoom = void 0;
|
|
169
|
-
var result = void 0;
|
|
170
168
|
var zoomLevel = void 0;
|
|
171
169
|
var centerLat = void 0;
|
|
172
170
|
var centerLong = void 0;
|
|
@@ -284,6 +282,7 @@ var Marker = /** @class */ (function () {
|
|
|
284
282
|
};
|
|
285
283
|
/**
|
|
286
284
|
* To check and trigger marker click event
|
|
285
|
+
*
|
|
287
286
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
288
287
|
* @returns {void}
|
|
289
288
|
* @private
|
|
@@ -304,7 +303,7 @@ var Marker = /** @class */ (function () {
|
|
|
304
303
|
return;
|
|
305
304
|
}
|
|
306
305
|
if (options.marker.enableDrag) {
|
|
307
|
-
document.getElementById(this.maps.element.id +
|
|
306
|
+
document.getElementById(this.maps.element.id + '_svg').style.cursor = 'grabbing';
|
|
308
307
|
}
|
|
309
308
|
var eventArgs = {
|
|
310
309
|
cancel: false, name: markerClick, data: options.data, maps: this.maps,
|
|
@@ -321,7 +320,7 @@ var Marker = /** @class */ (function () {
|
|
|
321
320
|
var dataIndex_1 = parseInt(target.split('_dataIndex_')[1].split('_')[0], 10);
|
|
322
321
|
var marker_1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
|
|
323
322
|
if (this.sameMarkerData.length > 0) {
|
|
324
|
-
isCluster = (this.sameMarkerData[0].data.filter(function (el) { return (el['index']
|
|
323
|
+
isCluster = (this.sameMarkerData[0].data.filter(function (el) { return (el['index'] === dataIndex_1); })).length > 0 &&
|
|
325
324
|
this.sameMarkerData[0].layerIndex === layerIndex && this.sameMarkerData[0].markerIndex === markerIndex;
|
|
326
325
|
}
|
|
327
326
|
if (!isCluster) {
|
|
@@ -336,7 +335,8 @@ var Marker = /** @class */ (function () {
|
|
|
336
335
|
targetId: target, x: e.clientX, y: e.clientY,
|
|
337
336
|
latitude: options.data['latitude'] || options.data['Latitude'],
|
|
338
337
|
longitude: options.data['longitude'] || options.data['Longitude'],
|
|
339
|
-
shape: isNullOrUndefined(marker_1.shapeValuePath) ? marker_1.shape
|
|
338
|
+
shape: isNullOrUndefined(marker_1.shapeValuePath) ? marker_1.shape
|
|
339
|
+
: marker_1.dataSource[dataIndex_1][marker_1.shapeValuePath],
|
|
340
340
|
layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex_1
|
|
341
341
|
};
|
|
342
342
|
}
|
|
@@ -344,6 +344,7 @@ var Marker = /** @class */ (function () {
|
|
|
344
344
|
};
|
|
345
345
|
/**
|
|
346
346
|
* To check and trigger Cluster click event
|
|
347
|
+
*
|
|
347
348
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
348
349
|
* @returns {void}
|
|
349
350
|
* @private
|
|
@@ -364,7 +365,7 @@ var Marker = /** @class */ (function () {
|
|
|
364
365
|
}
|
|
365
366
|
if (this.sameMarkerData.length > 0 && !this.maps.markerClusterExpandCheck) {
|
|
366
367
|
this.maps.markerClusterExpandCheck = true;
|
|
367
|
-
mergeSeparateCluster(this.sameMarkerData, this.maps
|
|
368
|
+
mergeSeparateCluster(this.sameMarkerData, this.maps);
|
|
368
369
|
}
|
|
369
370
|
else {
|
|
370
371
|
this.sameMarkerData = options.clusterCollection;
|
|
@@ -384,7 +385,7 @@ var Marker = /** @class */ (function () {
|
|
|
384
385
|
* To get marker from target id
|
|
385
386
|
*
|
|
386
387
|
* @param {string} target - Specifies the target
|
|
387
|
-
* @returns {
|
|
388
|
+
* @returns {object} - Returns the marker, data, clusterCollection, markCollection
|
|
388
389
|
*/
|
|
389
390
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
390
391
|
Marker.prototype.getMarker = function (target) {
|
|
@@ -453,7 +454,7 @@ var Marker = /** @class */ (function () {
|
|
|
453
454
|
return;
|
|
454
455
|
}
|
|
455
456
|
if (options.marker.enableDrag) {
|
|
456
|
-
document.getElementById(this.maps.element.id +
|
|
457
|
+
document.getElementById(this.maps.element.id + '_svg').style.cursor = isNullOrUndefined(this.maps.markerDragArgument) ?
|
|
457
458
|
'pointer' : 'grabbing';
|
|
458
459
|
}
|
|
459
460
|
var eventArgs = {
|
|
@@ -487,7 +488,10 @@ var Marker = /** @class */ (function () {
|
|
|
487
488
|
};
|
|
488
489
|
this.maps.trigger(markerClusterMouseMove, eventArgs);
|
|
489
490
|
};
|
|
490
|
-
/** @private
|
|
491
|
+
/** @private
|
|
492
|
+
*
|
|
493
|
+
* @returns {void}
|
|
494
|
+
*/
|
|
491
495
|
Marker.prototype.initializeMarkerClusterList = function () {
|
|
492
496
|
for (var i = 0; i < this.maps.layers.length; i++) {
|
|
493
497
|
this.initialMarkerCluster[i] = [];
|
|
@@ -124,6 +124,7 @@ var NavigationLine = /** @class */ (function () {
|
|
|
124
124
|
pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
|
|
125
125
|
navigationEle = this.maps.renderer.drawPath(pathOption);
|
|
126
126
|
if (!isNullOrUndefined(arrowPosition)) {
|
|
127
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
127
128
|
var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
|
|
128
129
|
: navigationEle.setAttribute('marker-end', endArrow);
|
|
129
130
|
}
|
|
@@ -3,8 +3,12 @@ import { PathOption, calculatePolygonPath, maintainSelection } from '../utils/he
|
|
|
3
3
|
* When injected, this module will be used to render polygon shapes over the Maps.
|
|
4
4
|
*/
|
|
5
5
|
var Polygon = /** @class */ (function () {
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
6
8
|
function Polygon(maps) {
|
|
7
9
|
}
|
|
10
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
11
|
+
/* eslint-enable @typescript-eslint/no-empty-function */
|
|
8
12
|
/**
|
|
9
13
|
* To render polygon for maps
|
|
10
14
|
*
|
|
@@ -23,7 +27,6 @@ var Polygon = /** @class */ (function () {
|
|
|
23
27
|
var polygonSVGObject = maps.renderer.createGroup({
|
|
24
28
|
id: maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group_' + polygonIndex
|
|
25
29
|
});
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
30
|
var polygonData = polygonSetting.points;
|
|
28
31
|
var path = calculatePolygonPath(maps, factor, currentLayer, polygonData);
|
|
29
32
|
var pathOptions = new PathOption(maps.element.id + '_LayerIndex_' + layerIndex + '_PolygonIndex_' + polygonIndex, polygonSetting.fill, (polygonSetting.borderWidth / factor), polygonSetting.borderColor, polygonSetting.opacity, polygonSetting.borderOpacity, '', path);
|
|
@@ -48,6 +51,7 @@ var Polygon = /** @class */ (function () {
|
|
|
48
51
|
* @returns {void}
|
|
49
52
|
* @private
|
|
50
53
|
*/
|
|
54
|
+
//eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
51
55
|
Polygon.prototype.destroy = function () {
|
|
52
56
|
};
|
|
53
57
|
return Polygon;
|
package/src/maps/maps-model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Fetch } 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 } from './model/base';import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';import { ZoomSettingsModel, LegendSettingsModel, LayerSettingsModel, BubbleSettingsModel, PolygonSettingsModel } 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,
|
|
1
|
+
import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Fetch } 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 } from './model/base';import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';import { ZoomSettingsModel, LegendSettingsModel, LayerSettingsModel, BubbleSettingsModel, PolygonSettingsModel } 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, doubleClick, resize, shapeSelected, zoomIn } from './model/constants';import { ProjectionType, MapsTheme, PanDirection, TooltipGesture } from './utils/enum';import { getThemeStyle, Theme } from './model/theme';import { ILoadEventArgs, ILoadedEventArgs, IMinMaxLatitudeLongitude, 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, calculateZoomLevel, convertTileLatLongToPoint, convertGeoToPoint} from '../maps/utils/helper';import { Annotations } from '../maps/user-interaction/annotation';import { FontModel, DataLabel, MarkerSettings, IAnnotationRenderingEventArgs, IMarkerDragEventArgs } from './index';import { NavigationLineSettingsModel, changeBorderWidth } from './index';import { NavigationLine } from './layers/navigation-selected-line';import { Polygon } from './layers/polygon';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
|
/**
|
|
@@ -386,17 +386,17 @@ export interface MapsModel extends ComponentModel{
|
|
|
386
386
|
pan?: EmitType<IMapPanEventArgs>;
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
* This event is triggered after performing the panning action.
|
|
390
|
+
*
|
|
391
|
+
* @event panComplete
|
|
392
|
+
*/
|
|
393
393
|
panComplete?: EmitType<IMapPanEventArgs>;
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
396
|
+
* This event is triggered after the zooming operation is completed.
|
|
397
|
+
*
|
|
398
|
+
* @event zoomComplete
|
|
399
|
+
*/
|
|
400
400
|
zoomComplete?: EmitType<IMapPanEventArgs>;
|
|
401
401
|
|
|
402
402
|
}
|
package/src/maps/maps.d.ts
CHANGED
|
@@ -459,16 +459,16 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
459
459
|
*/
|
|
460
460
|
pan: EmitType<IMapPanEventArgs>;
|
|
461
461
|
/**
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
462
|
+
* This event is triggered after performing the panning action.
|
|
463
|
+
*
|
|
464
|
+
* @event panComplete
|
|
465
|
+
*/
|
|
466
466
|
panComplete: EmitType<IMapPanEventArgs>;
|
|
467
467
|
/**
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
468
|
+
* This event is triggered after the zooming operation is completed.
|
|
469
|
+
*
|
|
470
|
+
* @event zoomComplete
|
|
471
|
+
*/
|
|
472
472
|
zoomComplete: EmitType<IMapPanEventArgs>;
|
|
473
473
|
/**
|
|
474
474
|
* Specifies the function to format the text contents in the maps.
|
|
@@ -799,11 +799,11 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
799
799
|
* @param {SelectionSettingsModel} selectionSettings - Specifies the selection settings
|
|
800
800
|
* @param {Maps} map - Specifies the instance of the maps
|
|
801
801
|
* @param {Element} targetElement - Specifies the target element
|
|
802
|
-
* @param {
|
|
802
|
+
* @param {object} data - Specifies the data
|
|
803
803
|
* @returns {void}
|
|
804
804
|
* @private
|
|
805
805
|
*/
|
|
806
|
-
markerSelection(selectionSettings: SelectionSettingsModel, map: Maps, targetElement: Element, data:
|
|
806
|
+
markerSelection(selectionSettings: SelectionSettingsModel, map: Maps, targetElement: Element, data: object): void;
|
|
807
807
|
/**
|
|
808
808
|
* initial selection of marker
|
|
809
809
|
*
|
|
@@ -920,7 +920,21 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
920
920
|
private clickHandler;
|
|
921
921
|
private triggerShapeSelection;
|
|
922
922
|
private getMarkerClickLocation;
|
|
923
|
-
/**
|
|
923
|
+
/**
|
|
924
|
+
* Gets the location of the mouse click
|
|
925
|
+
*
|
|
926
|
+
* @param {string} targetId - Specifies the ID for the target.
|
|
927
|
+
* @param {number} pageX - Defines the page X position.
|
|
928
|
+
* @param {number} pageY - Defines the page Y position.
|
|
929
|
+
* @param {HTMLElement} targetElement - Specifies the target element on the event.
|
|
930
|
+
* @param {number} x - Defines the x position in pixel.
|
|
931
|
+
* @param {number} y - Defines the y position in pixel.
|
|
932
|
+
* @param {string} type - Specifies the type.
|
|
933
|
+
* @returns {GeoPosition} - Returns the position of the event
|
|
934
|
+
*
|
|
935
|
+
* @private
|
|
936
|
+
*
|
|
937
|
+
*/
|
|
924
938
|
getClickLocation(targetId: string, pageX: number, pageY: number, targetElement: HTMLElement, x: number, y: number, type?: string): GeoPosition;
|
|
925
939
|
private removeTileMap;
|
|
926
940
|
/**
|
|
@@ -983,6 +997,8 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
983
997
|
* This method is used to zoom the map by specifying the center position.
|
|
984
998
|
*
|
|
985
999
|
* @param {number} centerPosition - Specifies the location of the maps to be zoomed as geographical coordinates.
|
|
1000
|
+
* @param {number} centerPosition.longitude - Specifies the longitude of the location to be zoomed.
|
|
1001
|
+
* @param {number} centerPosition.latitude - Specifies the latitude of the location to be zoomed.
|
|
986
1002
|
* @param {number} zoomFactor - Specifies the zoom factor for the maps.
|
|
987
1003
|
* @returns {void}
|
|
988
1004
|
*/
|
|
@@ -1122,6 +1138,8 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
1122
1138
|
private isPolygonVisible;
|
|
1123
1139
|
/**
|
|
1124
1140
|
* To find marker visibility
|
|
1141
|
+
*
|
|
1142
|
+
* @returns {boolean} - Returns whether the bubble is visible or not.
|
|
1125
1143
|
*/
|
|
1126
1144
|
private isBubbleVisible;
|
|
1127
1145
|
/**
|
|
@@ -1165,7 +1183,7 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
1165
1183
|
* @param {boolean} istooltipVisible - Specifies whether the tooltip is visible or not.
|
|
1166
1184
|
* @param {boolean} isSelection - Specifies whether the shape is selectd or not.
|
|
1167
1185
|
* @param {boolean} isHighlight - Specfies whether the shape is highlighted or not.
|
|
1168
|
-
* @returns {
|
|
1186
|
+
* @returns {object} - Returns the boolean values in object.
|
|
1169
1187
|
*/
|
|
1170
1188
|
private findVisibleLayers;
|
|
1171
1189
|
/**
|