This is documentation of an archived release.
For documentation on the current version, please check Knowledge Base.

WebClient → Panorama

Panorama

The Panorama Class manages the PanoramaViewers and implements other panorama-related functions that are not viewer-specific.

The Panorama component manages the individual panorama viewers as they are opened and closed. On creation each viewer gets an identifier (a number) that is unique for that viewer. Viewers can only be opened with the intention of also loading a photo.

The Panorama component offers services for searching photo positions that are closest to a given position or are inside a given bounding box. It also offers services for downloading a project coverage (a simplified trajectory line) for each project label.

Managing Viewers

The following functions are available to open or close viewers.

When opening viewers by location the OpenViewerCount setting determines the number of viewers that is opened (default = 1).

Function Name Since Arguments Return Type Description
getViewerIds 10.4.0 [<string>,…] Get the identifiers of the opened panorama viewers.
getViewer 10.4.0 viewerId : <string> PanoramaViewer Get an individual panorama viewer.
- viewerId : The identifier of the viewer to return.
Returns a viewer or null incase it was not found.
openViewerAtXY 10.4.0 1) x : <float>
y : <float>
crs : <string>
options : <options>
[<string>,…] Open one or more viewers (depends on settings) and load the photo(s) closest to the given XY position.
- x,y : The coordinate to search at.
- crs : CRS of the search coordinate.
- options : a set of loading options.
Returns the viewer identifiers of the newly opened viewers (may be empty in case opening a new viewer is not possible).
openViewerAtLatLon 10.4.0 2) lat : <float>
lon : <float>
options : <options>
[<string>,…] Open one or more viewers (depends on settings) and load the photo closest to the given WGS84 position.
- lat,lon : The coordinate to search at.
- options : The set of photo loading options.
Returns the viewer identifiers of the newly opened viewers (may be empty in case opening a new viewer is not possible).
openViewerById 10.5.2 photoId : <string>
options : <options>
<string> Open a new viewer and load a panorama photo by its identifier.
Returns the viewer identifier of the newly opened viewer (may be null if opening a viewer is not possible).
openViewer 10.4.0 3) photo : <panoramaphoto>
options : <options>
<string> Open a new viewer and load the provided photo.
Returns the viewer identifier of the newly opened viewer (may be null in case opening a new viewer is not possible).
closeViewer 10.4.0 viewerId : <string> <bool> Close a viewer.
- viewerId : The identifier of the viewer.
Returns true if the viewer was succesfully found and closed.

Searching

Function Name Since Arguments Return Type Description
searchPhotoPositions 10.4.0 4) minX : <float>
minY : <float>
maxX : <float>
maxY : <float>
crs : <string>
<int> Asynchronous function to search for photo positions inside a bounding box.
The returned locations are sorted by distance (nearest first).
- minX,minY,maxX,maxY : minimum and maximum coordinates of a boundingbox.
- crs : CRS of the bounding box coordinates.
Returns a request identifier.
searchPhotoPositionsNearby 10.5.2 x : <float>
y : <float>
crs : <string>
distance : <float>
<int> Asynchronous function to search for photo positions nearby a given location. The returned locations are sorted by distance (nearest first).
- x,y : Center coordiante for search.
- crs : CRS of the center coordinate.
- distance : maximum distance in meters for returned panorama photo's.
Returns a requestId.
searchCoverages 11.0.3 5)
11.2.1 6)
labelNames : [<string>,…]
minX : <float>
minY : <float>
maxX : <float>
maxY : <float>
crs : <string>
<int> Asynchronous function to search for coverages inside a bounding box.
- labelNames : the optional list of labels to limit the query to.
Returns a request identifier.

Opening Photos

The Panorama component can also be asked to open one or more photos.

When opening photo's by location the OpenViewerCount setting determines the number of photo's that is opened (default = 1).

Function Name Since Arguments Return Type Description
openPhoto 11.2 photo : <panoramaphoto>
options : <options>
openMode : <string>
void Load a photo.
- photo : The photo object.
- options : The photo loading options.
- openMode : The photo opening mode (default is 'add').
openPhotoById 11.2 photoId : <string>
options : <options>
openMode : <string>
void Load a photo with a specific identifier.
- photoId : The photo identifier.
- options : The photo loading options.
- openMode : The photo opening mode (default is 'add').
openPhotoAtLatLon 11.2 lat : <float>
lon : <float>
options : <options>
openMode : <string>
void Load the photo(s) closest to a given coordinate.
- lat,lon : The coordinate to search at.
- options : Photo loading options.
- openMode : The photo opening mode (default is 'add').
openPhotoAtXY 11.2 x : <float>
y : <float>
crs : <string>
options : <options>
openMode : <string>
void Load the photo(s) closest to a given coordinate.
- x,y : The WGS/84 coordinate to search at.
- crs : CRS of the search coordinate.
- options : Photo loading options.
- openMode : The photo opening mode (default is 'add').

