@mapbox/mapbox-gl-sync-move

0.3.1 • Public • Published

@mapbox/mapbox-gl-sync-move CircleCI

Sync movement between two or more Mapbox GL JS maps.

Install

npm install @mapbox/mapbox-gl-sync-move

Usage

This module exports a function that receives as arguments two or more Mapbox GL JS maps whose movements you'd like to sync.

var mapboxgl = require('mapbox-gl');
var syncMaps = require('mapbox-gl-sync-move');

var mapA = new mapboxgl.Map(..);
var mapB = new mapboxgl.Map(..);

syncMaps(mapA, mapB);

Developing

There are unit tests with mocked maps, and there's a page for manual testing.

Run the unit tests with npm test.

To manually test, ensure you have a MapboxAccessToken environment variable set. Then start the server with npm run start.

Readme

Keywords

Package Sidebar

Install

npm i @mapbox/mapbox-gl-sync-move

Weekly Downloads

6,686

Version

0.3.1

License

ISC

Unpacked Size

12.5 kB

Total Files

8

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user