From aa67222bc1a80ae11d1a29b32d5cb54199b38011 Mon Sep 17 00:00:00 2001 From: Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> Date: Sat, 24 Jul 2021 11:15:04 -0700 Subject: backend issues with creating map node --- src/client/documents/DocumentTypes.ts | 2 +- src/client/documents/Documents.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/documents') diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts index 422d9c2e3..5bd5590b7 100644 --- a/src/client/documents/DocumentTypes.ts +++ b/src/client/documents/DocumentTypes.ts @@ -23,7 +23,7 @@ export enum DocumentType { SCRIPTING = "script", EQUATION = "equation", FUNCPLOT = "funcplot", - MAP = "MAP", + MAP = "map", // special purpose wrappers that either take no data or are compositions of lower level types diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 5ec0b0063..b17d3b3a1 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -802,8 +802,8 @@ export namespace Docs { return InstanceFromProto(Prototypes.get(DocumentType.WEB), new HtmlField(html), options); } - export function MapDocument(initial: List = new List(), options: DocumentOptions = {}) { - return InstanceFromProto(Prototypes.get(DocumentType.MAP), initial, options); + export function MapDocument(url: string, options: DocumentOptions = {}) { + return InstanceFromProto(Prototypes.get(DocumentType.MAP), new MapField(new URL(url)), options); } export function KVPDocument(document: Doc, options: DocumentOptions = {}) { -- cgit v1.2.3-70-g09d2