.fog {
position: absolute;
inset: 0;
background: radial-gradient(
rgba(255, 255, 255, 0.1) 50%,
rgba(255, 255, 255, 0.9) 75%,
rgba(255, 255, 255, 1) 100%
);
pointer-events: none;
}
Mapbox
docs.mapbox.com › all docs
Add custom fog to a map | Mapbox GL JS | Mapbox
Mapbox GL JS · Copy as Markdownchevron-down · View as MarkdownCopy as Markdown · This example uses setFog to add a custom atmosphere effect to a map. It transitions between night and day to change the mood of the environment.
React Map GL
visgl.github.io › default (map)
default (Map) | react-map-gl
Map container CSS. ... The current cursor type. The fog property of the style. Must conform to the Fog Style Specification.
How to use an existing Mapbox GL "template" but add elevation/fog to it? - Stack Overflow
Again, if I were to make my own ... stuff: https://docs.mapbox.com/mapbox-gl-js/style-spec/root/ To be frank, I have no idea who would ever want a 3D map which can support elevation/height differences and realistic fog/lights, yet not use those features.... More on stackoverflow.com
Newest 'mapbox-gl' Questions - Page 3 - Stack Overflow
Stack Overflow | The World’s Largest Online Community for Developers More on stackoverflow.com
Clear Mapbox-gl fog effect - Stack Overflow
I've created a Mapbox-gl map with a globe projection. I then use map.setFog({}) to add the fog effect. More on stackoverflow.com
React map component?
For a basic map, leaflet is a decent option via something like react-leaflet, but it's got some major drawbacks if you are building anything mildly complex.
I think that Uber's react-map-gl (a "react-ified" version of Mapbox's "map-gl-js") is a much stronger react mapping lib.
More on reddit.comReact Map GL
visgl.github.io › react-map-gl
Home | react-map-gl
Comes with additional React interfaces such as context and hooks to support custom components. Use together with e.g. deck.gl to render performant and compelling 2D and 3D WebGL visualizations on top of your MapLibre GL JS and Mapbox GL JS based maps.
GitHub
github.com › visgl › react-map-gl
GitHub - visgl/react-map-gl: React friendly API wrapper around MapboxGL JS · GitHub
react-map-gl is a suite of React components designed to provide a React API for mapbox-gl or maplibre-gl.
Starred by 8.4K users
Forked by 1.4K users
Languages TypeScript 65.5% | JavaScript 32.2%
GitHub
github.com › visgl › react-map-gl › blob › master › CHANGELOG.md
react-map-gl/CHANGELOG.md at master · visgl/react-map-gl
React friendly API wrapper around MapboxGL JS. Contribute to visgl/react-map-gl development by creating an account on GitHub.
Author visgl
React Map GL
visgl.github.io › get started
Get Started | react-map-gl
Using react-map-gl requires node >= 12 and react >= 16.3.
React Map GL
visgl.github.io › introduction
Introduction | react-map-gl
We sometimes render two maps side by side, and when the user interacts with one, update both cameras. We draw React UI outside of the map container, that moves with the camera. We also render WebGL graphic overlays on top of the map, most notably with deck.gl.
Stack Overflow
stackoverflow.com › questions › tagged › mapbox-gl
Newest 'mapbox-gl' Questions - Page 3 - Stack Overflow
I'm trying to create a function that users can click on a country marker and the map will zoom into the country on React. However, the problem is the zoom level is different for different countries. ... ... I'm rendering a mapboxgl map in RMarkdown (HTML output, using r2d3 js library in R for the js part). I'm trying to update the layers displayed in a mapboxgl map by passing in a dynamic variable for ... ... I'm working with mapbox-gl-js in a React (Next.js) project and I'm having trouble figuring out how to dynamically style markers differently when they are clicked.
React Map GL
visgl.github.io › upgrade guide
Upgrade Guide | react-map-gl
If you use the Map component as a child of the DeckGL component from deck.gl, upgrade deck.gl to >=8.9.18. v7 is a complete rewrite of the library. It is redesigned to be fast, lightweight, fully typed, to behave the same and expose the same APIs as the wrapped map library, and to provide the maximum compatibility with third-party plugins. To take advantages of these new features, you need to make some changes to your code that was previously depending on react-map-gl v5 and v6.
GitHub
github.com › visgl › react-map-gl › issues
Issues · visgl/react-map-gl
React friendly API wrapper around MapboxGL JS. Contribute to visgl/react-map-gl development by creating an account on GitHub.
Author visgl
npm
npmjs.com › package › react-map-gl
react-map-gl - npm
3 weeks ago - React components for MapLibre GL JS and Mapbox GL JS. Latest version: 8.1.1, last published: 19 days ago. Start using react-map-gl in your project by running `npm i react-map-gl`. There are 482 other projects in the npm registry using react-map-gl.
» npm install react-map-gl
Published Apr 11, 2026
Version 8.1.1
GitHub
github.com › visgl › react-map-gl › blob › master › docs › get-started › get-started.md
react-map-gl/docs/get-started/get-started.md at master · visgl/react-map-gl
Using react-map-gl requires node >= 12 and react >= 16.3.
Author visgl
React Map GL
visgl.github.io › what's new
What's new | react-map-gl
Props are mapped 1:1 from the native options wherever appropriate. Almost all imperative APIs (flyTo, fitBounds etc.) can now be called directly without breaking the React binding. Compatibility: first and third-party plugins! Directly use mapbox-gl-draw, mapbox-gl-geocoder, to name a few.
React Map GL
visgl.github.io › tips and tricks
Tips and Tricks | react-map-gl
import {useSelector, useDispatch} from 'react-redux'; import Map, {Marker} from 'react-map-gl/maplibre'; function MapView() { const viewState = useSelector((s: RootState) => s.viewState); const vehicles = useSelector((s: RootState) => s.vehicles); const dispatch = useDispatch(); const onMove = useCallback(evt => { dispatch({type: 'setViewState', payload: evt.viewState}); }, []); return ( <Map {...viewState} onMove={onMove} mapStyle="mapbox://styles/mapbox/streets-v9" > > {vehicles.map(vehicle => ( <Marker key={vehicle.id} longitude={vehicle.coordinates[0]} latitude={vehicle.coordinates[1]}> <svg> // vehicle icon </svg> </Marker>) )} </Map> ); }
GitHub
github.com › alex3165 › react-mapbox-gl › issues › 772
Stop map hover interrupting map transition on scroll. · Issue #772 · alex3165/react-mapbox-gl
September 3, 2019 - alex3165 / react-mapbox-gl Public · Notifications · You must be signed in to change notification settings · Fork 534 · Star 1.9k · New issue · Jump to bottom · Open · samput opened this issue · Sep 3, 2019 · 0 comments · Open · samput opened this issue · Sep 3, 2019 · 0 comments · Copy link · I've made a map with a fly to location based on scroll position, sandbox here - https://codesandbox.io/s/little-fog-x1oif?fontsize=14 ·
React Map GL
visgl.github.io › adding custom data
Adding Custom Data | react-map-gl
import * as React from 'react'; import Map, {Source, Layer} from 'react-map-gl/maplibre'; import type {CircleLayer} from 'react-map-gl/maplibre'; import type {FeatureCollection} from 'geojson'; const geojson: FeatureCollection = { type: 'FeatureCollection', features: [ { type: 'Feature', geometry: { type: 'Point', coordinates: [-122.4, 37.8] }, properties: {title: '915 Front Street, San Francisco, California'} } ] }; const layerStyle: CircleLayer = { id: 'point', type: 'circle', paint: { 'circle-radius': 10, 'circle-color': '#007cbf' } }; function App() { return ( <Map initialViewState={{ longitude: -122.45, latitude: 37.78, zoom: 14 }}> <Source id="my-data" type="geojson" data={geojson}> <Layer {...layerStyle} /> </Source> </Map> ); }