CartoDB / carto-react-template

CARTO for React. The best way to develop Location Intelligence (LI) Apps usign CARTO platform and React
https://sample-app-react.carto.com
MIT License
39 stars 26 forks source link

Viewstate sync in app template is broken when using Google Maps #291

Closed felixpalmer closed 3 years ago

felixpalmer commented 3 years ago

This issue is not due to the upgrade of Google Maps (https://github.com/CartoDB/carto-react/pull/194) but is present in older version of the code also.

To repro launch the template-sample-app-2 and configure the initialStateSlice to use a Google basemap, e.g.GOOGLE_ROADMAP. When the app is loaded the map is jerky, when it is dragged to pan it often snaps back to where it was before.

If the lines which update the viewState in GoogleMap are disabled, then the map moves correctly (although of course this breaks the zoom buttons as the state is no longer propagated).

https://github.com/CartoDB/carto-react/blob/6e0b0d6b2f2aadb656297a28c0086702893042f5/packages/react-basemaps/src/basemaps/GoogleMap.js#L104

felixpalmer commented 3 years ago

snap_map2