google-map-react icon indicating copy to clipboard operation
google-map-react copied to clipboard

Wrong recomputed onChange center position

Open tomwagner opened this issue 7 years ago • 7 comments

When the GoogleMapReact component receives updated center prop, it triggers new onChange event, but there is returned wrong coordinates. You can see it in console logs in this example: https://codesandbox.io/s/71yoyz62q6. This broken state remains for the rest of component lifecycle.

tomwagner avatar Mar 13 '19 21:03 tomwagner

Could you please reopen this issue? It's not resolved. Please check the codesandbox example (https://codesandbox.io/s/71yoyz62q6). The whole thread is about returned onChange event with wrong recomputed coordinates and not about position of marker..

tomwagner avatar Mar 18 '19 19:03 tomwagner

@itsmichaeldiego ping

reket avatar Jul 25 '19 09:07 reket

@reket @tomwagner This is a collaborative library, PRs are welcome!

itsmichaeldiego avatar Sep 18 '19 17:09 itsmichaeldiego

Ok, I've the same issue, willing to help if ever required, but I've got a design question first, why did you choose to forbidden props change? Redux user here and it's common/easier for us to simply use the props than having an additional step where we transform those props into state.

gtherond avatar Nov 26 '19 20:11 gtherond

Same problem here, any updates?

onlysli avatar Dec 13 '19 13:12 onlysli

I think this is actually expected behavior. Each time you zoom in you're getting a slightly more specific coordinates since you're zoomed in further and getting a bit higher resolution with each click.

@tomwagner does that make sense to you?

lightcap avatar Aug 19 '20 01:08 lightcap

I think you're right @lightcap, works fine for me too

itsmichaeldiego avatar Sep 03 '20 01:09 itsmichaeldiego