block by enjalot 1ed5d9795b82f846759f89029b0b8ff3

Mapbox-gl -> d3 projection

Full Screen

This example shows how to convert from a Mapbox-gl map projection to a d3.geo Mercator projection. This allows you to take full advantage of all the d3.geo based functions and examples while also leveraging the power and ease-of-use of mapbox-gl

Much credit goes to @vicapow who developed viewport-mercator-project where he figured out the necessary calculations to make this work.

Built with blockbuilder.org

index.html

viewport.js