This repository has been archived by the owner on Sep 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from yewyewXD/data-overlay-hover-example
Data Overlay Hover Example
- Loading branch information
Showing
14 changed files
with
17,519 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.