new Viewer(options)
Main core component of spaceMAP library. It represent main visible 'window' contained 3D map.
Parameters:
Name | Type | Description |
---|---|---|
options |
spcx.ViewerOptions | Options for creating viewer object. |
- Source:
- Viewer.js, line 27
Members
Methods
-
disableRender()
-
- Source:
- Viewer.js, line 64
-
enableRender()
-
- Source:
- Viewer.js, line 71
-
initLicense(licenseKey, projectKey, params, successCallback, failCallback)
-
Initialize license from spaceMAP license service. This method must be called before use any functionality of spaceMAP library.
Parameters:
Name Type Argument Description licenseKey
string Key of owned license.
projectKey
string Key of requested project.
params
Object <optional>
Additional parameters.
successCallback
function <optional>
Callback function called when license is obtained successfuly.
failCallback
function <optional>
Callback function called when error is occured during obtaining license.
- Source:
- Viewer.js, line 85
-
initProject(project)
-
Initialize project.
Parameters:
Name Type Description project
spcx.Project Project options.
- Source:
- Viewer.js, line 103
-
loadContext(contextOptions)
-
Load new context.
Parameters:
Name Type Description contextOptions
spcx.ContextOptions - Source:
- Viewer.js, line 229
-
setLayersVisibility(layerVisibilities)
-
Set overlay layers visibility.
Parameters:
Name Type Description layerVisibilities
Object - Source:
- Viewer.js, line 258
-
setLayerVisibility(layerId, visible)
-
Set overlay layer visibility.
Parameters:
Name Type Description layerId
string visible
boolean - Source:
- Viewer.js, line 242
-
updateSize(width, height)
-
Update size of actual viewport (container of spaceMAP).
Parameters:
Name Type Description width
number height
number - Source:
- Viewer.js, line 297