mirror of
https://github.com/visgl/react-map-gl.git
synced 2026-01-18 15:54:22 +00:00
Overview
react-map-gl is a react friendly API wrapper around Mapbox GL JS.
Example
import MapGL from 'react-map-gl';
<MapGL
width={400}
height={400}
latitude={37.7577}
longitude={-122.4376}
zoom={8}
onChangeViewport={viewport => {
const {latitude, longitude, zoom} = viewport;
// Optionally call `setState` and use the state to update the map.
}}
/>