====== WebClient ====== Class ''WebClient'' implements the Orbit Web Client component. By default, the CRS used by the API will be the Publication CRS. Photo locations, measurement results, etc will be expressed in this CRS. You can overrule this by calling the ''setCRS()'' function. After calling this function, coordinates returned by the API will always be expressed in this CRS, even when you close the publication and load another one. Call ''setCRS(null)'' to clear and return to the publication CRS. ===== License management ===== These functions are for managing the license context. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | setDeveloperId | 10.5.2 | id : | | Set the developer identification. | | setProductId | 10.5.2 | id : | | Set the product identification. | | checkLicense | 10.5.2 | | | Request a license lease. | | closeLicense | 17.0.1 | | | Close the active license lease explicitly. Done automatically on browser close. | | setLicenseServer | 11.1.0 | serverUrl : | | Set the license server that can provide an activation key. | ===== Login management ===== Showing the login panel can be triggered using the API. The login configuration can also be retrieved or set to allow for a consistent login experience between sessions. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getLoginConfiguration | 11.1.0 | | | Get the login configuration data.\\ Used whenever a configuration change occurs. | | setLoginConfiguration | 11.1.0 | data : | | Set/Restore the login configuration data.\\ Used when loading the component. | | showLoginPanel | 11.1.0 | | | Brings up the login panel. | ===== Context ===== The following functions provide access to datatype-specific contexts. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getPanorama | 10.4.0 | | [[Panorama]] | Returns the Panorama context. | | getOblique | 11.0.3 | | [[Oblique]] | Returns the Oblique context. | | getMap | 10.5.2 | | [[Map]] | Returns the Map context. | ===== Integration ===== These functions are useful to the integration context. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getVersion | 10.5.2 | | | Returns the version of the component. | | getVersionDate | 11.0.3 | | | Returns the version of the component. | | setSize | 10.4.1 | width : \\ height : | void | Set the component size. | ===== Loading a publication ===== The core function of the webclient component is to load a publication.\\ These functions are all about preparing to load, loading or closing a publication. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | setServer | 10.4.0 | url : | void | Set the server location. | | setCredentials | 10.4.0 | username : \\ password : | void | Set the login credentials. | | checkConnection | 10.5.2 | | void | Check connectivity to the configured server. | | loadPublication | 10.4.0 | publicationName : \\ options : ((loadPublication : The second applyStartupParameters argument changed from boolean to object type. The javascript api is backwards compatible. The new preferred way to prevent the startup parameters from being applied is by setting the ApplyStartupParametersOnLoad setting to false using the setSetting function, before loading a publication.)) | void | Load a publication. \\ The options argument is optional. | | closePublication | 10.4.0 | | void | Closes the current publication. | | applyPublicationStartup\\ Parameters | 10.4.0 | | void | Apply the startup parameters, stored in the publication description. \\ A Publication must be loaded beforehand. | | loadPublicationList | 10.4.0 \\ 11.1.0 ((loadPublicationList : Deprecated since 11.1.0. The internal login panel should be used to let the user select a publication.))| | | Asynchronous function to load the list of available publications for the current server and credentials.\\ Returns a request identifier. | ===== Manage layers ===== WKT layers can be managed using these functions. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | addWKTLayer | 10.4.0 ((Added attributeDefinitions and attributeRows in 11.0.3)) | name : \\ wkt : \\ crs : \\ legendParameters : [[core_types|]]\\ attributeDefinitions : [ [[core_types|]],...]\\ attributeRows : [ [[core_types|]],...] | | Add a layer based on a WKT geometry.\\ - //name// : The name of the layer.\\ - //wkt// : The WKT describing the spatial objects.\\ - //crs// : The spatial reference system of the wkt data.\\ - //legendParameters// : The optional legend parameters to use when rendering.\\ - //attributeDefinitions// : The optional list of attribute definitions that describe the attribute table.\\ - //attributeRows// : The optional list of attribute rows, one per object. All objects are assumed to be of the same spatial type.\\ Returns false when a layer with the given name already exists or WKT data is invalid.\\ [[wkt|More info on WKT]]. | | addWKTToWKTLayer | 10.4.0 ((Added attributeRows in 11.0.3)) | name : \\ wkt : \\ crs : \\ attributeRows : [ [[core_types|]],...] | | Add objects to an existing WKT layer.\\ - //name// : The name of the layer.\\ - //wkt// : The WKT describing the spatial objects.\\ - //crs// : The spatial reference system of the wkt data.\\ - //attributeRows// : The optional list of attribute rows, one per object.\\ Returns false when the provided layer could not be found or the wkt data is invalid.\\ [[wkt|More info on WKT]]. | | clearWKTLayer | 17.0.1 | name : | | Remove all objects from a WKT layer.\\ Returns true if the layer was found and cleared, false if not found. | | removeLayer | 10.4.0 | name : | | Remove a layer.\\ Returns true if the layer was found and removed, false if not found. | | reloadLayer | 17.0.1 | name : | | Reload a layer with external data (like WFS).\\ Returns true if the layer was found and reloaded, false if not found. | | reloadAllLayers | 17.0.1 | | | Reloads all layers with external data (like WFS). | ===== Component settings ===== You can tweak the webclient component using these functions. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getMapVisible | 10.5.2 | | | Returns the visiblity of the map. | | setMapVisible | 10.4.0 | visible : | void | Set visiblity of the map.\\ This function should be called after loading a publication. | | getPanoramaVisible | 10.5.2 | | | Returns the visibility of the panorama. | | setPanoramaVisible | 10.4.0 | visible : | void | Set visibility of the panorama.\\ This function should be called after loading a publication. | | getCopyMeasurementToClipboardVisible | 11.1.2 | | | Get the visibility of the measurement copy-to-clipboard buttons. | | setCopyMeasurementToClipboardVisible | 11.1.2 | visibility : | | Set the visibility of the measurement copy-to-clipboard buttons. This function should be called after loading a publication. | | getSetting | 10.4.0 | name : [[settings|]] | | Returns an application setting. | | setSetting | 10.4.0 | name : [[settings|]]\\ value : | void | Set an application setting. | ===== CRS ===== By default the webclient operates using the Publication CRS. This is the CRS code defined when creating the publication. This means that measurements, photo positions and coverages returned by the API are all defined this CRS. Coordinates that are displayed in the UI are also displayed using this CRS. The API user can choose to use a different CRS. Setting a CRS can allow for easier integration with the context application. Note that this also changes the CRS of coordinates presented in the UI. To change the CRS of coordinates presented in the UI, use the setDisplayCRS function. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getCRS | 10.5.2 | | [[crs|]] | Get the [[180:developer:webclient:crs|CRS]] used by the webclient API.\\ Returns the custom CRS or the publication CRS if no custom CRS was set using ''setCRS()''. | | setCRS | 10.5.2 | crs : [[crs|]] | void | Set the CRS the webclient uses.\\ By default, this CRS is defined by the CRS of the loaded publication. Once you called this function, the client will ignore the publication CRS and always use this CRS. Call setCRS(null) to clear it and go back to using the publication CRS.\\ Since version 10.5.2 this method can also be called while an publication is loaded. Versions before that can only call this method before opening a publication. | | getDisplayCRS | 11.1.3 | | [[crs|]] | Get the [[180:developer:webclient:crs|DisplayCRS]] used by the webclient.\\ Returns the displayCRS or null in case no display CRS was explicitly set. | | setDisplayCRS | 11.1.3 | crs : [[crs|]] | void | Set the CRS the webclient uses for presenting coordinates in the UI.\\ Call setCRS(null) to clear it. | | getPublicationCRS | 10.5.2 | | [[crs|]] | Returns the CRS defined by the current publication. | ===== Object Selection ===== The following functions give access to the selected object. |< 100% 30% 7% 20% 10% 33% >| ^ Function Name ^ Since ^ Arguments ^ Return Type ^ Description ^ | getSelectedObject | 11.0.3 | | [[core_types|]] | Get the currently selected object (can be null) | ===== Events ===== The following events can be fired : |< 100% 30% 7% 30% 33% >| ^ Event Name ^ Since ^ Event Properties ^ Description ^ | loadPublicationSuccess | 10.4.0 ((Added the publicationName property in 10.5.2)) | publicationName : | Fired when a publication was loaded succesfully. | | loadPublicationFailure | 10.4.0 ((Added the fault property in 10.5.2)) | fault : [[core_types|]] | Fired when a publication failed to be loaded. | | loadPublicationListSuccess | 10.4.0 | list : [,...]\\ requestId : | Fired when a request for available publications was succesful.\\ The requestId property matches to an identifier returned by loadPublicationList. | | loadPublicationListFailure | 10.4.0 | fault : [[core_types|]]\\ requestId : | Fired when a request for available publications failed. \\ The requestId property matches to an identifier returned by loadPublicationList. | | checkConnectionSuccess | 10.5.2 | | Fired when a connection to the server was successful. | | checkConnectionFailure | 10.5.2 | fault : [[core_types|]] | Fired when a connection to the server failed. | | closePublicationSuccess | 10.5.2 | publicationName : | Fired when the publication is closed. | | licenseGranted | 10.5.2 | statusCode : [[license_statuscodes|]]\\ licenseType : \\ licenseModules : [,...] | Fired when the license is granted.\\ The statusCode is guaranteed to be 'ok'. | | licenseRevoked | 10.5.2 | statusCode : [[license_statuscodes|]] | Fired when the license is revoked. | | selectedObjectChanged | 11.0.3 | object : [[core_types|]] | Fired when the selected object has changed. | | loginConfigurationChanged | 11.1.0 | | Fired when the login configuration changed. |