question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Force zoom to update

See original GitHub issue

Hey! great work on this component… but I’m getting a bug that I don’t know how to fix it.

Imagine the scenario…

I start the plugin with 12 zoom. After that I navigate a little bit though the map, change the zoom by interacting with the map.

After a while, I want to add different markers to the component, I recalculate the center position and the default zoom using fitBounds from google-map-react/utils. But the zoom returned by fitBounds is still 12 (and that’s ok).

The problem is that if the zoom is the same as the first one when the component started, it does not goes back to 12. It keeps the last one that I interacted with the map (5 for example).

The map gets centralized again, but the zoom breaks 😦

Am I missing something? or is there a methods that helps me with that?

Thanks!

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
istarkovcommented, Jan 13, 2016

This is expected behavior if you change center or zoom but does not provide onChange handler - it’s like <input value={val} /> without onChange. Instead of React I just don’t show warning, for most use cases even without onChange all works fine.

You need to use control in controllable way to get no strange behavior in all cases.

0reactions
mauriciosoarescommented, Jan 13, 2016

I see… I’ll handle that.

Thanks @istarkov.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading Zoom to the latest version
Sign in to Zoom desktop client. Click your profile picture then click Check for Updates. If there is a newer version, Zoom will...
Read more >
How do I update to the latest version of Zoom? - my.UQ
Open the App Store. · Tap 'Updates' at the bottom of the screen. · Scroll down to see pending updates. Tap 'Update' next...
Read more >
Zoom To Force App Updates Every 90 Days - Forbes
Zoom videoconferencing users will be forced to update their software at least every three months, the company has announced.
Read more >
How to Force Update Zoom to the Latest Version?
mac zoom about - version 4.6. · zoom windows pc - check version - settings statistics · zoom for windows - check for...
Read more >
How to update Zoom - Otago Blogs
How to update Zoom · 1. Click on the icon in the top right on the home screen · 2. Select Check for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found