diff options
Diffstat (limited to 'addon/index.mjs')
-rw-r--r-- | addon/index.mjs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/addon/index.mjs b/addon/index.mjs new file mode 100644 index 0000000..323edf1 --- /dev/null +++ b/addon/index.mjs | |||
@@ -0,0 +1,17 @@ | |||
1 | const { Leaflet } = window.mapclay.renderers | ||
2 | const simpleRender = window.mapclay.renderWith(config => ({ | ||
3 | use: 'Leaflet', | ||
4 | width: '100%', | ||
5 | height: '200px', | ||
6 | XYZ: 'https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png', | ||
7 | ...config, | ||
8 | aliases: { | ||
9 | use: { Leaflet }, | ||
10 | ...(config.aliases ?? {}), | ||
11 | }, | ||
12 | })) | ||
13 | |||
14 | window.generateMaps(document.querySelector('main') ?? document.body, { | ||
15 | initialLayout: '', | ||
16 | render: simpleRender, | ||
17 | }) | ||