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 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 disaptched 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 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 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?
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.
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. Supported startup options are : Constants.STARTUP_PAN
, Constants.STARTUP_TILT
and Constants.STARTUP_FOV
.
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.
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 of the viewer.
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.
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.
Set the focus position of the viewer. Every view will bring this position into view (opening the closest or best photo as needed).
The position to focus on (either 2D or 3D).
Set the focus position of the viewer. Every view will bring this position into view (opening the closest or best photo as needed).
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
.
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.
Update the size of the viewer when the host window has resized.
The new width (pixels).
The new height (pixels).
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