zackhsi / react-map-gl-typescript

:bomb: react-map-gl + create-react-app + typescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

💣 react-map-gl + create-react-app + typescript

This repository renders a full screen Mapbox map, powered by a Typescript create-react-appwithout ejecting!

full-screen mapbox

Clone the repository

$ git clone git@github.com: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

About

:bomb: react-map-gl + create-react-app + typescript


Languages

Language:TypeScript 77.4%Language:HTML 17.7%Language:CSS 4.9%