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

Impossible to set map bounds *and* pitch, bearing, etc #116

Open
JosiahParry opened this issue May 21, 2024 · 1 comment
Open

Impossible to set map bounds *and* pitch, bearing, etc #116

JosiahParry opened this issue May 21, 2024 · 1 comment
Labels
feature New feature or request

Comments

@JosiahParry
Copy link

Using initial_view_state with view_state() one get adjust the way that their map looks allowing them to change the pitch and bearing. This is particularly handy for 3D / extruded shapes. However, view_state() does not let you specify a starting bound only a starting center point.

The initial bounds should only conflict with the center argument of view_state() not all others.

This would save one from doing:

view_state(
    center = {  
      sf::st_bbox(geoms) |> 
      sf::st_as_sfc() |>  
      sf::st_centroid() 
  }[[1]]
)
@anthonynorth anthonynorth added the feature New feature or request label May 27, 2024
@anthonynorth
Copy link
Member

Preserving the pitch and bearing is simple. It should be simple to rotate the initial_bounds by bearing also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants