-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
91 additions
and
20 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
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
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
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
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,24 @@ | ||
// import {useMap} from 'react-map-gl'; | ||
|
||
export default function Controls2() { | ||
/** | ||
* ## This is how `useMap` works: | ||
* This component does nothing. It's purpose is to demo `useMap`. | ||
* When a component is a child of `<Map>`, `useMap` has a `current` field that references the containing map. | ||
* See https://visgl.github.io/react-map-gl/docs/api-reference/use-map | ||
* See https://visgl.github.io/react-map-gl/docs/api-reference/types#mapref | ||
* ``` | ||
* const maps = useMap(); | ||
* console.log('Controls2 useMap()', maps); | ||
* ``` | ||
* ### First render: | ||
* ``` | ||
* { | ||
* "current": {...}, // this is the same as `mymap` | ||
* "mymap": {...} | ||
* } | ||
* ``` | ||
*/ | ||
|
||
return null; | ||
} |
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