Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Basic example

Initialize a map with coordinates set by React, update the state of coordinates on map movement, and display that data in an element provided by the render function.

Demo gif

Run it

git clone https://github.com/mapbox/mapbox-react-examples.git

cd mapbox-react-examples/basic
npm install
npm start

open http://localhost:3000/

Access token

mapboxgl.accessToken = // YOUR_API_KEY_HERE

Replace the API key in src/Map.js.

Runs the app from http://localhost:3000