Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a purejs iTowns example #6094

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

aakaydin
Copy link

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.

@Pessimistress
Copy link
Collaborator

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}));
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants