@syncfusion/ej2-maps 24.2.3 → 24.2.4

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.
@@ -8602,7 +8602,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8602
8602
  document.getElementById(this.element.id + "_svg").style.cursor = 'grabbing';
8603
8603
  var targetElement = getElement(marker$$1.targetId);
8604
8604
  var latLongValue = this.getClickLocation(marker$$1.targetId, pageX, pageY, targetElement, x, y);
8605
- var location = (this.isTileMap) ? convertTileLatLongToPoint(new MapLocation(latLongValue.longitude, latLongValue.latitude), this.scale, this.tileTranslatePoint, true) : convertGeoToPoint(latLongValue.latitude, latLongValue.longitude, this.mapLayerPanel.currentFactor, this.layersCollection[marker$$1.layerIndex], this);
8605
+ var location = (this.isTileMap) ? convertTileLatLongToPoint(new MapLocation(latLongValue.longitude, latLongValue.latitude), this.tileZoomLevel, this.tileTranslatePoint, true) : convertGeoToPoint(latLongValue.latitude, latLongValue.longitude, this.mapLayerPanel.currentFactor, this.layersCollection[marker$$1.layerIndex], this);
8606
8606
  var transPoint = this.translatePoint;
8607
8607
  var translateX = (this.isTileMap ? location.x : (location.x + transPoint.x) * this.scale);
8608
8608
  var translateY = (this.isTileMap ? location.y : (location.y + transPoint.y) * this.scale);
@@ -8618,6 +8618,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8618
8618
  }
8619
8619
  return latLongValue;
8620
8620
  };
8621
+ /** @private */
8621
8622
  Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y) {
8622
8623
  var layerIndex = 0;
8623
8624
  var latLongValue;
@@ -8627,12 +8628,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8627
8628
  layerIndex = parseFloat(targetId.split('_LayerIndex_')[1].split('_')[0]);
8628
8629
  if (this.layers[layerIndex].geometryType === 'Normal') {
8629
8630
  if (targetId.indexOf('_shapeIndex_') > -1) {
8630
- var location_2 = getMousePosition(pageX, pageY, targetElement.parentElement);
8631
- var minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * this.mapLayerPanel.currentFactor);
8632
- var minLatitude = Math.abs(this.baseMapBounds.latitude.max * this.mapLayerPanel.currentFactor);
8631
+ var immediateParent = targetElement.parentElement;
8632
+ var parentElement = immediateParent.id.indexOf('_Point_Group') > -1 || immediateParent.id.indexOf('_LineString_Group') > -1
8633
+ || immediateParent.id.indexOf('_MultiLineString_Group') > -1 || immediateParent.id.indexOf('_Polygon_Group') > -1 ?
8634
+ immediateParent.parentElement : immediateParent;
8635
+ var location_2 = getMousePosition(pageX, pageY, parentElement);
8636
+ var zoomScaleValue = this.mapLayerPanel.currentFactor * this.mapScaleValue;
8637
+ var minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * zoomScaleValue);
8638
+ var minLatitude = Math.abs(this.baseMapBounds.latitude.max * zoomScaleValue);
8633
8639
  latLongValue = {
8634
- latitude: Math.abs(this.baseMapBounds.latitude.max - (location_2.y / this.mapLayerPanel.currentFactor)),
8635
- longitude: Math.abs((location_2.x / this.mapLayerPanel.currentFactor) + this.baseMapBounds.longitude.min)
8640
+ latitude: Math.abs(this.baseMapBounds.latitude.max - (location_2.y / zoomScaleValue)),
8641
+ longitude: Math.abs((location_2.x / zoomScaleValue) + this.baseMapBounds.longitude.min)
8636
8642
  };
8637
8643
  if (this.baseMapBounds.longitude.min < 0 && minLongitude > location_2.x) {
8638
8644
  latLongValue.longitude = -latLongValue.longitude;