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

Commit

Permalink
Merge pull request #31 from yewyewXD/data-overlay-hover-example
Browse files Browse the repository at this point in the history
Data Overlay Hover Example
  • Loading branch information
tristen authored Sep 13, 2023
2 parents 07293c7 + 74aee97 commit 1d6bb22
Show file tree
Hide file tree
Showing 14 changed files with 17,519 additions and 0 deletions.
23 changes: 23 additions & 0 deletions data-overlay-hover/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
23 changes: 23 additions & 0 deletions data-overlay-hover/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Data Overlay Hover example

Add a data overlay to a map via React and use controls to visualize it differently. Each country's data will be displayed in an alert on-click.

![Demo gif](https://i.imgur.com/xnnQqKd.gif)

### Run it

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

cd mapbox-react-examples/data-overlay-hover
npm install
npm start

open http://localhost:3000/

### Access token

mapboxgl.accessToken = // YOUR_API_KEY_HERE

Replace the [API key](https://docs.mapbox.com/help/getting-started/access-tokens/) in `src/Map.js`.

Runs the app from http://localhost:3000
Loading

0 comments on commit 1d6bb22

Please sign in to comment.