new WorkspaceManager( [options])
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
options |
Mapspace.action.WorkspaceManagerOptions |
<optional> |
Options. |
- Source:
- mapspace/actions/workspacemanager.js
Extends
Members
-
<nullable> control :Mapspace.control.Control
-
The control this action is attached to.
- Inherited From:
- Source:
- mapspace/actions/action.js
-
<nullable> viewer :Mapspace.Viewer
-
This is the viewer this action will be tied to.
- Inherited From:
- Source:
- mapspace/actions/action.js
Methods
-
getCurrentWorkspace()
-
Returns the current workspace, if any.
- Source:
- mapspace/actions/workspacemanager.js
Returns:
- Type
- Mapspace.Workspace
-
getDefaultSyncOptions(numOrthos, layoutDef, viewType, index, masterIndex)
-
Returns the default syncronization options for a viewer.
The criteria is as follows:
- If whe have just one
Mapspace.ortho.ViewerorMapspace.global.Viewer, then we use default syncronization options between that viewer and the rest. - If there is more than one
Mapspace.ortho.Viewerthen first of them is set as 'master'. Only 'master' to other viewers syncronization is enabled. If there is not 'master', then no syncronization is set.
To determine default syncronization settings we use definitions stored in
Mapspace.DefaultSyncTypesForViewTypeobject.Parameters:
Name Type Description numOrthosnumber Number of ortho viewers.
layoutDefobject Object with the definition of the workspace.
viewTypeMapspace.ViewType Type of current viewer.
indexnumber Index position of current viewer.
masterIndexnumber Index position of master viewer.
- Source:
- mapspace/actions/workspacemanager.js
Returns:
Object with syncronization setup.
- Type
- Array.<Mapspace.SyncProperties>
- If whe have just one
-
getDefaultSyncProperties(viewType, syncedViewType, index)
-
Returns a default
Mapspace.SyncPropertiesobject for the given parameters.This function uses the global enum
Mapspace.DefaultSyncTypesForViewTypeto construct the properties object.Parameters:
Name Type Description viewTypeMapspace.ViewType View type of the viewer that inits the synchronization.
syncedViewTypeMapspace.ViewType View type of the viewer synchronized.
indexnumber Index of the synced viewer.
- Source:
- mapspace/actions/workspacemanager.js
Returns:
-
initialize(loadMode, workspaceName, presetName, initOptions)
-
Resets the list of current workspaces for the user in the associated control, adds all the available workspaces in the control, and initializes the workspace.
Parameters:
Name Type Description loadModeMapspace.WorkspaceLoadMode Mode for deciding which workspace to load.
- BYNAME: a workspaceName is expected and if it is undefined then does nothing.
- MOSTUPDATED: if workspaceName exists first tries to load it and if fails tries to load the most updated workspace.
- DEFAULT: if workspaceName exists first tries to load it and if it fails tries to load the workspace called Mapspace.DEFAULT_WORKSPACE.
workspaceNamestring | undefined The name of the workspace to load or undefined to use the param loadMode.
presetNamestring | undefined The name of the view preset to use or undefined to use the current layoutVisibilities property of the workspace.
initOptionsMapspace.ViewerLocationOptions | undefined An optional collection of initial options to set to all the viewers of the workspace to load.
- Source:
- mapspace/actions/workspacemanager.js
-
is2DViewer()
-
Return true if current viewer of the action is a 2D viewer.
- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
is3DViewer()
-
Return true if current viewer of the action is a 3D viewer.
- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isGlobalViewer()
-
Return true if current viewer of the action is a
Mapspace.global.Viewer.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isObliqueViewer()
-
Return true if current viewer of the action is a
Mapspace.oblique.Viewer.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isObliqueViewerVisible()
-
Return true if current viewer of the action is a
Mapspace.oblique.Vieweror aMapspace.global.Viewerin Oblique mode.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isOrthoViewer()
-
Return true if current viewer of the action is a
Mapspace.ortho.Viewer.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isOrthoViewerVisible()
-
Return true if current viewer of the action is a
Mapspace.ortho.Vieweror aMapspace.global.Viewerin Ortho mode.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isProfile3dViewer()
-
Return true if current viewer of the action is a
Mapspace.profile3d.Viewer.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isStreetViewer()
-
Return true if current viewer of the action is a
Mapspace.street.Viewer.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isTableViewer()
-
Return true if current viewer of the action is a
Mapspace.table.Viewer.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean
-
isThreedViewer()
-
Return true if current viewer of the action is a
Mapspace.threed.Viewer.- Inherited From:
- Source:
- mapspace/actions/action.js
Returns:
- Type
- boolean