My question today is how can I define boundaries that the user can view? I would like to define a rectangle with lat/lon, or something similar, that the user must stay in. Is this possible?
I did find the ScreenSpaceCameraController documentation that allows me to define minimum and maximum zoom distance, which will be helpful, but I haven't found anything that allows me to limit lat/lon position (although I'm sure it is there somewhere)
You could check very frame the camera position, convert to Cartographic terms and cap it, like if (lat > maxLat) {lat = maxLat;} then convert back to Cartesian and set camera.position to that.
Depending on the use case I would recommend either having your applications user event capture handle this. You want to keep the clock tick events as minimal as possible and since it gets called so often even an simple fetch and compare to set a boolean value could be considered costly. Better to have your keyboard or mouse event handler detect when it should stop movement.
However it seems to keep this information to itself and doesn’t share with the outside world. It would be nice if it would invoke a callback call when position has changed, and it would only be called when updatemembers is called.