Last active
August 14, 2020 14:29
-
-
Save skflowne/fc732f9c3085fb9213eaa5d6a03450c5 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" | |
// Viewport settings | |
const INITIAL_VIEW_STATE = { | |
longitude: -20, | |
latitude: 0, | |
pitch: 0, | |
zoom: 2, | |
bearing: 0, | |
} | |
const DeckGLMap = ({ mapboxToken = "", 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