deck.gl
deck.gl copied to clipboard
Add a purejs iTowns example
Referencing issue #6093
Change List
- Added an example using iTowns to examples/get-started/pure-js
For the moment the background map doesn't have the same projections as DeckGL and the two maps seem to 'slide' while panning, the airports dont stay on the same place as we move the map.
Thanks for the submission. If you test against the master branch (yarn start-local) you can use an externally constructed projection matrix:
onViewStateChange: ({viewState}) => {
...
viewState.projectionMatrix = getProjectionMatrix(view);
return viewState;
}
It may be easier to use your base map's controller instead:
const deck = new Deck({
controller: false
style: {pointerEvents: 'none'},
viewState: INITIAL_VIEW_STATE
});
// pseudo code
view.on('change', () => {
const deckViewState = getDeckViewState(view);
deck.setProps({viewState: deckViewState}));
});