blob: 76bd01b1e7f48c712e5d9a7550042540a7d92ef2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Dumbymap
This library generate web maps from Semantic HTML, play around with [demo page](https://outdoorsafetylab.github.io/dumbymap/)
## Getting Started
Node.js:
```bash
npm install dumbymap
```
```js
import { markdown2HTML, generateMaps } from 'dumbymap'
// Create container element
const container = document.createElement('div')
document.body.append(container)
// Convert markdown text into Semantic HTML
markdown2HTML(container, '# Heading\n\n```map\nid: foo\nuse: Maplibre\n```\n')
// Gernerate maps from code block
generateMaps(container)
```
browser (CDN):
- [unpkg](https://unpkg.com/dumbymap@0.1.1/dist/dumbymap.mjs)
## Depandencies
- [leader-line](https://anseki.github.io/leader-line/)
- [plain-draggable](https://anseki.github.io/plain-draggable/)
- [markdown-it](https://github.com/markdown-it/markdown-it/)
- [mapclay](https://github.com/outdoorsafetylab/mapclay)
- [EasyMDE](https://github.com/Ionaru/easy-markdown-editor)
## TODOs
- Semantic HTML
- context menu for add geolinks
- Editor
- Reduce fontawesome resources
- Better way to edit table in markdown
- Add favicon
|