Thursday, July 07, 2022

Mars & Moon Globes

Like lots of other developers I've been having a lot of fun playing with Mapbox's new 3D globe view. The new globe projection option in Mapbox GL and Mapbox mobile SDKs allows you to turn your 2D maps into fully interactive 3D globes. 

This new 3D globe view isn't restricted to terrestrial maps. It can also be used to turn maps of other planets into interactive 3D globes. For example here is a 3D Moon Globe, created by adding a Moon basemap to Mapbox GL and using the new globe projection.

You can travel even further out into the Solar System on this 3D Mars Map. Both the Moon and the Mars interactive globes use map tiles from OpenPlanetary. The OpenPlanetaryMap project has released a collection of basemaps that can be used for creating planetary web maps (currently this includes basemaps only for the Moon and Mars). All the OpenPlanetaryMap basemaps are XYZ-based Web Mercator projected tiles, so they can easily be used with mapping libraries such as Mapbox, Leaflet, Google Maps and OpenLayers.

Both my Moon & Map globes are hosted on Glitch. This means you can clone these 3D globes by simply pressing the 'remix' button. If you have a basemap source for any other planet you can then simply cut & paste the map tiles URL into my code and you will instantly have a 3D globe of that planet.

If you want to explore more 3D globes then have a look at the Twitter hashtag #mapboxglobe, which Mapbox has been using to share some of the globes that developers have been creating with this new projection option.

No comments: