@flying-dice/world-map-kit

0.0.12 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @flying-dice/world-map-kit

Weekly Downloads

6

Version

0.0.12

License

MIT

Unpacked Size

80.5 kB

Total Files

33

Last publish

Collaborators

  • jonathanturnock