diff options
author | bobzel <zzzman@gmail.com> | 2023-09-16 19:16:59 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-09-16 19:16:59 -0400 |
commit | 5ea73f951ba38fad08019205d840a4582afd0654 (patch) | |
tree | 9ea353d259eecf8a66bf2a2dd6b1120516129569 | |
parent | 91febff4b3ea82b73687ead2e81b8ba726f55de4 (diff) |
another try at maps.
-rw-r--r-- | deploy/index.html | 3 | ||||
-rw-r--r-- | src/client/views/nodes/MapBox/MapBox.tsx | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/deploy/index.html b/deploy/index.html index 15e82ebd5..c23deabd3 100644 --- a/deploy/index.html +++ b/deploy/index.html @@ -10,7 +10,8 @@ <link rel="shortcut icon" type="image/jpg" href="./assets/favicon.png" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/typescript/3.3.1/typescript.min.js"></script> - + <script type="text/javascript" src="http://www.bing.com/api/maps/mapcontrol?callback=GetMap&key=[YOUR_BING_MAPS_KEY]" async defer></script> + <script> function getCookie(cname) { var name = cname + '='; diff --git a/src/client/views/nodes/MapBox/MapBox.tsx b/src/client/views/nodes/MapBox/MapBox.tsx index 1ccd0a218..0842485ee 100644 --- a/src/client/views/nodes/MapBox/MapBox.tsx +++ b/src/client/views/nodes/MapBox/MapBox.tsx @@ -8,7 +8,7 @@ import { Doc, DocListCast, Field, Opt } from '../../../../fields/Doc'; import { DocCss, Highlight, Width } from '../../../../fields/DocSymbols'; import { InkTool } from '../../../../fields/InkField'; import { DocCast, NumCast, StrCast } from '../../../../fields/Types'; -import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnEmptyString, returnFalse, returnOne, returnTrue, setupMoveUpEvents, Utils } from '../../../../Utils'; +import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnEmptyString, returnFalse, returnOne, setupMoveUpEvents, Utils } from '../../../../Utils'; import { Docs, DocUtils } from '../../../documents/Documents'; import { DocumentType } from '../../../documents/DocumentTypes'; import { DocumentManager } from '../../../util/DocumentManager'; @@ -703,7 +703,9 @@ export class MapBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps // prettier-ignore this._rerenderTimeout = this._rerenderTimeout ?? setTimeout(action(() => { - MapBox._rerenderDelay = 0; + if ((window as any).Microsoft?.Maps) { + MapBox._rerenderDelay = 0; + } this.rootDoc[DocCss] = this.rootDoc[DocCss] + 1; }), MapBox._rerenderDelay); return null; |