@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.
@@ -8302,7 +8302,7 @@ let Maps = class Maps extends Component {
8302
8302
  document.getElementById(this.element.id + "_svg").style.cursor = 'grabbing';
8303
8303
  const targetElement = getElement(marker$$1.targetId);
8304
8304
  let latLongValue = this.getClickLocation(marker$$1.targetId, pageX, pageY, targetElement, x, y);
8305
- const 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);
8305
+ const 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);
8306
8306
  const transPoint = this.translatePoint;
8307
8307
  const translateX = (this.isTileMap ? location.x : (location.x + transPoint.x) * this.scale);
8308
8308
  const translateY = (this.isTileMap ? location.y : (location.y + transPoint.y) * this.scale);
@@ -8318,6 +8318,7 @@ let Maps = class Maps extends Component {
8318
8318
  }
8319
8319
  return latLongValue;
8320
8320
  }
8321
+ /** @private */
8321
8322
  getClickLocation(targetId, pageX, pageY, targetElement, x, y) {
8322
8323
  let layerIndex = 0;
8323
8324
  let latLongValue;
@@ -8327,12 +8328,17 @@ let Maps = class Maps extends Component {
8327
8328
  layerIndex = parseFloat(targetId.split('_LayerIndex_')[1].split('_')[0]);
8328
8329
  if (this.layers[layerIndex].geometryType === 'Normal') {
8329
8330
  if (targetId.indexOf('_shapeIndex_') > -1) {
8330
- const location = getMousePosition(pageX, pageY, targetElement.parentElement);
8331
- const minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * this.mapLayerPanel.currentFactor);
8332
- const minLatitude = Math.abs(this.baseMapBounds.latitude.max * this.mapLayerPanel.currentFactor);
8331
+ const immediateParent = targetElement.parentElement;
8332
+ const parentElement = immediateParent.id.indexOf('_Point_Group') > -1 || immediateParent.id.indexOf('_LineString_Group') > -1
8333
+ || immediateParent.id.indexOf('_MultiLineString_Group') > -1 || immediateParent.id.indexOf('_Polygon_Group') > -1 ?
8334
+ immediateParent.parentElement : immediateParent;
8335
+ const location = getMousePosition(pageX, pageY, parentElement);
8336
+ const zoomScaleValue = this.mapLayerPanel.currentFactor * this.mapScaleValue;
8337
+ const minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * zoomScaleValue);
8338
+ const minLatitude = Math.abs(this.baseMapBounds.latitude.max * zoomScaleValue);
8333
8339
  latLongValue = {
8334
- latitude: Math.abs(this.baseMapBounds.latitude.max - (location.y / this.mapLayerPanel.currentFactor)),
8335
- longitude: Math.abs((location.x / this.mapLayerPanel.currentFactor) + this.baseMapBounds.longitude.min)
8340
+ latitude: Math.abs(this.baseMapBounds.latitude.max - (location.y / zoomScaleValue)),
8341
+ longitude: Math.abs((location.x / zoomScaleValue) + this.baseMapBounds.longitude.min)
8336
8342
  };
8337
8343
  if (this.baseMapBounds.longitude.min < 0 && minLongitude > location.x) {
8338
8344
  latLongValue.longitude = -latLongValue.longitude;