Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Outline

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.