You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue we are running into is that we load the Google map immediately, then later when we have data come in we use that to display a Deck.gl IconLayer. But this new layer doesn't appear unless the user interacts with the map, or we programmatically change some map property.
According to the Google Maps documentation, "The onDraw() method will then be called whenever a map property changes that could change the position of the element, such as zoom, center, or map type."
So as dumb as it sounds, this does seem like the intended behavior on Google's side, but it feels like calling GoogleMapsOverlay.setMap() should result in displaying the deck.gl layers no matter when it is called, without requiring hacks/user interaction.
We have a hacky workaround to trick the map into re-rendering by changing the map center by an infinitesimal amount, but we shouldn't have to do that:
Description
The issue we are running into is that we load the Google map immediately, then later when we have data come in we use that to display a Deck.gl IconLayer. But this new layer doesn't appear unless the user interacts with the map, or we programmatically change some map property.
According to the Google Maps documentation, "The onDraw() method will then be called whenever a map property changes that could change the position of the element, such as zoom, center, or map type."
So as dumb as it sounds, this does seem like the intended behavior on Google's side, but it feels like calling
GoogleMapsOverlay.setMap()
should result in displaying the deck.gl layers no matter when it is called, without requiring hacks/user interaction.We have a hacky workaround to trick the map into re-rendering by changing the map center by an infinitesimal amount, but we shouldn't have to do that:
I was also able to hack a fix by calling
requestRedraw()
in the_onAdd()
method of GoogleMapsOverlayFlavors
Expected Behavior
google.maps.Map()
deck.IconLayer
anddeck.GoogleMapsOverlay
with the layerdeck.GoogleMapsOverlay.setMap()
Steps to Reproduce
https://codepen.io/samschurter/pen/zYgOvdL
Environment
Logs
No response
The text was updated successfully, but these errors were encountered: