0.0.12 • Published 3 years ago

@flying-dice/world-map-kit v0.0.12

Weekly downloads
20
License
MIT
Repository
-
Last release
3 years ago

Flying Dice - World Map Kit

World Map Kit for Flying Dice is a basic wrapper around Mapbox to provide abstractions and additional events.

Also takes the mapbox events and re-emits them using Observables.

Installation

yarn add @flying-dice/world-map-kit

Usage

See API.md for API usage

Add Associated CSS Classes to ensure mapbox is displayed correctly:

// index.scss
@import "~mapbox-gl/dist/mapbox-gl.css";
@import "~@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css";
@import "~@mapbox/mapbox-gl-geocoder/dist/mapbox-gl-geocoder.css";

Additionally, In a Production Bundle include the Mapbox JS script, i.e. here is an example of including the JS from a CDN.

<head>
  <!-- Before -->
  <script src='https://api.mapbox.com/mapbox-gl-js/v2.0.0/mapbox-gl.js'></script>
  <!-- After -->
</head>

This is a Workaround for the following issue: https://github.com/mapbox/mapbox-gl-js/issues/4359

License

MIT