mapbox / mapbox-gl-js-mock

A maybe-some-day-fully-featured mock for mapbox-gl-js
BSD 3-Clause "New" or "Revised" License
25 stars 33 forks source link

A mock for non-browser enviorments #6

Open mcwhittemore opened 8 years ago

mcwhittemore commented 8 years ago

When I started this lib there wasn't a known way to run mapbox-gl-js in a non-web-gl browser environment and so I had this mock only mock mapbox-gl-js functionality. Now that there is a solution for running mapbox-gl-js in a non-web-gl environment, should this mock look into being for Node.js only?

Some questions to answer.

/cc @davidtheclark @scothis

scothis commented 8 years ago

The WebGL mock you reference will only work for browsers. mapbox-gl-js should already be able to work headless with the node renderer, at least that's what the gl-js unit tests run with. The project will dynamically swaps in a browser implementation for the default node implemented as part of the browserify config.

There could still be an odd impedance mismatch if draw has a hard dependency on the DOM.