Measuring

Function Name Since Arguments Return Type Description
startMeasuring 10.4.0 mode : <string> void Start the measure function.
The user can complete a measurement by double-clicking.
stopMeasuring 10.4.0 void Stop the measuring function and return to navigation.

Project Labels

Function Name Since Arguments Return Type Description
getProjectLabels 10.5.2 [<string>,…] Get the list of panorama project label names.
getProjectLabelUse 10.5.2 labelName : <string> <boolean> Get the usage of a specific project label.
Returns true if the label is in use.
setProjectLabelUse 10.5.2 labelName : <string>
use : <boolean>
void Set the usage of a specific project label.
getProjectLabelColor 10.5.2 labelName : <string> <color> Get the color associated with a specific project label.
Returns a color string.
findProjectLabelForPhoto 10.5.2 photo : <photo> <string> Find the label a photo position is categorized under.
Returns the project label or null in case no project label was found.

Other

When changing the focus coordinate, the approximation flag can be used when updating at a quick pace, for example during a mouse drag. When the user releases the mouse drag, you can set the focus coordinate with approximation set to false, to get a 100% accurate end-result. Approximation only works if you specify a coordinate in the Publication CRS or WGS84.

Function Name Since Arguments Return Type Description
getSnapshotButtonVisible 10.5.2 <boolean> Get the visibility of the snapshot button.
setSnapshotButtonVisible 10.5.2 visibility : <boolean> void Set the visibility of the snapshot button.
setFocusCoordinate 11.0.3 x : <float>
y : <float>
crs : <string>
approximate : <boolean>
<boolean> Set the current focus coordinate.
- x,y : The coordinate to focus on.
- crs : CRS of the coordinate.
- approximate : Approximate result? (no server interaction)
Returns true if local approximation was successful.

Events

The following events can be fired :

Event Name Since Event Properties Description
panoramaSearchPhotoPositionsSuccess 10.4.0 requestId : <int>
list : [ <panoramaphoto>,…]
Fired when a search for photo positions was successful.
panoramaSearchPhotoPositionsFailure 10.4.0 requestId : <int>
fault : <fault>
Fired when a search for photo positions failed.
panoramaSearchCoverageSuccess 11.0.3 requestId : <int>
list : [ <panoramacoverage>,…]
Fired when a search for coverages was successful.
panoramaSearchCoverageFailure 11.0.3 requestId : <int>
fault : <fault>
Fired when a search for coverages failed.
panoramaOpenedViewer 10.4.0 viewerId : <string> Fired when a new viewer was opened.
panoramaClosedViewer 10.4.0 viewerId : <string> Fired when a viewer was closed.
panoramaMeasureStart
10.4.0 mode : <string> Fired when the measure function started.
panoramaMeasureStop
10.4.0 mode : <string> Fired when the measure function stopped.
panoramaMeasureUpdate
10.4.0 mode : <string>
properties : <properties>
Fired when the measurement was updated.
A measurement is updated when a new coordinate is measured.
panoramaMeasureComplete
10.4.0 mode : <string>
properties : <properties>
Fired when the measurement was completed.
A measurement is completed when a final coordinate is measured.
A final coordinate is measured by double-clicking.
panoramaMeasureClear
10.4.0 mode : <string> Fired when the current measurement was cleared.
panoramaAddViewerClicked 10.5.2 Fired when the 'add panorama' button is clicked.
panoramaProjectLabelUseChanged 11.1.0 projectLabel : <string> Fired when the 'in-use' property of a project label changes.
This can be caused by user interaction as well as API use using the Panorama.setProjectLabelUse() function.

Deprecated since 10.4.0 :

  • panoramaPositionMeasured → Use the panoramaMeasureComplete event instead.
  • panoramaDistanceMeasured → Use the panoramaMeasureComplete event instead.
  • panoramaAreaMeasured → Use the panoramaMeasureComplete event instead.
1) , 2) , 3)
10.4.1 : options argument added
4)
targetCRS parameter removed in 10.5.2. Since 10.5.2 the targetCRS is always the publication CRS or the custom user CRS.
5)
boundingbox parameters added in 11.1.0.
6)
labelNames argument is now ignored. Coverages for all enabled categories are returned.
 
Last modified:: 2019/03/25 11:36