- https://www.foursquare.com
- @foursquare
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 {Deck, MapController} from '@deck.gl/core'; | |
import {GeoJsonLayer} from '@deck.gl/core-layers'; | |
// source: Natural Earth http://www.naturalearthdata.com/ via geojson.xyz | |
const GEOJSON = | |
'https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_110m_admin_1_states_provinces_shp.geojson'; //eslint-disable-line | |
const INITIAL_VIEW_STATE = { | |
latitude: 40, | |
longitude: -100, |
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 |
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
// Pass URL directly as data, no need to load it first | |
const deck = new Deck({ | |
... | |
layers: [ | |
new ScatterplotLayer({ | |
data: 'https://...' | |
}) | |
] | |
}); |
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
const deck = new Deck({ | |
... | |
initialViewState: {longitude: ..., latitude: ..., zoom: ...} | |
}); | |
// or, if using React | |
<DeckGL initialViewState={{longitude: , latitude: , zoom: }} .../> |
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
const deck = new Deck({width: '100%', height: '100%, ...'}) | |
// or, if using react | |
<DeckGL width="100%" height="100%" .../> |