Last active
August 14, 2020 05:40
-
-
Save skflowne/d4f32a62e27d1028e29abfa816d4fa97 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import React from "react" | |
| import DeckGL from "@deck.gl/react" | |
| import { StaticMap } from "react-map-gl" | |
| import { mapboxToken } from "../../mapbox-token" | |
| // Viewport settings | |
| const INITIAL_VIEW_STATE = { | |
| longitude: -20, | |
| latitude: 0, | |
| pitch: 0, | |
| zoom: 2, | |
| bearing: 0, | |
| } | |
| const DeckGLMap = ({ layers = [] }) => { | |
| return ( | |
| <DeckGL initialViewState={INITIAL_VIEW_STATE} controller={true} layers={layers}> | |
| <StaticMap mapboxApiAccessToken={mapboxToken} /> | |
| </DeckGL> | |
| ) | |
| } | |
| export default DeckGLMap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment