In this sample you can interactively explore when various view events are fired. In the second part of the right panel you can see how the properties change when you click or navigate in the view.
Carefully watch the following video to see which events are fired after a double-click
:
This is how you can listen to events on a SceneView or MapView:
Use dark colors for code blocks Copy
1
2
3
4
// Example: Listen to the click event on the view
view.on("click", (event) => {
console.log("click event: ", event);
});
Watch properties on SceneView or MapView to listen to value changes:
Use dark colors for code blocks Copy
1
2
3
4
5
// Example: Watch to the scale property
reactiveUtils.watch(
() => view.scale,
(scale) => console.log("scale property changed: ", scale);
);
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4