Controls
You may have noticed that in some of the examles, you could not zoom out very far or move below the horizon. The view contains a Control object which moves the view around based on mouse and keyboard input. The control object has settings which can limit the range of movement of the view.
For now, there is only one control supported in CanvasMap3D, the Orbital Control. This control uses spherical coordinates to position the view and allows the user to move around the origin.
Controls
All controls have settings to make the mouse active or not and to change the minimum and maximum elevation from the 0 x,y plane of the scene.
// set some limits on the controls var TheControls=TheView.GetControls(); TheControls.SetSetting("CM3Controls","MinElevation",12000); TheControls.SetSetting("CM3Controls","MaxElevation",1200000); TheControls.SetSetting("CM3Controls","MouseActive",true);
Orbital Controls
The orbital control also allows us to set the maximum distance we can move from the origin of the scene.
// set some limits on the controls var TheControls=TheView.GetControls(); TheControls.SetSetting("CM3ControlsOrbit","MaxDistance",5000000);