From 537fbef9d2d2b65c772484a89d550fc4bb9564e8 Mon Sep 17 00:00:00 2001 From: RowHeat <40065760+rowheat02@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:46:32 +0545 Subject: [PATCH] fix:zoom to search coordianate (#10576) --- web/client/components/map/cesium/Map.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/client/components/map/cesium/Map.jsx b/web/client/components/map/cesium/Map.jsx index 93d535eb04..db38b2b1d8 100644 --- a/web/client/components/map/cesium/Map.jsx +++ b/web/client/components/map/cesium/Map.jsx @@ -503,9 +503,9 @@ class CesiumMap extends React.Component { if (centerIsUpdate || zoomChanged) { const position = { destination: Cesium.Cartesian3.fromDegrees( - newProps.viewerOptions?.cameraPosition?.longitude ?? newProps.center.x, - newProps.viewerOptions?.cameraPosition?.latitude ?? newProps.center.y, - newProps.viewerOptions?.cameraPosition?.height ?? this.getHeightFromZoom(newProps.zoom ?? 0) + newProps.center.x, + newProps.center.y, + newProps.zoom !== undefined ? this.getHeightFromZoom(newProps.zoom) : cameraPosition.height ), orientation: newProps.viewerOptions?.orientation };