From 3fe2e7e7e430c9c3f97c33b6e1eeb53afebcb341 Mon Sep 17 00:00:00 2001 From: Jan Suleiman Date: Tue, 19 Oct 2021 14:11:05 +0200 Subject: [PATCH] Update README to match geostyler-style v5 --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f12dbe8..5487bae 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,8 @@ const parser = new MapfileParser(); // Load a Mapfile file const mapfile = fs.readFileSync('./mapfiles_folder/my_mapfile.map', 'utf8'); -parser - .readStyle(mapfile) - .then((geostylerStyle) => console.log(geostylerStyle)) - .catch((error) => console.log(error)); +const { options: geostylerStyle } = await parser.readStyle(mapfile); +console.log(geostylerStyle); ``` Writing a Mapfile from a Geostyler-Style object is currently not possible.