@arenarium/maps 1.0.15 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +17 -20
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,48 +1,45 @@
1
- # Arenarium Maps
2
-
3
- ## Installation
4
-
5
- ```bash
6
- npm install @arenarium/maps
7
- ```
8
-
9
- ```script
10
- <script src="https://unpkg.com/@arenarium/maps@latest/dist/index.js"></script>
11
- <link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet"/>
12
- ```
13
-
14
1
  ## Usage
15
2
 
16
- ```web
3
+ #### Web
4
+
5
+ ```html
17
6
  <html lang="en">
18
7
  <head>
19
8
  <script src="https://unpkg.com/@arenarium/maps@latest/dist/index.js"></script>
20
- <link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet"/>
9
+ <link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet" />
21
10
  </head>
22
11
  <body>
23
12
  <div id="map"></div>
24
13
  <script>
25
- const map = arenarium.mountMap({
26
- container: 'map',
14
+ const map = arenarium.mountMap({
15
+ // Id of the HTML element that contains the map,
16
+ container: 'map'
17
+ // The initial position and zoomof the map
27
18
  position: {
28
19
  center: { lat: 51.505, lng: -0.09 },
29
20
  zoom: 13
30
21
  },
22
+ // The initial theme of the map
31
23
  theme: 'light'
32
24
  });
33
- </script>
25
+ </script>
34
26
  </body>
35
27
  </html>
36
28
  ```
37
29
 
30
+ #### Module
31
+
32
+ ```bash
33
+ npm install @arenarium/maps
34
+ ```
35
+
38
36
  ```svelte
39
37
  <script lang="ts">
40
38
  import { onMount } from 'svelte';
41
-
42
39
  import { mountMap } from '$lib/index.js';
43
40
 
44
41
  onMount(() => {
45
- mountMap({
42
+ const map = mountMap({
46
43
  container: 'map',
47
44
  position: {
48
45
  center: { lat: 51.505, lng: -0.09 },
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@arenarium/maps",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "keywords": [
5
5
  "arenarium",
6
- "map",
6
+ "maps",
7
7
  "svelte"
8
8
  ],
9
9
  "scripts": {