Created
April 12, 2018 06:11
-
-
Save Pessimistress/1fd054d5422ab3fe7b66429b50111d13 to your computer and use it in GitHub Desktop.
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
// Make a layer interactive: set `pickable` to `true` | |
new deck.ScatterplotLayer({ | |
// ... | |
pickable: true | |
}); | |
// You can confirm that it works by turning on autoHighlight. | |
// The circles should change color when hovered over: | |
new deck.ScatterplotLayer({ | |
// ... | |
pickable: true, | |
autoHighlight: true | |
}); | |
// To subscribe to pointer events, supply callback functions to onHover and/or onClick: | |
new deck.ScatterplotLayer({ | |
// ... | |
pickable: true, | |
onHover: info => console.log('scatterplot layer hovered', info.object), | |
onClick: info => console.log('scatterplot layer clicked', info.object) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment