From de6b5a44549a53adc4d06ef005aa5cab81d5668f Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 9 Oct 2024 23:50:51 +0800 Subject: docs: update README --- README.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 1a46a05..f935e39 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Dumbymap -This library generate web maps from Semantic HTML, play around with [demo page](https://outdoorsafetylab.github.io/dumbymap/) +This library generate web maps from [Semantic HTML], play around with [demo page](https://outdoorsafetylab.github.io/dumbymap/) > [!CAUTION] > API of DumbyMap is not stable now, use it carefully @@ -32,11 +32,11 @@ Browser (CDN): ## Semantic HTML -Dumbymap adds several features by Semantic HTML: +Dumbymap adds several features from contents of Semantic HTML: ### Code Block for map -Generated from Element fits CSS Selector `:has(.language-map)` +Generated from Element fits CSS Selector `:has(.language-map)` (by default) It generates maps by `textContent` in YAML format, done by [mapclay] @@ -103,21 +103,31 @@ It show leader-line to coordinates in target map elements, for example: [Taiwan](geo:24,121) -Taiwan +Taiwan -Taiwan +Taiwan ``` It changes behaviors by query parameters in link: 1. If `xy` is specified, GeoLink would use its value instead of value in geo URI scheme -2. If `id` is specified, GeoLink would only points to map with its value. Can use comma to add multiple id +1. If `id` is specified, GeoLink would only points to map with its value. Can use comma to add multiple id +1. If `type` is specified, anchor on map changes appearance (now only support `type=circle`) For example: ```html +[Taiwan](geo:24,121 "Here it is!") + + +Taiwan ``` ## Structure @@ -189,3 +199,4 @@ generateMaps(container, { layouts: "sticky" }) * [StoryMapJS](https://storymap.knightlab.com/) [mapclay]: https://github.com/outdoorsafetylab/mapclay +[Semantic HTML]: https://developer.mozilla.org/en-US/docs/Glossary/Semantics#semantics_in_html -- cgit v1.2.3-70-g09d2