Promise that resolves when all javascript code has been loaded and the viewer is ready for use.
Wait for this promise to resolve before calling any other methods.
Polling is possible by calling the isResolved()
method (with boolean result) of the promise.
Signal that is dispatched after the application state has changed.
The new state is passed as an argument. Save this state to disk and later pass it as
the Constants.STARTUP_APP_STATE
option in the startup options of the viewer
to enable auto-login at the next start.
Signal that is dispatched after the field-of-views have changed.
A optional message is passed as an argument. Call the getFieldOfViews2D()
method to
fetch new map objects to display on the host reference map.
Signal that is dispatched after the focus position has been changed.
The new spatial position is passed as an argument (can be null if the focus has been
cleared). Center (move) the host reference map to this position if it falls
outside the current visible extent of the host reference map.
Signal that is dispatched after the footprints have changed.
A optional message is passed as an argument. Call the getFootprints2D()
method to
fetch new map objects to display on the host reference map.
Signal that is dispatched after the globals have changed.
A optional message is passed as an argument. Call the getGlobals()
method to fetch new map
objects to display on the host reference map.
Signal that is dispatched after the measurement has changed.
A optional message is passed as an argument. Call the getMeasureState()
method to
fetch new map objects (inside the measure state) to display on the host
reference map.
Signal that is dispatched when the viewer has edited an existing overlay map object.
The updated map object is passed as an argument.
Signal that is dispatched when the viewer has created a new overlay map object.
The new map object is passed as an argument and it only contains
geometry, in the spatialPoint
or spatialLine
or spatialArea
property of
the map object. Make sure to call the addOverlayObjects
method after
initializing the objectId
and graphic properties like color.
Signal that is dispatched when the viewer has deleted an existing overlay map object.
The deleted map object is passed as an argument.
Signal that is dispatched when the viewer has selected an existing overlay map object.
The selected map object is passed as an argument.
Signal that is dispatched when the viewer does not need the user to pick a location anymore.
A optional message is passed as an argument. Cancel any
active pick function and return the host reference map to its default (pan)
function.
Signal that is dispatched when the viewer needs a location to be picked on the host reference map by the user.
A optional message is passed as an argument. When a location has been picked by the user, use the
setPickPosition()
method to pass it to the viewer.
Signal that is dispatched when a setting changes to a new value. The changed setting is passed as an argument.
Signal that is dispatched when the view position and/or direction of the view changes.
The view vector as returned by getViewVector()
is passed as an argument.
Signal that is dispatched when the workspace is closed.
Signal that is dispatched when the workspace (and all resources in it) are open and ready for use.
Wait for this signal if you want to invoke actions.
Signal that is dispatched when the workspace time filter has changed (was set or disabled). If the time filter was cleared, a null value is dispatched.
Signal that is dispatched after the user requested an overview to the extent of a resource.
The spatial extent of that resource is passed as an argument.
Zoom the host reference map to the given spatial extent.
Add a new view.
The position we want to bring in focus. Adding a photo view will try to open the best photo to bring focus in view.
The render mode of the view to open. Have a look at
the various RENDER_MODE_
values in the
Constants
class. Use RENDER_MODE_3D
or
RENDER_MODE_PHOTO_SPHERICAL
for example.
Should all existing views be closed?
Returns a promise that resolves with the viewId of the new view.
The promise may fail with an Error. See the various ADD_VIEW_ERROR_
error code values in the Constants
class.
Add a new view with extra options, affecting how the view is opened.
Examples on how to use this function are available here : https://kb.orbitgt.com/3dm_viewer_sdk:examples_js.
The position to focus on (either 2D or 3D).
The render mode of the view to open. Have a look at
the various RENDER_MODE_
values in the
Constants
class. Use RENDER_MODE_3D
or
RENDER_MODE_PHOTO_SPHERICAL
for example.
Should all existing views be closed?
A map with options for the newly opened photo. Look at constants starting with Constants.STARTUP_
.
Returns a promise that resolves with the viewId of the new view.
The promise may fail with an Error. See the various ADD_VIEW_ERROR_
error code values in the Constants
class.
Clear the list of overlay objects from the viewer.
Close the viewer. Closes the workspace and removes the viewer itself if possible. After calling this method, this viewer instance will not be usable anymore.
Close the session (freeing it for other users).
Note that the workspace and its resources are not closed and an option is offered to the user to
re-activate the session and continue interacting with the workspace if he so chooses.
returns the sessionId of the closed session or null in case the session was already closed.
Perform an action. Note: This function is only for internal SDK use, application builders do not have to call it.
Some actions are documented in the ViewerActions class.
The action to perform.
The arguments.
Returns the result.
Get the current focus position.
Returns the current focus position (can be null).
Get the footprint map objects to display on the 2D host reference map.
This method should be called after the onFootprintsChanged
signal has been received.
If more than 10000 photo positions are in scope of the requested bounds, photo positions won't be returned.
If more than 10000 simplified trajectories are in scope of the requested bounds, simplified trajectories won't be returned.
the spatial bounds of the 2D host reference map.
the scale denominator of the 2D host reference map (like 1500.0 for example).
Returns a promise to the footprint objects.
Get the state of the measurement and the map objects to display it on the
host reference map. This method should be called after the
onMeasureStateChanged
signal has been received.
Returns the current measure state (with embedded map objects) or null in case the measure function is not active.
Get a property. Note: This function is only for internal SDK use, application builders do not have to call it.
The name of the property.
Returns the property value.
Get resource metadata.</br/>
There are 4 possible metadata fields : collection_start, collection_stop, copyright, copyright_url.
The Collection timestamps are formatted as : 'YYYY-MM-DD hh:mm:ss' (GMT).
the resource identifier.
returns a map of metadata information.
Get a viewer setting.
See the various SETTING_
values in the Constants
for available setting names.
the name of the setting.
returns the value of the setting encoded as a string.
Get the active view position vector.
All positions are returned in the SDK Communication CRS.
Returns a CoordinatePart with 3 positions.
Get the workspace time filter, if set.
Set the focus position of all Views.
The position to focus on (either 2D or 3D).
Returns a promise that resolves to the list of View identifiers on success.
On failure the Error of the first View that failed to focus is provided.
See the various SET_FOCUS_ERROR_
error code values in the Constants
class.
Set the focus position of all Views.
Extra options can be provided that affect specific view types.
The position to focus on (either 2D or 3D).
A map with startup options to apply to all views. Supported startup options are : Constants.STARTUP_PAN
, Constants.STARTUP_TILT
and Constants.STARTUP_FOV
.
Returns a promise that resolves to the list of View identifiers on success.
On failure the Error of the first View that failed to focus is provided.
See the various SET_FOCUS_ERROR_
error code values in the Constants
class.
Communicate a position that was picked by the user on the host reference map
to the viewer. Calling this function only has effect when it is called after
the onPickPositionRequested
signal has been received.
The user-chosen position on the host reference map.
Set a property. Note: This function is only for internal SDK use, application builders do not have to call it.
The name of the property.
The value of the property.
Set a viewer setting.
See the various SETTING_
values in the Constants
for available setting names.
the name of the setting.
the value encoded as a string.
Update the size of the viewer when the host window has resized.
The new width (pixels).
The new height (pixels).
Set the workspace time filter. Note that when calling this function, the time filter mode is also set to 'workspace'.
the new workspace time filter to set.
Transform a coordinate to a different CRS.
The source coordinate to transform.
The target EPSG code.
Coordinate The coordinate expressed in the target CRS.
Class Viewer3DM defines the main interface to the 3DMapping Viewer SDK. See the developer documentation at https://orbitgt.com/kb/3dmapping_sdk