Replies: 1 comment
-
Move your |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With an uncontrolled component, I can specify a bounds-based initialViewState like this:
But a controlled component does not have similar such bound constraints, and so instead, my only options seem to involve some imperative hook with the
fitBounds
viewport method, like this:This sorta works, but it has the downside of an initial render flicker -- the map first loads at the values initially specified for latitude, longitude, and zoom, and then rerenders after this initial load per
fitBounds
. The uncontrolled component does not suffer this initial render flicker -- is it possible to specify a bounds-based initial view state with a controlled component without this initial render flicker?Beta Was this translation helpful? Give feedback.
All reactions