From 3ba8d0b3ac8bacc94248bf2232b8c55c9b3b4aad Mon Sep 17 00:00:00 2001 From: Youssef-Harby Date: Thu, 11 Apr 2024 19:43:16 +0200 Subject: [PATCH] Update Mapbox style conversion functions and UI in App.svelte --- example/src/App.svelte | 53 +++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/example/src/App.svelte b/example/src/App.svelte index d338dc4..ddddccc 100644 --- a/example/src/App.svelte +++ b/example/src/App.svelte @@ -14,6 +14,7 @@ constructMapboxStyleFromEsriAbsolute, } from "@esri-style-ft-mapbox-style/esriToMapbox"; import { get } from "svelte/store"; + import { onMount } from "svelte"; let esriUrlInput: string = ""; let maplibreUrlInput: string = ""; @@ -68,11 +69,46 @@ function convertMaplibreToEsriStyle(): void { esriStyleJson.set(get(maplibreStyleJson)); } + + onMount(() => { + convertEsriToMaplibreStyle(); + }); + + $: { + convertEsriToMaplibreStyle(); + } + +
-
+
- +
- - + +
-
+
-