In a 3D model with multiple named views, when the user selects a view from either the Views pulldown on the 3D toolbar or from the View pane under the Model Tree, the model is oriented to selected view. Is there a method in Javascript to find which named view is the currently selected view? I don't see anything in the 3D Javascript API other than getting the camera position and trying to infer which view it could be.
Thanks.
Selecting a view from the toolbar fires a cameraEvent in the 3D API, but there is no access to the view which triggers it. In fact there's no exposure of the 'view' object except by name, because view presets define a whole bunch of parameters beyond the scope of the JSAPI.
You're correct in saying the only way you could work out which view preset was chosen would be to compare the camera matrix immediately after the cameraEvent fires to a static array of exemplars in your code - you cannot dynamically read the presets from the toolbar.
North America
Europe, Middle East and Africa
Asia Pacific