react-map-gl-typescript
react-map-gl-typescript copied to clipboard
:bomb: react-map-gl + create-react-app + typescript
:bomb: react-map-gl + create-react-app + typescript
This repository renders a full screen Mapbox map, powered by a Typescript
create-react-app—without ejecting!
Clone the repository
$ git clone [email protected]:zackhsi/react-map-gl-typescript.git
Create an environment variable file with a Mapbox token
First, make sure you have a Mapbox account.
From the Mapbox account page, create an
access token and copy it. Then, create a .env.development.local file at the
root of your repository. create-react-app will load it into process.env,
as documented
here.
$ cat << EOF > .env.development.local
REACT_APP_MAPBOX_TOKEN=your_mapbox_token
EOF
Install node modules
$ npm i
Start the app
$ npm run start