diff options
author | bobzel <zzzman@gmail.com> | 2023-09-16 19:43:05 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-09-16 19:43:05 -0400 |
commit | 97424d30199adb56981e150733606c356c0c25e6 (patch) | |
tree | 5a525e3adcae6fa63ab6b961d57c14e60c63c96b /src/client/views/MainView.tsx | |
parent | 5ea73f951ba38fad08019205d840a4582afd0654 (diff) |
last chance at fixing maps startup.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 957ff4fb5..707cf3a34 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -144,6 +144,12 @@ export class MainView extends React.Component { mainDocViewHeight = () => this._dashUIHeight - this.headerBarDocHeight(); componentDidMount() { + const scriptTag = document.createElement('script'); + scriptTag.setAttribute('type', 'text/javascript'); + scriptTag.setAttribute('src', 'https://www.bing.com/api/maps/mapcontrol?callback=makeMap'); + scriptTag.async = true; + scriptTag.defer = true; + document.body.appendChild(scriptTag); document.getElementById('root')?.addEventListener('scroll', e => (ele => (ele.scrollLeft = ele.scrollTop = 0))(document.getElementById('root')!)); const ele = document.getElementById('loader'); const prog = document.getElementById('dash-progress'); |