mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[maps] fix 'by value' map does not fill dashboard panel on initial page load in 8.10 (#165326)
Fixes https://github.com/elastic/kibana/issues/165183 ### Test instructions 1) install any sample data set 2) open new dashboard 3) Use "Add panel" buttons to add by-value map with only base map layer 4) Ensure map tiles fill entire map panel in dashboard Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
186a202b05
commit
168412ba7b
1 changed files with 6 additions and 1 deletions
|
@ -191,8 +191,13 @@ export class MbMap extends Component<Props, State> {
|
|||
}
|
||||
});
|
||||
mbMap.on('load', () => {
|
||||
emptyImage = new Image();
|
||||
// Map instance automatically resizes when container size changes.
|
||||
// However, issues may arise if container resizes before map finishes loading.
|
||||
// This is occuring when by-value maps are used in dashboard.
|
||||
// To prevent issues, resize container after load
|
||||
mbMap.resize();
|
||||
|
||||
emptyImage = new Image();
|
||||
emptyImage.src =
|
||||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=';
|
||||
emptyImage.crossOrigin = 'anonymous';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue