Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I enable the globe projection/view in mapbox gl javascript API? #11865

Closed
ftottittl opened this issue May 8, 2022 · 6 comments
Closed

Comments

@ftottittl
Copy link

Hi I am using mapbox gl js, like below: and I tried to change the projection to "globe" like the other threads do, but do not work. Anyone could help me?

new mapboxgl.Map({
attributionControl: false, // do not show the attribution at the right bottom corner
bearing: bearing || 0,
boxZoom: true,
container: containerId,
maxBounds: maxBounds || null, // LngLatBoundsLike. If set, the map will be constrained to the given bounds.
maxPitch: maxPitch || 85, // 0 - 85
minPitch: minPitch || 0, // 0 - 85
maxZoom: maxZoom || 22, // 0 - 24
minZoom: minZoom || 0, // 0 - 24
pitch: pitch || 0,
projection: "mercator", // "globe"??
style: style || 'mapbox://styles/mapbox-map-design/ckhqrf2tz0dt119ny6azh975y'
});

@ftottittl
Copy link
Author

@mpulkki-mapbox

@karimnaaji
Copy link
Contributor

Globe view isn't released yet, the first public beta will be available this week.

@karimnaaji
Copy link
Contributor

Globe is available on the latest beta: v2.9.0-beta.1.

@Dildar-Khan
Copy link

Hello @karimnaaji how to give atmosphere style like one of them #10784 (comment)

@karimnaaji
Copy link
Contributor

hello @Dildar-Khan , atmosphere can be set like so:

map.setFog({
  'horizon-blend': 0.1,
  'star-intensity': 0.15,
  'color': 'white',
  'high-color': 'rgba(66, 88, 106, 1.0)',
  'space-color': 'rgba(66, 88, 106, 1.0)'
});

We also have a few examples in this page.

@Dildar-Khan
Copy link

Thank you @karimnaaji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants