2

MapBox GL JS looks very close to Google Maps (in 3D mode) up-close, but if you zoom out enough, the world just looks like an endlessly repeating strip of flat 2D world maps, like this:

1

If you zoom out in Google Maps, you can see that it's actually rendered on a big sphere, the way Earth actually looks from space:

2

How do I enable this look in MapBox GL JS? I mean without using some complicated hack involving third-party libraries.

2 Answers 2

2

Globe has now been released in Mapbox GL JS v2.9 and can be enabled as follows:

const map = new mapboxgl.Map({
  projection: 'globe'
});

Example

1

Globe view with GL JS is currently work in progress, for more information including a working demo see:

https://github.com/mapbox/mapbox-gl-js/issues/10784

According to a Mapbox developer they are trying to make globe view available this fall (2021):

https://github.com/mapbox/mapbox-gl-js/issues/10784#issuecomment-877066650

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.