JS embed API for Geolonia service.
- webGL vector map rendering
- simple configuration
- map lazy rendering
https://geolonia.github.io/embed/
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/.
$ 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/
.
$ npm run analyze
$ cp .envrc.sample .envrc
$ vi .envrc
$ npm run build
$ docker build . -t geolonia/embed