Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] elevation field in MapViewState #9273

Open
charlieforward9 opened this issue Dec 2, 2024 · 4 comments · May be fixed by #9313
Open

[Feat] elevation field in MapViewState #9273

charlieforward9 opened this issue Dec 2, 2024 · 4 comments · May be fixed by #9313
Labels

Comments

@charlieforward9
Copy link

Target Use Case

Camera tracking on a trip layer with Tile3DLayer, with dynamic elevation

Screen.Recording.2024-12-01.at.11.04.32.PM.mov

Notice how the map is tracking the lat/lng, but given its vertical displacement and the set bearing, it does not correctly center the head of the trip. (I am toggling ReactGoogleMaps and Tile3DLayer to portray difference)

Proposal

Extend the MapViewState to include elevation.

export type MapViewState = {
  /** Longitude of the map center */
  longitude: number;
  /** Latitude of the map center */
  latitude: number;
+ /** Elevation of the map center, in meters */
+ elevation: number;
  /** Zoom level */
  zoom: number;
  /** Pitch (tilt) of the map, in degrees. `0` looks top down */
  pitch?: number;
  /** Bearing (rotation) of the map, in degrees. `0` is north up */
  bearing?: number;
  /** Min zoom, default `0` */
  minZoom?: number;
  /** Max zoom, default `20` */
  maxZoom?: number;
  /** Min pitch, default `0` */
  minPitch?: number;
  /** Max pitch, default `60` */
  maxPitch?: number;
  /** Viewport center offsets from lng, lat in meters */
  position?: number[];
} & CommonViewState;
@charlieforward9
Copy link
Author

deckgl.3dtile.panning.issue.mov

See this interaction bug, which seems to be related, the map is panning relative to (x,y,0) instead of (x,y,z)

@chrisgervang
Copy link
Collaborator

Does position: [0, 0, elevation]; work for you?

@charlieforward9

This comment was marked as outdated.

@charlieforward9
Copy link
Author

Yes! I did not realize that elevation could be included here. Thank you for specifying.

@charlieforward9 charlieforward9 linked a pull request Dec 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants