@syncfusion/ej2-maps 28.1.33 → 28.2.3
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/README.md +1 -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 +41 -22
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +43 -22
- 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 +12 -12
- package/src/maps/layers/layer-panel.js +1 -1
- package/src/maps/layers/legend.js +7 -3
- package/src/maps/maps.js +1 -1
- package/src/maps/model/base-model.d.ts +2 -2
- package/src/maps/model/base.d.ts +2 -2
- package/src/maps/user-interaction/zoom.d.ts +4 -2
- package/src/maps/user-interaction/zoom.js +21 -16
- package/src/maps/utils/helper.d.ts +16 -0
- package/src/maps/utils/helper.js +13 -0
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -382,6 +382,18 @@ var Point = /** @__PURE__ @class */ (function () {
|
|
|
382
382
|
}
|
|
383
383
|
return Point;
|
|
384
384
|
}());
|
|
385
|
+
/**
|
|
386
|
+
* Specifies the position of the legend on the map, with options to set the
|
|
387
|
+
* position values as percentages. The legend is placed relative to the Maps,
|
|
388
|
+
* ensuring responsiveness.
|
|
389
|
+
*/
|
|
390
|
+
var RelativePoint = /** @__PURE__ @class */ (function () {
|
|
391
|
+
function RelativePoint(x, y) {
|
|
392
|
+
this.x = x;
|
|
393
|
+
this.y = y;
|
|
394
|
+
}
|
|
395
|
+
return RelativePoint;
|
|
396
|
+
}());
|
|
385
397
|
/**
|
|
386
398
|
* Defines the latitude and longitude values that define a map location.
|
|
387
399
|
*/
|
|
@@ -6572,7 +6584,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6572
6584
|
proxy.renderTileLayer(proxy, layer, layerIndex, bing);
|
|
6573
6585
|
this.mapObject.arrangeTemplate();
|
|
6574
6586
|
if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
|
|
6575
|
-
this.mapObject.zoomModule.applyTransform(this.mapObject, true);
|
|
6587
|
+
this.mapObject.zoomModule.applyTransform(this.mapObject, false, true);
|
|
6576
6588
|
}
|
|
6577
6589
|
};
|
|
6578
6590
|
LayerPanel.prototype.bubbleCalculation = function (bubbleSettings, range) {
|
|
@@ -8471,7 +8483,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8471
8483
|
}
|
|
8472
8484
|
}
|
|
8473
8485
|
if (this.zoomModule && ((this.previousScale !== this.scale) || this.zoomNotApplied || this.isZoomByPosition)) {
|
|
8474
|
-
this.zoomModule.applyTransform(this, true);
|
|
8486
|
+
this.zoomModule.applyTransform(this, false, true);
|
|
8475
8487
|
}
|
|
8476
8488
|
}
|
|
8477
8489
|
};
|
|
@@ -12398,7 +12410,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12398
12410
|
else {
|
|
12399
12411
|
legendText = '';
|
|
12400
12412
|
}
|
|
12401
|
-
if (legend.position === 'Left' || legend.position === 'Right') {
|
|
12413
|
+
if (legend.position === 'Left' || legend.position === 'Right' || legend.position === 'Float') {
|
|
12402
12414
|
for (var i_1 = 0; i_1 < this.legendCollection.length; i_1++) {
|
|
12403
12415
|
var legendItem = this.legendCollection[i_1];
|
|
12404
12416
|
var legendTextSize = measureText(legendItem['text'], legend.textStyle);
|
|
@@ -13573,8 +13585,12 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13573
13585
|
var areaWidth = totalRect.width;
|
|
13574
13586
|
var totalWidth = map.availableSize.width;
|
|
13575
13587
|
var totalHeight = map.availableSize.height;
|
|
13576
|
-
var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x
|
|
13577
|
-
|
|
13588
|
+
var locationX = !isNullOrUndefined(legend.location.x) ? (typeof (legend.location.x) === 'string' &&
|
|
13589
|
+
legend.location.x.indexOf('%') > -1 ? (map.availableSize.width / 100) * parseFloat(legend.location.x) :
|
|
13590
|
+
typeof (legend.location.x) === 'string' ? parseFloat(legend.location.x) : legend.location.x) : 0;
|
|
13591
|
+
var locationY = !isNullOrUndefined(legend.location.y) ? (typeof (legend.location.y) === 'string' &&
|
|
13592
|
+
legend.location.y.indexOf('%') > -1 ? (map.availableSize.height / 100) * parseFloat(legend.location.y) :
|
|
13593
|
+
typeof (legend.location.y) === 'string' ? parseFloat(legend.location.y) : legend.location.y) : 0;
|
|
13578
13594
|
if (legend.position === 'Float') {
|
|
13579
13595
|
this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) :
|
|
13580
13596
|
new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
|
|
@@ -15715,11 +15731,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15715
15731
|
* @param {Point} position - Specifies the position.
|
|
15716
15732
|
* @param {number} newZoomFactor - Specifies the zoom factor.
|
|
15717
15733
|
* @param {string} type - Specifies the type.
|
|
15734
|
+
* @param {boolean} isMouseWheel - Indicates whether the zoom operation was triggered by the mouse wheel.
|
|
15718
15735
|
* @returns {void}
|
|
15719
15736
|
* @private
|
|
15720
15737
|
*/
|
|
15721
|
-
Zoom.prototype.performZooming = function (position, newZoomFactor, type) {
|
|
15738
|
+
Zoom.prototype.performZooming = function (position, newZoomFactor, type, isMouseWheel) {
|
|
15722
15739
|
var _this = this;
|
|
15740
|
+
if (isMouseWheel === void 0) { isMouseWheel = false; }
|
|
15723
15741
|
var map = this.maps;
|
|
15724
15742
|
map.previousProjection = newZoomFactor <= 1.5 ? undefined : map.projectionType;
|
|
15725
15743
|
map.defaultState = false;
|
|
@@ -15778,7 +15796,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15778
15796
|
map.scale = map.mapScaleValue = map.previousScale;
|
|
15779
15797
|
}
|
|
15780
15798
|
else {
|
|
15781
|
-
this.applyTransform(map);
|
|
15799
|
+
this.applyTransform(map, isMouseWheel);
|
|
15782
15800
|
}
|
|
15783
15801
|
}
|
|
15784
15802
|
else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
|
|
@@ -15822,7 +15840,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15822
15840
|
// element1 = element1;
|
|
15823
15841
|
// }
|
|
15824
15842
|
// }
|
|
15825
|
-
_this.applyTransform(_this.maps);
|
|
15843
|
+
_this.applyTransform(_this.maps, isMouseWheel);
|
|
15826
15844
|
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
15827
15845
|
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
15828
15846
|
}
|
|
@@ -15948,7 +15966,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15948
15966
|
}
|
|
15949
15967
|
if (!isZoomCancelled) {
|
|
15950
15968
|
map.mapScaleValue = zoomCalculationFactor;
|
|
15951
|
-
this.applyTransform(map, true);
|
|
15969
|
+
this.applyTransform(map, false, true);
|
|
15952
15970
|
this.maps.zoomNotApplied = false;
|
|
15953
15971
|
this.zoomingRect = null;
|
|
15954
15972
|
}
|
|
@@ -16162,12 +16180,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16162
16180
|
};
|
|
16163
16181
|
/**
|
|
16164
16182
|
* @param {Maps} maps - Specifies the Map control
|
|
16183
|
+
* @param {boolean} isMouseWheel - Indicates whether the zoom operation was triggered by the mouse wheel.
|
|
16165
16184
|
* @param {boolean} animate - Specifies the animation is available or not
|
|
16166
16185
|
* @param {boolean} isPanning - Specifies that it is panning or not
|
|
16167
16186
|
* @returns {void}
|
|
16168
16187
|
* @private
|
|
16169
16188
|
*/
|
|
16170
|
-
Zoom.prototype.applyTransform = function (maps, animate, isPanning) {
|
|
16189
|
+
Zoom.prototype.applyTransform = function (maps, isMouseWheel, animate, isPanning) {
|
|
16171
16190
|
var _this = this;
|
|
16172
16191
|
var layerIndex;
|
|
16173
16192
|
this.templateCount = 0;
|
|
@@ -16259,8 +16278,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16259
16278
|
}
|
|
16260
16279
|
if (((_this.currentLayer.animationDuration > 0 || animationMode === 'Enable') || ((maps.layersCollection[0].animationDuration > 0 || animationMode === 'Enable') && _this.currentLayer.type === 'SubLayer')) && !_this.isPanModeEnabled) {
|
|
16261
16280
|
if (!maps.isTileMap) {
|
|
16262
|
-
markerStyle = 'visibility:hidden';
|
|
16263
|
-
|
|
16281
|
+
markerStyle = isMouseWheel ? markerStyle : 'visibility:hidden';
|
|
16282
|
+
if (!isNullOrUndefined(markerStyle)) {
|
|
16283
|
+
currentEle.style.cssText = markerStyle;
|
|
16284
|
+
}
|
|
16264
16285
|
}
|
|
16265
16286
|
}
|
|
16266
16287
|
});
|
|
@@ -16847,15 +16868,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16847
16868
|
if (!panArgs.cancel) {
|
|
16848
16869
|
if (panningXDirection && panningYDirection) {
|
|
16849
16870
|
map.translatePoint = new Point(x, y);
|
|
16850
|
-
this.applyTransform(map, false, true);
|
|
16871
|
+
this.applyTransform(map, false, false, true);
|
|
16851
16872
|
}
|
|
16852
16873
|
else if (panningXDirection) {
|
|
16853
16874
|
map.translatePoint = new Point(x, map.translatePoint.y);
|
|
16854
|
-
this.applyTransform(map, false, true);
|
|
16875
|
+
this.applyTransform(map, false, false, true);
|
|
16855
16876
|
}
|
|
16856
16877
|
else if (panningYDirection) {
|
|
16857
16878
|
map.translatePoint = new Point(map.translatePoint.x, y);
|
|
16858
|
-
this.applyTransform(map, false, true);
|
|
16879
|
+
this.applyTransform(map, false, false, true);
|
|
16859
16880
|
}
|
|
16860
16881
|
}
|
|
16861
16882
|
this.maps.zoomNotApplied = false;
|
|
@@ -16884,7 +16905,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16884
16905
|
};
|
|
16885
16906
|
map.trigger(pan, panArgs);
|
|
16886
16907
|
map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint, 'Pan');
|
|
16887
|
-
this.applyTransform(map, false, true);
|
|
16908
|
+
this.applyTransform(map, false, false, true);
|
|
16888
16909
|
map.translatePoint.x = (map.tileTranslatePoint.x - xDifference) / map.scale;
|
|
16889
16910
|
map.translatePoint.y = (map.tileTranslatePoint.y - yDifference) / map.scale;
|
|
16890
16911
|
}
|
|
@@ -16955,7 +16976,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16955
16976
|
map.scale = map.previousScale;
|
|
16956
16977
|
}
|
|
16957
16978
|
else {
|
|
16958
|
-
this.applyTransform(map, true);
|
|
16979
|
+
this.applyTransform(map, false, true);
|
|
16959
16980
|
}
|
|
16960
16981
|
}
|
|
16961
16982
|
else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
|
|
@@ -16992,7 +17013,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16992
17013
|
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
16993
17014
|
var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
|
|
16994
17015
|
setTimeout(function () {
|
|
16995
|
-
_this.applyTransform(_this.maps, true);
|
|
17016
|
+
_this.applyTransform(_this.maps, false, true);
|
|
16996
17017
|
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
16997
17018
|
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
16998
17019
|
}
|
|
@@ -17605,11 +17626,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17605
17626
|
map.staticMapZoom = map.tileZoomLevel;
|
|
17606
17627
|
if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
|
|
17607
17628
|
map.staticMapZoom += 1;
|
|
17608
|
-
this.performZooming(position, (value + delta), direction);
|
|
17629
|
+
this.performZooming(position, (value + delta), direction, true);
|
|
17609
17630
|
}
|
|
17610
17631
|
}
|
|
17611
17632
|
else {
|
|
17612
|
-
this.performZooming(position, (value + delta), direction);
|
|
17633
|
+
this.performZooming(position, (value + delta), direction, true);
|
|
17613
17634
|
}
|
|
17614
17635
|
}
|
|
17615
17636
|
else {
|
|
@@ -17623,7 +17644,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17623
17644
|
if (map.staticMapZoom > 1 && map.staticMapZoom < staticMaxZoomLevel) {
|
|
17624
17645
|
map.staticMapZoom -= 1;
|
|
17625
17646
|
}
|
|
17626
|
-
this.performZooming(position, (value - delta), direction);
|
|
17647
|
+
this.performZooming(position, (value - delta), direction, true);
|
|
17627
17648
|
}
|
|
17628
17649
|
}
|
|
17629
17650
|
this.removeToolbarOpacity(map.mapScaleValue, (!this.maps.isDevice ? (!isNullOrUndefined(e.target) ? e.target['id'] :
|
|
@@ -18477,5 +18498,5 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
18477
18498
|
return PdfExport;
|
|
18478
18499
|
}());
|
|
18479
18500
|
|
|
18480
|
-
export { Annotation, Annotations, Arrow, BingMap, Border, Bubble, BubbleSettings, CenterPosition, CircleOption, ColorMapping, ColorMappingSettings, ColorValue, CommonTitleSettings, ConnectorLineSettings, Coordinate, DataLabel, DataLabelSettings, Font, GeoLocation, Highlight, HighlightSettings, ImageExport, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, Internalize, LayerPanel, LayerSettings, Legend, LegendSettings, Line, LineOption, MapAjax, MapLocation, Maps, MapsAreaSettings, MapsTooltip, Margin, Marker, MarkerBase, MarkerClusterData, MarkerClusterSettings, MarkerSettings, MinMax, NavigationLine, NavigationLineSettings, PathOption, PatternOptions, PdfExport, Point, Polygon, PolygonOption, PolygonSetting, PolygonSettings, PolygonTooltipSettings, PolylineOption, Print, Rect, RectOption, Selection, SelectionSettings, ShapeSettings, Size, SubTitleSettings, TextOption, Tile, TitleSettings, ToggleLegendSettings, TooltipSettings, Zoom, ZoomSettings, ZoomToolbarButtonSettings, ZoomToolbarSettings, ZoomToolbarTooltipSettings, acos, aitoff, animate, animationComplete, annotationRendering, appendShape, beforePrint, bubbleClick, bubbleMouseMove, bubbleRendering, calculateBound, calculateCenterFromPixel, calculatePolygonPath, calculateScale, calculateShapes, calculateSize, calculateZoomLevel, changeBorderWidth, changeNavaigationLineWidth, checkPropertyPath, checkShapeDataFields, click, clusterSeparate, clusterTemplate, compareZoomFactor, convertElement, convertElementFromLabel, convertGeoToPoint, convertStringToValue, convertTileLatLongToPoint, createStyle, createSvg, createTooltip, customizeStyle, dataLabelRendering, degreesToRadians, doubleClick, drawBalloon, drawCircle, drawCross, drawDiamond, drawHorizontalLine, drawLine, drawPath, drawPattern, drawPolygon, drawPolyline, drawRectangle, drawStar, drawSymbol, drawSymbols, drawTriangle, drawVerticalLine, elementAnimate, filter, findMidPointOfPolygon, findPosition, fixInitialScaleForTile, formatValue, getDistance, getElement, getElementByID, getElementOffset, getElementsByClassName, getFieldData, getHexColor, getMousePosition, getProcessedMarginValue, getRatioOfBubble, getShapeData, getTargetElement, getTemplateFunction, getTouchCenter, getTouches, getTranslate, getValueFromObject, getZoomTranslate, isCustomPath, itemHighlight, itemSelection, layerRendering, legendRendering, load, loaded, maintainSelection, maintainStyleClass, maintainToggleSelection, marker, markerBoundsComparer, markerClick, markerClusterClick, markerClusterListHandler, markerClusterMouseMove, markerClusterRendering, markerColorChoose, markerDragEnd, markerDragStart, markerMouseMove, markerRendering, markerShapeChoose, markerTemplate, measureText, measureTextElement, mergeSeparateCluster, mouseMove, mousedown, mousemove, mouseup, onclick, pan, panComplete, processResult, querySelector, radiansToDegrees, removeClass, removeElement, renderLegendShape, renderTextElement, resize, rightClick, roundTo, shapeHighlight, shapeRendering, shapeSelected, showTooltip, sinci, smoothTranslate, stringToNumber, sum, targetTouches, textTrim, timeout, tooltipRender, triggerDownload, triggerItemSelectionEvent, triggerShapeEvent, wordWrap, xToCoordinate, yToCoordinate, zoomAnimate, zoomComplete, zoomIn, zoomOut };
|
|
18501
|
+
export { Annotation, Annotations, Arrow, BingMap, Border, Bubble, BubbleSettings, CenterPosition, CircleOption, ColorMapping, ColorMappingSettings, ColorValue, CommonTitleSettings, ConnectorLineSettings, Coordinate, DataLabel, DataLabelSettings, Font, GeoLocation, Highlight, HighlightSettings, ImageExport, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, Internalize, LayerPanel, LayerSettings, Legend, LegendSettings, Line, LineOption, MapAjax, MapLocation, Maps, MapsAreaSettings, MapsTooltip, Margin, Marker, MarkerBase, MarkerClusterData, MarkerClusterSettings, MarkerSettings, MinMax, NavigationLine, NavigationLineSettings, PathOption, PatternOptions, PdfExport, Point, Polygon, PolygonOption, PolygonSetting, PolygonSettings, PolygonTooltipSettings, PolylineOption, Print, Rect, RectOption, RelativePoint, Selection, SelectionSettings, ShapeSettings, Size, SubTitleSettings, TextOption, Tile, TitleSettings, ToggleLegendSettings, TooltipSettings, Zoom, ZoomSettings, ZoomToolbarButtonSettings, ZoomToolbarSettings, ZoomToolbarTooltipSettings, acos, aitoff, animate, animationComplete, annotationRendering, appendShape, beforePrint, bubbleClick, bubbleMouseMove, bubbleRendering, calculateBound, calculateCenterFromPixel, calculatePolygonPath, calculateScale, calculateShapes, calculateSize, calculateZoomLevel, changeBorderWidth, changeNavaigationLineWidth, checkPropertyPath, checkShapeDataFields, click, clusterSeparate, clusterTemplate, compareZoomFactor, convertElement, convertElementFromLabel, convertGeoToPoint, convertStringToValue, convertTileLatLongToPoint, createStyle, createSvg, createTooltip, customizeStyle, dataLabelRendering, degreesToRadians, doubleClick, drawBalloon, drawCircle, drawCross, drawDiamond, drawHorizontalLine, drawLine, drawPath, drawPattern, drawPolygon, drawPolyline, drawRectangle, drawStar, drawSymbol, drawSymbols, drawTriangle, drawVerticalLine, elementAnimate, filter, findMidPointOfPolygon, findPosition, fixInitialScaleForTile, formatValue, getDistance, getElement, getElementByID, getElementOffset, getElementsByClassName, getFieldData, getHexColor, getMousePosition, getProcessedMarginValue, getRatioOfBubble, getShapeData, getTargetElement, getTemplateFunction, getTouchCenter, getTouches, getTranslate, getValueFromObject, getZoomTranslate, isCustomPath, itemHighlight, itemSelection, layerRendering, legendRendering, load, loaded, maintainSelection, maintainStyleClass, maintainToggleSelection, marker, markerBoundsComparer, markerClick, markerClusterClick, markerClusterListHandler, markerClusterMouseMove, markerClusterRendering, markerColorChoose, markerDragEnd, markerDragStart, markerMouseMove, markerRendering, markerShapeChoose, markerTemplate, measureText, measureTextElement, mergeSeparateCluster, mouseMove, mousedown, mousemove, mouseup, onclick, pan, panComplete, processResult, querySelector, radiansToDegrees, removeClass, removeElement, renderLegendShape, renderTextElement, resize, rightClick, roundTo, shapeHighlight, shapeRendering, shapeSelected, showTooltip, sinci, smoothTranslate, stringToNumber, sum, targetTouches, textTrim, timeout, tooltipRender, triggerDownload, triggerItemSelectionEvent, triggerShapeEvent, wordWrap, xToCoordinate, yToCoordinate, zoomAnimate, zoomComplete, zoomIn, zoomOut };
|
|
18481
18502
|
//# sourceMappingURL=ej2-maps.es5.js.map
|