From 4fc430aded5ff30fc1c28dc4b2072c69aa6c0454 Mon Sep 17 00:00:00 2001 From: sfggeogis Date: Mon, 6 May 2024 12:35:35 +0200 Subject: [PATCH] update readme --- README.md | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 77ab5bb..a0e42de 100644 --- a/README.md +++ b/README.md @@ -47,14 +47,22 @@ Check out the features through - import { Map,Styles } from 'mapicgc-gl-js'; - - const map = Map({ - container: 'map', - style: Styles.LIGHT, - center: [2.1464, 41.306], - zoom: 7.4, - }); + import { Map, Config } from "mapicgc-gl-js"; + //import * as mapicgcgl from "mapicgc-gl-js"; + + async function initMap() { + const data = await Config.getConfigICGC(); //load config + const map = new Map({ + container: "map", + style: data.Styles.LIGHT, + center: [1.808, 41.618], + zoom: 10, + maxZoom: 19, + hash: true, + pitch: 0, + }); + } + initMap(); ``` ### CDN @@ -70,12 +78,17 @@ Check out the features through ```