First render starts at very high zoom
See original GitHub issuePlease provide an explanation of the issue
First render starts at very high zoom. And when I save, the zoom gets normal
Your Environment
os: linux
node --version v16.15.0
react version ^18.2.0
webpack version not use
@babel version not use
@react-google-maps/api version ^2.12.2
How does it behave?
First render starts at very high zoom
How should it behave correctly?
should be started with zoom as I configured in prop zoom={17}
Basic implementation of incorrect behavior in codesandbox.com
video: when-I-save. The map zoom and center gets normal.webm
<video src="https://user-images.githubusercontent.com/16847836/187035122-42a4ab5d-fe04-40df-9333-6552a8b73c2a.webm"></video>
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
camera is zoomed in for a close up render but render is ...
Just keep zooming into your model and then make a new render, repeat till you get what you want. You might have to...
Read more >Fix the Broken First Frame in Sequencer / Movie Render Queue!
This issue has been plaguing me for literally years. Fix that weird first frame in Sequencer/Movie Render Queue with a fix so easy...
Read more >Rendering highly granular and "zoomed out" data
On a higher level: As you zoom into something and the camera gets closer to an object, it appears as if the world...
Read more >Render a user's video - Zoom App Marketplace
Render a user's video. The Video SDK allows you to render the video of each user who join a session. Retrieve the IZoomVideoSDKUser...
Read more >Is it possible to render a zoomed in on image not blurry?
If that's the case, rendering a zoomed in image more clearly isn't going to work ... in your initial post that you are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m getting the same problem here with the versions. I needed my project to be ready quickly, so I came up with probably a bad solution, but it worked, at least until we get an answer.
So I created a zoomReset state and gave it a random number as the initial state. After that I put a setTimeout function inside the onLoad function, after setting the map state. I gave it 1000ms of delay and after that I set the ZoomReset to the value I wanted and voilà, it takes a second to set the zoom back to where it should be.
Sorry if that could cause any problem, but here in Brazil we are masters of gambiarras
Yes. An example examples an onLoad prop. It is not required per se, it is just an example how to use map. There is an old google-maps-api lib, which used ref on class, to access map instance. It is not the case anymore. You can add comment to an example and improve it.