@geolonia/embed
v5.0.3
Published
Geolonia embed JS API
Downloads
993
Keywords
Readme
@geolonia/embed
JS embed API for Geolonia service.
Features
- webGL vector map rendering
- simple configuration
- map lazy rendering
Examples
https://geolonia.github.io/embed/
Usage
Specify .geolonia class for target elements.
<!DOCTYPE html>
<html>
<body>
<div class="geolonia" ...></div>
<script src="https://cdn.geolonia.com/v1/embed?geolonia-api-key=YOUR-API-KEY"></script>
</body>
</html>Or
<!DOCTYPE html>
<html>
<body>
<div class="geolonia" data-key="YOUR-API-KEY" ...></div>
<script src="https://cdn.geolonia.com/v1/embed"></script>
</body>
</html>You can see more examples at https://geolonia.github.io/embed/.
Contributing
Development
Requirements
- node.js >= 22.18
How to build
$ git clone [email protected]:geolonia/embed.git
$ cd embed
$ npm install
$ npm start # run dev server
$ npm test # run tests
$ npm run build # build production bundleThen you can see http://localhost:3000/.
Run Bundle analyzer
$ npm run analyzeSnapshot testing
preparation
$ cp .envrc.sample .envrc
$ vi .envrc
$ npm run build
$ docker build . -t geolonia/embed