Created
May 11, 2018 01:15
-
-
Save ibgreen/8d9aca1cd9cfe537cc6bd85101652202 to your computer and use it in GitHub Desktop.
deck.gl child component auto positioning
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
import DeckGL, {MapView, FirstPersonView} from 'deck.gl'; | |
// Multiple views and an auto-positioned base map | |
const views = [ | |
new FirstPersonView({...}), | |
new MapView({id: 'basemap', ...}) | |
]; | |
render() { | |
return ( | |
<DeckGL | |
width={width} | |
height={height} | |
layers={this._renderLayers()} | |
views={views} /> | |
<StaticMap | |
viewId='basemap' | |
{...viewState}/> | |
</DeckGL> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment