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

How to set initial zoom level #26

Open
sreuter opened this issue Jul 6, 2023 · 3 comments
Open

How to set initial zoom level #26

sreuter opened this issue Jul 6, 2023 · 3 comments

Comments

@sreuter
Copy link
Contributor

sreuter commented Jul 6, 2023

It seems like the current implementation ignores latitudeDelta and longitudeDelta as part of the initialRegion. Is there any other way to set the initial zoom level?

@sreuter
Copy link
Contributor Author

sreuter commented Jul 9, 2023

I could work around this by setting the minZoomLevel & maxZoomLevel for now. I also tried setting zoom on camera but that also didn't work. Will need to dig more into the source of this library later.

@teovillanueva
Copy link
Owner

Hey! I would look into initialCamera.

https://teovillanueva.github.io/react-native-web-maps/support/map-view

@austingayler
Copy link

So:

    <MapViewWeb
      initialCamera={{
        zoom: 14,
        center: {
          latitude: 40.683334,
          longitude: 7.85,
        },
      }}

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

No branches or pull requests

3 participants