From 484bfe26ed5ac601f24b6a58c9f178a148112944 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Mon, 20 Jan 2025 11:05:57 +0800 Subject: [PATCH] Show input URL in exported style JSON. --- app/src/MapView.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/app/src/MapView.tsx b/app/src/MapView.tsx index 103f98b8..c3eb5ab7 100644 --- a/app/src/MapView.tsx +++ b/app/src/MapView.tsx @@ -177,15 +177,10 @@ function getMaplibreStyle( return style; } -function StyleJsonPane(props: { theme: string; lang: string }) { +function StyleJsonPane(props: { theme: string; lang: string; tiles: string }) { const stringified = createMemo(() => { return JSON.stringify( - getMaplibreStyle( - props.theme, - props.lang, - false, - "https://example.com/tiles.json", - ), + getMaplibreStyle(props.theme, props.lang, false, props.tiles), null, 4, ); @@ -723,7 +718,11 @@ function MapView() { droppedArchive={droppedArchive()} /> - +