1.1.1 • Published 8 years ago

mapbox-superset v1.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

mapbox superset

npm version

mapbox super-set is a bunch of functionality used in eegle.io.

mapbox super-set works with mapbog-gl-js.

Install

From npm : npm install mapbox-superset.

Build from source

Simply run npm install && npm run build. It will use webpack to bundle ES6 javascript.

Testing

We use Jest for testing our code. Run npm test to start the test runner.

Script

npm test : Run the unit tests
npm run build: bundle the whole library
npm run watch: bundle the whole library and recompile on file changed

Usage

mapbox-superset use umd modules, you can use :

import mapboxSuperset from 'mapbox-superset';

or

const mapboxSuperset = require('mapbox-superset');

or directly in the html

<script src="./node_modules/mapbox-superset/lib/js/mapbox-superset.js"></script>

minified verson

<script src="./node_modules/mapbox-superset/lib/js/mapbox-superset.min.js"></script>

Example

Examples can be found here

Marker

import mapboxSuperset from 'mapbox-superset';

mapboxgl.accessToken = 'MAPBOX_TOKEN';

const map = new mapboxgl.Map({
  container: 'map',
  style: 'mapbox://styles/mapbox/basic-v9'
});

map.on('load', () => {
  const eiffelTower = {lng: 2.294694, lat: 48.858093};

  // add the marker to the map
  const marker = mapboxSuperset.marker.add(map, eiffelTower);

  // remove it after 3 seconds
  setTimeout(() => {
    mapboxSuperset.marker.remove(map, marker);
  }, 3000);
});

Contribution

Any contribution is welcome !

1.1.1

8 years ago

1.1.0

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago