From e92291eb2e58dbe704000faf13251647a4c2b6b3 Mon Sep 17 00:00:00 2001 From: uku Date: Tue, 22 Oct 2024 17:16:24 +0200 Subject: [PATCH] fix: use sveltekit's fetch --- src/routes/+page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/+page.ts b/src/routes/+page.ts index c145b88..32fbd51 100644 --- a/src/routes/+page.ts +++ b/src/routes/+page.ts @@ -3,7 +3,7 @@ import type { PageLoad } from "./$types"; const linesUrl = "https://data.grandlyon.com/geoserver/sytral/ows?SERVICE=WFS&VERSION=2.0.0&request=GetFeature&typename=sytral:tcl_sytral.tcllignemf_2_0_0&outputFormat=application/json&SRSNAME=EPSG:4171&sortBy=gid"; -export const load: PageLoad = async () => { +export const load: PageLoad = async ({ fetch }) => { const res = await fetch(linesUrl); const lines: GeoJSON.FeatureCollection = await res.json();