Namespace: action

Mapspace. action

This namespace contains definitions for generic actions. An action is an object that encapsulates the operations executed by a control when is interacted or by a viewer when it is interacted. Special cases of actions can include others that execute operations when a workspace is interacted.

By separating the user interface (controls) from the operations executed (actions) the API offers a more modular way of integrate all the pieces in a web app. For example, an action could respond to events triggered by different controls as far as the events are the same, avoiding the need to write the same code in when different controls are used.

Source:
mapspace/actions/action.jsdoc

Classes

Action
AddressInfo
Attribution
ChangeMap
ContactFrom
Dashboard
DateSelector
FeatureEdition
FeaturePanel
FeatureSelection
FullScreen
Geolocation
History
ImageProvider
Language
LayerSwitcher
Login
Logout
North
OpenStreetImage
OrthoDownload
OutputProjection
PdfReport
Profile3dPanel
ReportPanel
ReverseGeocoding
Rotator
ScreenShot
Search
SidePanel
StatusBar
SyncAction
TaskNotification
TimeRange
Tools
Units
ViewerMenu
ViewerName
ViewerSettings
ViewerSwitcher
WorkspaceAction
WorkspaceInfo
WorkspaceManager
Zoom

Type Definitions


ActionOptions

Options for Mapspace.action.Action.

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

Source:
mapspace/typedefs.js

AttributionOptions

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

autoCollapsibleMinWidth boolean | undefined

The min width under which the control will be shown as collapsible.

Source:
mapspace/typedefs.js

FeaturePanelOptions

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

workspace Mapspace.Workspace | undefined

The workspace this action is tied to.

localStorageKey string | undefined

A key that can be used to store values locally inside the action.

zoomDuration number | undefined

Duration of the zoom animation in milliseconds.

flashDuration number | undefined

Duration of the flash animation in milliseconds.

interactionStyle ol.style.Style | undefined

Interaction style to use with interactive tools.

Source:
mapspace/typedefs.js

LoginOptions

Options for Mapspace.action.Login.

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

loginSuccessFn function | undefined

The function that will be executed if login is successful. Any function receiving one parameter: a Mapspace.UserData object containing user data.

Source:
mapspace/typedefs.js

NorthOptions

Options for Mapspace.action.Action that execute rotations and show the north.

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

duration number | undefined

Duration of the rotation animation in milliseconds.

Source:
mapspace/typedefs.js

RotatorOptions

Options for Mapspace.action.Action that execute rotations and show the north.

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

duration number | undefined

Duration of the rotation animation in milliseconds.

Source:
mapspace/typedefs.js

SyncActionOptions

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

workspace Mapspace.Workspace | undefined

The workspace this action is tied to.

type Mapspace.SyncType | undefined

Type of syncing.

syncedViewIndex number | undefined

The view index of the synced viewer.

Source:
mapspace/typedefs.js

ViewerInfoOptions

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

infoSetup Array.<Mapspace.ViewerInfoOption> | undefined

the definition of the different informations.

projection ol.ProjectionLike | undefined

For coordinates, a projection object to which transform coordinates. If no projection is given then current map projection is used.

undefinedHTML string | undefined

For coordinates HTML to show when no data is available. Defaults to an empty string.

Source:
mapspace/typedefs.js

WorkspaceActionOptions

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

workspace Mapspace.Workspace | undefined

The workspace this action is tied to.

localStorageKey string | undefined

A key that can be used to store values locally inside the action.

Source:
mapspace/typedefs.js

WorkspaceManagerEventType

Types of events for a Mapspace.action.WorkspaceManager.

Name Value Description
Mapspace.action.WorkspaceManagerEventType.WORKSPACELOADED workspaceloaded Triggered when a workspace is loaded
Mapspace.action.WorkspaceManagerEventType.WORKSPACEFAILED workspaceempty Triggered when something went wrong loading a workspace (empty list of workspaces or bad deserialization)
Source:
mapspace/enums.js

WorkspaceManagerOptions

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to. This can be ignored because this action is not tied to a particular viewer.

target Element | undefined

The target for the workspace.

sideBar Mapspace.control.SideBar | undefined

The SideBar to use for controls that require a SideBar.

location Mapspace.ViewerLocationOptions | undefined

The default location given to viewers when this action creates a new workspace.

Source:
mapspace/typedefs.js

ZoomOptions

Options for Mapspace.action.Zoom

Properties:
Name Type Description
control Mapspace.control.Control | undefined

The control this action is attached to.

viewer Mapspace.Viewer | undefined

The viewer this action is tied to.

duration number | undefined

Duration of the zoom animation in milliseconds.

Source:
mapspace/typedefs.js