diff --git a/.gitignore b/.gitignore index d8b83df..68e57c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,15 @@ package-lock.json +pnpm-lock.yaml +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local diff --git a/README.md b/README.md index 636a987..f093fbf 100644 --- a/README.md +++ b/README.md @@ -1,96 +1,267 @@ [![npm version](https://badge.fury.io/js/mapclay.svg)](https://badge.fury.io/js/mapclay) -In short, this module allows user build web map as soon as possible by simple options. +## Quick Start -No third-party Map Framework dominates. -This module just creates an interface to connect options and pre-defined map renderer. +### The minimal use case: + +Specify **CSS selector** for target HTML element by **data attribute** `data-target` (`pre` in this case): + +```html +
+ +``` + ++use: Maplibre +width: 400px +height: 50vh +center: [139.6917,35.6895] +zoom: 8 ++ +``` + +_Check [the result][test1] with online markdown editor_ -## Quick Start -Create an HTML file with the following lines: +
+use: Leaflet ++
+use: Maplibre ++
+use: Openlayers ++ ``` -`mapclay.js` simply renders elements with `class="map"`(by default) as web map: +_Check [the result][test2] with online markdown editor_ + +
+ ++ + +