@syncfusion/ej2-maps 28.1.38 → 28.2.5

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.
@@ -368,6 +368,17 @@ class Point {
368
368
  this.y = y;
369
369
  }
370
370
  }
371
+ /**
372
+ * Specifies the position of the legend on the map, with options to set the
373
+ * position values as percentages. The legend is placed relative to the Maps,
374
+ * ensuring responsiveness.
375
+ */
376
+ class RelativePoint {
377
+ constructor(x, y) {
378
+ this.x = x;
379
+ this.y = y;
380
+ }
381
+ }
371
382
  /**
372
383
  * Defines the latitude and longitude values that define a map location.
373
384
  */
@@ -1277,7 +1288,7 @@ function mergeSeparateCluster(sameMarkerData, maps) {
1277
1288
  let markerEle;
1278
1289
  const markerDataLength = sameMarkerData[0].data.length;
1279
1290
  for (let i = 0; i < markerDataLength; i++) {
1280
- markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1291
+ markerEle = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1281
1292
  markerEle['style']['visibility'] = 'hidden';
1282
1293
  if (markerEle.id.indexOf('Group') > -1) {
1283
1294
  const marker = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
@@ -1314,7 +1325,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1314
1325
  const clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
1315
1326
  clusterEle.setAttribute('visibility', 'hidden');
1316
1327
  clusterEleLabel.setAttribute('visibility', 'hidden');
1317
- let markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1328
+ let markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1318
1329
  const height = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().height : marker.height;
1319
1330
  let width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
1320
1331
  const centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
@@ -1351,7 +1362,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1351
1362
  const x1 = centerX + radius * Math.sin((Math.PI * 2 * newAngle) / 360);
1352
1363
  const y1 = centerY + radius * Math.cos((Math.PI * 2 * newAngle) / 360);
1353
1364
  path += start + 'L ' + (x1) + ' ' + y1 + ' ';
1354
- markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1365
+ markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1355
1366
  if (markerEle.parentElement.id.indexOf('Template_Group') > -1) {
1356
1367
  markerEle['style']['transform'] = '';
1357
1368
  markerEle['style']['left'] = maps.isTileMap ? x1 - (width / 2) + 'px' : (x1 - (width / 2) - 10) + 'px';
@@ -12063,7 +12074,7 @@ class Legend {
12063
12074
  else {
12064
12075
  legendText = '';
12065
12076
  }
12066
- if (legend.position === 'Left' || legend.position === 'Right') {
12077
+ if (legend.position === 'Left' || legend.position === 'Right' || legend.position === 'Float') {
12067
12078
  for (let i = 0; i < this.legendCollection.length; i++) {
12068
12079
  const legendItem = this.legendCollection[i];
12069
12080
  const legendTextSize = measureText(legendItem['text'], legend.textStyle);
@@ -13238,8 +13249,12 @@ class Legend {
13238
13249
  const areaWidth = totalRect.width;
13239
13250
  const totalWidth = map.availableSize.width;
13240
13251
  const totalHeight = map.availableSize.height;
13241
- const locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
13242
- const locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
13252
+ const locationX = !isNullOrUndefined(legend.location.x) ? (typeof (legend.location.x) === 'string' &&
13253
+ legend.location.x.indexOf('%') > -1 ? (map.availableSize.width / 100) * parseFloat(legend.location.x) :
13254
+ typeof (legend.location.x) === 'string' ? parseFloat(legend.location.x) : legend.location.x) : 0;
13255
+ const locationY = !isNullOrUndefined(legend.location.y) ? (typeof (legend.location.y) === 'string' &&
13256
+ legend.location.y.indexOf('%') > -1 ? (map.availableSize.height / 100) * parseFloat(legend.location.y) :
13257
+ typeof (legend.location.y) === 'string' ? parseFloat(legend.location.y) : legend.location.y) : 0;
13243
13258
  if (legend.position === 'Float') {
13244
13259
  this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) :
13245
13260
  new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
@@ -15362,7 +15377,6 @@ class Zoom {
15362
15377
  map.markerZoomedState = map.isMarkerZoomCompleted = false;
15363
15378
  map.zoomPersistence = map.enablePersistence;
15364
15379
  const prevLevel = map.tileZoomLevel;
15365
- const scale = map.previousScale = map.scale;
15366
15380
  const maxZoom = map.zoomSettings.maxZoom;
15367
15381
  const minZoom = map.zoomSettings.minZoom;
15368
15382
  newZoomFactor = maxZoom >= newZoomFactor ? newZoomFactor : maxZoom;
@@ -15376,6 +15390,7 @@ class Zoom {
15376
15390
  break;
15377
15391
  }
15378
15392
  if (isToolbarPerform) {
15393
+ const scale = map.previousScale = map.scale;
15379
15394
  const prevTilePoint = map.tileTranslatePoint;
15380
15395
  if ((!map.isTileMap) && ((type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)
15381
15396
  || map.isReset)) {
@@ -18091,5 +18106,5 @@ class PdfExport {
18091
18106
  destroy() { }
18092
18107
  }
18093
18108
 
18094
- 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 };
18109
+ 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 };
18095
18110
  //# sourceMappingURL=ej2-maps.es2015.js.map