You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "hxtmdev (via GitHub)" <gi...@apache.org> on 2025/07/21 07:31:20 UTC
Re: [I] mapbox does not load datapoints [superset]
hxtmdev commented on issue #27562:
URL: https://github.com/apache/superset/issues/27562#issuecomment-3095563830
It is indeed still a problem on 5.0.0rc2. Debugging shows seemingly correct drawing calls are made, no idea what the root cause is.
A workaround is to simply cause the first update from code by `setTimeout`ing a `setState` from the constructor of the overlay:
```diff
diff --git a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/MapBox.jsx b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/MapBox.jsx
index 943cf7174b..ed9d235713 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-map-box/src/MapBox.jsx
+++ b/superset-frontend/plugins/legacy-plugin-chart-map-box/src/MapBox.jsx
@@ -77,6 +77,7 @@ class MapBox extends Component {
},
};
this.handleViewportChange = this.handleViewportChange.bind(this);
+ setTimeout(() => this.setState(this.state), 0);
}
handleViewportChange(viewport) {
```
Maybe someone more familiar with the codebase has an idea what the root cause might be?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org