fix: use sveltekit's fetch
All checks were successful
deploy to cloudflare pages / deploy (push) Successful in 38s

This commit is contained in:
uku 2024-10-22 17:16:24 +02:00
parent 3cdc8d3c96
commit e92291eb2e
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o

View file

@ -3,7 +3,7 @@ import type { PageLoad } from "./$types";
const linesUrl = 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"; "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 res = await fetch(linesUrl);
const lines: GeoJSON.FeatureCollection = await res.json(); const lines: GeoJSON.FeatureCollection = await res.json();