@arenarium/maps 1.0.52 → 1.0.54
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.
- package/README.md +1 -66
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,71 +1,6 @@
|
|
|
1
1
|
## Usage
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
```html
|
|
6
|
-
<html lang="en">
|
|
7
|
-
<head>
|
|
8
|
-
<script src="https://unpkg.com/@arenarium/maps@latest/dist/index.js"></script>
|
|
9
|
-
<link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet" />
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div id="map"></div>
|
|
13
|
-
<script>
|
|
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
|
|
18
|
-
position: {
|
|
19
|
-
center: { lat: 51.505, lng: -0.09 },
|
|
20
|
-
zoom: 13
|
|
21
|
-
},
|
|
22
|
-
// The initial style of the map
|
|
23
|
-
style: {
|
|
24
|
-
name: 'light',
|
|
25
|
-
colors: {
|
|
26
|
-
primary: '#007bff',
|
|
27
|
-
background: '#fff',
|
|
28
|
-
text: '#000'
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
</script>
|
|
33
|
-
</body>
|
|
34
|
-
</html>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
#### Svelte
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
npm install @arenarium/maps
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
```svelte
|
|
44
|
-
<script lang="ts">
|
|
45
|
-
import { onMount } from 'svelte';
|
|
46
|
-
import { mountMap } from '$lib/index.js';
|
|
47
|
-
|
|
48
|
-
onMount(() => {
|
|
49
|
-
const map = mountMap({
|
|
50
|
-
container: 'map',
|
|
51
|
-
position: {
|
|
52
|
-
center: { lat: 51.505, lng: -0.09 },
|
|
53
|
-
zoom: 13
|
|
54
|
-
},
|
|
55
|
-
style: {
|
|
56
|
-
name: 'light',
|
|
57
|
-
colors: {
|
|
58
|
-
primary: '#007bff',
|
|
59
|
-
background: '#fff',
|
|
60
|
-
text: '#000'
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
</script>
|
|
66
|
-
|
|
67
|
-
<div id="map"></div>
|
|
68
|
-
```
|
|
3
|
+
https://maps.arenarium.dev
|
|
69
4
|
|
|
70
5
|
## License
|
|
71
6
|
|