From 1d543563d702f6af424e1df041191632126ed805 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 5 Jun 2023 00:11:44 +0200 Subject: [PATCH] Fix: tests --- UI/DownloadFlow/DownloadHelper.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/UI/DownloadFlow/DownloadHelper.ts b/UI/DownloadFlow/DownloadHelper.ts index 8af469c15..f621253be 100644 --- a/UI/DownloadFlow/DownloadHelper.ts +++ b/UI/DownloadFlow/DownloadHelper.ts @@ -60,7 +60,10 @@ export default class DownloadHelper { /** * Converts a geojson to an SVG * - * const feature = { + * + * import StaticFeatureSource from "../../Logic/FeatureSource/Sources/StaticFeatureSource"; + * + * const feature: Feature = { * "type": "Feature", * "properties": {}, * "geometry": { @@ -71,8 +74,10 @@ export default class DownloadHelper { * ] * } * } - * const perLayer = new Map([["testlayer", [feature]]]) - * DownloadHelper.asSvg(perLayer).replace(/\n/g, "") // => ` ` + * const features = new StaticFeatureSource([feature]) + * const perLayer = new Map() + * perLayer.set("testlayer", features) + * new DownloadHelper( {perLayer}).asSvg().replace(/\n/g, "") // => ` ` */ public asSvg( options?: {