Skip to content

Commit

Permalink
Fix the map switcher that setting bearing and pitch to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Aug 14, 2024
1 parent c25486c commit 42ac04d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/landing/src/components/map.switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export class MapSwitcher extends Component {

this.map.setZoom(Math.max(location.zoom - 4, 0));
this.map.setCenter([location.lon, location.lat]);
if (Config.map.location.bearing != null) this.map.setBearing(Config.map.location.bearing);
if (Config.map.location.pitch != null) this.map.setPitch(Config.map.location.pitch);
Config.map.location.bearing == null ? this.map.setBearing(0) : this.map.setBearing(Config.map.location.bearing);
Config.map.location.pitch == null ? this.map.setPitch(0) : this.map.setPitch(Config.map.location.pitch);
this.forceUpdate();
};

Expand Down

0 comments on commit 42ac04d

Please sign in to comment.