@geolonia/embed
v4.3.0
Published
Geolonia embed JS API
Downloads
52
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
$ git clone [email protected]:geolonia/embed.git
$ cd embed
$ yarn
$ npm start # run dev server
$ npm test # run tests
$ npm run build # build production bundle
Then you can see http://localhost:3000/
.
Run Bundle analyzer
$ npm run analyze
Snapshot testing
preparation
$ cp .envrc.sample .envrc
$ vi .envrc
$ npm run build
$ docker build . -t geolonia/embed