Last active
December 2, 2019 19:37
-
-
Save duanebester/92a6551147c91e31b453e565e1f2786d to your computer and use it in GitHub Desktop.
App 0
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
const mapConfig = { | |
style: "mapbox://styles/mapbox/outdoors-v10", | |
containerStyle: { | |
height: "100vh", | |
width: "100vw" | |
}, | |
center: { lat: 30.266666, lng: -97.73333 }, | |
flyToOptions: { | |
speed: 0.8 | |
} | |
}; | |
const Map = ReactMapboxGl({ | |
accessToken: process.env.REACT_APP_MAPBOX_TOKEN | |
}); | |
function App() { | |
const [mapState, setMapState] = useState({ zoom: [6], loaded: false }); | |
return ( | |
<div className="App"> | |
<Map {...mapConfig} zoom={mapState.zoom}></Map> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment