Skip to content

astrosat/mapbox-gl-sync-move

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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 syncMove = require('mapbox-gl-sync-move');

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

syncMove(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.

About

Sync movement between two Mapbox GL maps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%