[[global]] -> Panorama
====== Panorama ====== The **Panorama** Class manages the [[PanoramaViewer]]s 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). |< 100% 20% 7% 20% 10% - >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getViewerIds | 10.4.0 | | [,...] | Get the identifiers of the opened panorama viewers. | | getViewer | 10.4.0 | viewerId : | [[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 ((10.4.1 : options argument added)) | x : \\ y : \\ crs : [[crs|]]\\ options : [[load_photo_options|]] | [,...] | 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 ((10.4.1 : options argument added)) | lat : \\ lon : \\ options : [[load_photo_options|]] | [,...] | 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 : \\ options : [[load_photo_options|]] | | 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 ((10.4.1 : options argument added)) | photo : \\ options : [[load_photo_options|]] | | 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 : | | Close a viewer.\\ - viewerId : The identifier of the viewer.\\ Returns true if the viewer was succesfully found and closed. | ===== Searching ===== |< 100% 20% 7% 20% 10% - >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | searchPhotoPositions | 10.4.0 ((targetCRS parameter removed in 10.5.2. Since 10.5.2 the targetCRS is always the publication CRS or the custom user CRS.)) | minX : \\ minY : \\ maxX : \\ maxY : \\ crs : [[crs|]] | | 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 : \\ y : \\ crs : [[crs|]]\\ distance : | | 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 ((boundingbox parameters added in 11.1.0.))\\ 11.2.1 ((labelNames argument is now ignored. Coverages for all enabled categories are returned.)) | labelNames : [,...]\\ minX : \\ minY : \\ maxX : \\ maxY : \\ crs : [[crs|]] | | 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). |< 100% 20% 7% 20% 10% - >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | openPhoto | 11.2 | photo : [[core_types|]]\\ options : [[load_photo_options|]]\\ openMode : [[openmode|]] | 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 : \\ options : [[load_photo_options|]]\\ openMode : [[openmode|]] | 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 : \\ lon : \\ options : [[load_photo_options|]]\\ openMode : [[openmode|]] | 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 : \\ y : \\ crs : [[crs|]]\\ options : [[load_photo_options|]]\\ openMode : [[openmode|]] | 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 ===== |< 100% 20% 7% 20% 10% - >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | startMeasuring | 10.4.0 | mode : [[panorama_measure_modes|]] | 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 ===== |< 100% 20% 7% 20% 10% - >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getProjectLabels | 10.5.2 | | [,...] | Get the list of panorama project label names. | | getProjectLabelUse | 10.5.2 | labelName : | | Get the usage of a specific project label.\\ Returns true if the label is in use. | | setProjectLabelUse | 10.5.2 | labelName : \\ use : | void | Set the usage of a specific project label. | | getProjectLabelColor | 10.5.2 | labelName : | [[core_types|]] | Get the color associated with a specific project label.\\ Returns a color string. | | findProjectLabelForPhoto | 10.5.2 | photo : | | 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. |< 100% 20% 7% 20% 10% - >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getSnapshotButtonVisible | 10.5.2 | | | Get the visibility of the snapshot button. | | setSnapshotButtonVisible | 10.5.2 | visibility : | void | Set the visibility of the snapshot button. | | setFocusCoordinate | 11.0.3 | x : \\ y : \\ crs : [[crs|]]\\ approximate : | | 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 : \\ list : [ [[core_types|]],...] | Fired when a search for photo positions was successful. | | panoramaSearchPhotoPositionsFailure | 10.4.0 | requestId : \\ fault : [[core_types|]] | Fired when a search for photo positions failed. | | panoramaSearchCoverageSuccess | 11.0.3 | requestId : \\ list : [ [[core_types|]],...] | Fired when a search for coverages was successful. | | panoramaSearchCoverageFailure | 11.0.3 | requestId : \\ fault : [[core_types|]] | Fired when a search for coverages failed. | | panoramaOpenedViewer | 10.4.0 | viewerId : | Fired when a new viewer was opened. | | panoramaClosedViewer | 10.4.0 | viewerId : | Fired when a viewer was closed. | | panoramaMeasureStart\\ | 10.4.0 | mode : [[panorama_measure_modes|]] | Fired when the measure function started. | | panoramaMeasureStop\\ | 10.4.0 | mode : [[panorama_measure_modes|]] | Fired when the measure function stopped. | | panoramaMeasureUpdate\\ | 10.4.0 | mode : [[panorama_measure_modes|]]\\ properties : [[measure_properties|]] | Fired when the measurement was updated. \\ A measurement is updated when a new coordinate is measured. | | panoramaMeasureComplete\\ | 10.4.0 | mode : [[panorama_measure_modes|]]\\ properties : [[measure_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 : [[panorama_measure_modes|]]| Fired when the current measurement was cleared. | | panoramaAddViewerClicked | 10.5.2 | | Fired when the 'add panorama' button is clicked. | | panoramaProjectLabelUseChanged | 11.1.0 | projectLabel : | 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.