Skip to content

Instantly share code, notes, and snippets.

@skflowne
Last active August 14, 2020 14:29
Show Gist options
  • Save skflowne/fc732f9c3085fb9213eaa5d6a03450c5 to your computer and use it in GitHub Desktop.
Save skflowne/fc732f9c3085fb9213eaa5d6a03450c5 to your computer and use it in GitHub Desktop.
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