Skip to content

Commit

Permalink
fix:zoom to search coordianate (#10603)
Browse files Browse the repository at this point in the history
  • Loading branch information
rowheat02 authored Oct 8, 2024
1 parent 118fc2e commit 7b4b435
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/client/components/map/cesium/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit 7b4b435

Please sign in to comment.