SGServer (ISGServer81)
This interface provides the methods for connecting, disconnecting and checking the currently connected SkylineGlobe Server.
|
|
Methods |
|
|
|
Connects TerraExplorer to a SkylineGlobe Server. |
|
|
|
Connects TerraExplorer to a SkylineGlobe Server. This method executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session. |
|
|
|
Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session. This method executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
Disconnects TerraExplorer from a SkylineGlobe Server. |
|
|
|
Disconnects TerraExplorer from a SkylineGlobe Server. This method executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
Returns the URL of the connected server. |
|
|
|
Returns the user name of the connected user. |
|
|
|
GetParam |
Reserved. Currently not used. |
|
|
Returns the display name of the connected user. |
|
|
|
Returns the version of the connected server. |
|
|
|
Returns a Boolean indicating whether the current user has permission to edit the specified layer. HasEditPermissionAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
Returns a Boolean indicating whether the current user has publishing permission. HasPublishPermissionAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
Returns a Boolean indicating whether the current user has permission to view the specified layer HasViewPermissionAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
Returns a Boolean indicating whether indicates whether the current user is the owner of the layer specified by the URL parameter. IsLayerOwnerAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
Returns a Boolean indicating whether the currently logged in user has permission for the passed token. |
|
|
|
Reconnects TerraExplorer to a SkylineGlobe Server. |
|
|
|
Reconnects TerraExplorer to a SkylineGlobe Server. This method executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. |
|
|
|
SetParam |
Reserved. Currently not used. |
Connect
Connects TerraExplorer to a SkylineGlobe Server. This method cannot be used for a guest login. This method executes synchronously, meaning it returns after connecting to the server. If you want to execute asynchronously, use ConnectAsync instead.
In addition to the standard connection parameters, this method accepts an access token, which is an alternative authentication option to logging in with a user and password. When using an access token, append it to the connection URL using token=. In this scenario, pass empty strings for the user name and password parameters.
|
JavaScript |
|
|
Connect( URL, UserName, Password, bRememberMe) |
|
|
C# |
|
|
void Connect( string URL, string UserName, string Password, [bool bRememberMe = False]) |
|
|
C++ |
|
|
HRESULT Connect( BSTR URL, BSTR UserName, BSTR Password , VARIANT_BOOL bRememberMe) |
|
Parameters
URL
The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.
In addition to the standard connection parameters, this method accepts an access token, which is an alternative authentication option to logging in with a user and password. When using an access token, append it to the connection URL using token=. In this scenario, pass empty strings for the user name and password parameters. E.g.,
SGWorld.SGServer.Connect("https://cloud.skylineglobe.com/SG/default?token=xxxxxxxxxxxx","","",true);
UserName
The user name by which to connect to the SkylineGlobe Server.
Password
The password by which to connect to the SkylineGlobe Server.
bRememberMe
A Boolean that determines whether the login details should be remembered for automatic completion in future logins.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
ConnectAsync
Connects TerraExplorer to a SkylineGlobe Server. This method cannot be used for a guest login.
This method executes asynchronously, immediately returning an ITerraExplorerAsync81, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
|
JavaScript |
|
|
ConnectAsync( URL, UserName, Password, bRememberMe) |
|
|
C# |
|
|
ITerraExplorerAsync81 ConnectAsync ( string URL, string UserName, string Password, [bool bRememberMe = False]) |
|
|
C++ |
|
|
HRESULT ConnectAsync ( BSTR URL, BSTR UserName, BSTR Password, VARIANT_BOOL bRememberMe, ITerraExplorerAsync81** pITerraExplorerObject) |
|
Parameters
URL
The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.
UserName
The user name by which to connect to the SkylineGlobe Server.
Password
The password by which to connect to the SkylineGlobe Server.
bRememberMe
A Boolean that determines whether the login details should be remembered for automatic completion in future logins.
Return Value
pITerraExplorerObject
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
ConnectByCookie
Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session. This method executes synchronously, meaning it returns after connecting to SkylineGlobe Server. If you want to execute asynchronously, use ConnectByCookieAsync instead.
|
JavaScript |
|
|
ConnectByCookie( URL, sCookie, bRememberMe) |
|
|
C# |
|
|
void ConnectByCookie ( string URL, string sCookie, [bool bRememberMe = False]) |
|
|
C++ |
|
|
HRESULT ConnectByCookie ( BSTR URL, BSTR sCookie, VARIANT_BOOL bRememberMe) |
|
Parameters
URL
The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.
sCookie
The SGS cookie generated by SGS when the user originally logged in. This cookie is used to identify a returning user.
bRememberMe
A Boolean that determines whether the login details should be remembered for automatic completion in future logins.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
ConnectByCookieAsync
Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session.
This method executes asynchronously, immediately returning an ITerraExplorerAsync81, thereby ensuring that control is promptly handed back to the calling function. The returned ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve callbacks).
If you want to execute synchronously, use ConnectByCookie instead.
|
JavaScript |
|
|
ConnectByCookieAsync( URL, sCookie, bRememberMe) |
|
|
C# |
|
|
ITerraExplorerAsync81 ConnectByCookieAsync ( string URL, string sCookie, [bool bRememberMe = False]) |
|
|
C++ |
|
|
HRESULT ConnectByCookieAsync ( BSTR URL, BSTR sCookie, VARIANT_BOOL bRememberMe, ITerraExplorerAsync81** pITerraExplorerObject) |
|
Parameters
URL
The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.
sCookie
The SGS cookie generated by SGS when the user originally logged in. This cookie is used to identify a returning user.
bRememberMe
A Boolean that determines whether the login details should be remembered for automatic completion in future logins.
Return Value
pITerraExplorerObject
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
Disconnect
Disconnect TerraExplorer from a SkylineGlobe Server. This method executes synchronously, meaning it returns after disconnecting. If you want to execute asynchronously, use DisconnectAsync instead.
|
JavaScript |
|
|
Disconnect() |
|
|
C# |
|
|
Disconnect() |
|
|
C++ |
|
|
HRESULT Disconnect(); |
|
DisconnectAsync
Disconnect TerraExplorer from a SkylineGlobe Server. This method executes asynchronously, immediately returning an ITerraExplorerAsync81, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
If you want to execute synchronously, use Disconnect instead.
|
JavaScript |
|
|
DisconnectAsync() |
|
|
C# |
|
|
ITerraExplorerAsync81 DisconnectAsync () |
|
|
C++ |
|
|
HRESULT DisconnectAsync (ITerraExplorerAsync81** pITerraExplorerObject); |
|
GetConnectedServer
Returns the URL of the connected server.
|
JavaScript |
|
|
GetConnectedServer() |
|
|
C# |
|
|
string GetConnectedServer() |
|
|
C++ |
|
|
HRESULT GetConnectedServer( BSTR* URL) |
|
Return Value
URL
The URL of the connected server.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
GetConnectedUser
Returns the user name of the connected user.
|
JavaScript |
|
|
GetConnectedUser() |
|
|
C# |
|
|
string GetConnectedUser () |
|
|
C++ |
|
|
HRESULT GetConnectedUser ( BSTR* User) |
|
Return Value
User
The user name of the connected user.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
GetUserDisplayName
Returns the display name of the connected user.
|
JavaScript |
|
|
GetUserDisplayName () |
|
|
C# |
|
|
string GetUserDisplayName () |
|
|
C++ |
|
|
HRESULT GetUserDisplayName ( BSTR* DisplayedName) |
|
Return Value
DisplayedName
The display name of the connected user.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
GetVersion
Returns the version of the connected server.
|
JavaScript |
|
|
GetVersion() |
|
|
C# |
|
|
string GetVersion () |
|
|
C++ |
|
|
HRESULT GetVersion ( BSTR* Version) |
|
Return Value
Version
The version of the connected server.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
HasEditPermissionAsync
This method returns a Boolean indicating whether the current user has permission to edit the specified layer. HasEditPermissionAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
§ Upon resolution of the method, passes a Boolean to the OnResolve callback indicating whether the current user has permission to edit the specified layer.
§ Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
|
JavaScript |
|
|
HasEditPermissionAsync (layerName) |
|
|
C# |
|
|
ITerraExplorerAsync81 HasEditPermissionAsync (string layerName) |
|
|
C++ |
|
|
HRESULT HasEditPermissionAsync ( BSTR layerName, ITerraExplorerAsync81** pVal) |
|
Parameters
layerName
A string representing the name of the layer as it appears in the SGS Layers list, e.g., Boston.123321
Return Value
pVal
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
· Upon resolution of the method, passes a Boolean to the OnResolve callback indicating whether the current user has permission to edit the specified layer
· Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
HasPublishPermissionAsync
This method returns a Boolean indicating whether the current user has publishing permission. HasPublishPermissionAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
§ Upon resolution of the method, passes a Boolean to the OnResolve callback indicating whether the current user has publishing permission.
§ Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
|
JavaScript |
|
|
HasPublishPermissionAsync () |
|
|
C# |
|
|
ITerraExplorerAsync81 HasPublishPermissionAsync () |
|
|
C++ |
|
|
HRESULT HasPublishPermissionAsync ( ITerraExplorerAsync81** pVal) |
|
Return Value
pVal
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
· Upon resolution of the method, passes a Boolean to the OnResolve callback indicating whether the current user has publishing permission.
· Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
HasViewPermissionAsync
This method returns a Boolean indicating whether the current user has permission to view the specified layer HasViewPermissionAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
§ Upon resolution of the method, passes a Boolean to the OnResolve callback indicating whether the current user has permission to view the specified layer
§ Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
|
JavaScript |
|
|
HasViewPermissionAsync (layerName) |
|
|
C# |
|
|
ITerraExplorerAsync81 HasViewPermissionAsync (string layerName) |
|
|
C++ |
|
|
HRESULT HasViewPermissionAsync ( BSTR layerName, ITerraExplorerAsync81** pVal) |
|
Parameters
layerName
A string representing the name of the layer as it appears in the SGS Layers list, e.g., Boston.123321
Return Value
pVal
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
· Upon resolution of the method, passes a Boolean to the OnResolve callback indicating whether the current user has permission to view the specified layer
· Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
IsLayerOwnerAsync
This method returns a Boolean indicating whether the current user is the owner of the layer specified by the URL parameter. IsLayerOwnerAsync executes asynchronously, immediately returning an ITerraExplorerAsync81 object, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
§ Upon resolution of the method, passes a Boolean indicating whether the current user is the owner of the layer specified by the URL parameter to the OnResolve callback.
§ Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
|
JavaScript |
|
|
IsLayerOwnerAsync ( URL) |
|
|
C# |
|
|
ITerraExplorerAsync81 IsLayerOwnerAsync ( string URL) |
|
|
C++ |
|
|
HRESULT IsLayerOwnerAsync ( BSTR URL, ITerraExplorerAsync81** pVal) |
|
Parameters
URL
The name and catalog ID of the SkylineGlobe Server layer whose ownership is being checked.
Return Value
pVal
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
· Upon resolution of the method, passes a Boolean indicating whether the current user is the owner of the layer specified by the URL parameter to the OnResolve callback.
· Allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
IsTokenLoggedIn
This method returns a Boolean indicating whether the currently logged in user has permissions associated with the passed URL token.
|
JavaScript |
|
|
IsTokenLoggedIn ( Token) |
|
|
C# |
|
|
bool IsTokenLoggedIn ( string Token) |
|
|
C++ |
|
|
HRESULT IsTokenLoggedIn ( BSTR Token, VARIANT_BOOL* pVal) |
|
Parameters
Token
The URL token whose associated permissions are to be verified for the currently logged in user.
Return Value
pVal
A Boolean indicating whether the currently logged user has the permissions associated with the passed URL token.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.
Reconnect
Reconnect TerraExplorer to the last SkylineGlobe Server it was connected to.
|
JavaScript |
|
|
Reconnect() |
|
|
C# |
|
|
Reconnect() |
|
|
C++ |
|
|
HRESULT Reconnect(); |
|
ReconnectAsync
Reconnect TerraExplorer to the last SkylineGlobe Server it was connected to. This method executes asynchronously, immediately returning an ITerraExplorerAsync81, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync81 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).
|
JavaScript |
|
|
ReconnectAsync() |
|
|
C# |
|
|
ITerraExplorerAsync81 ReconnectAsync () |
|
|
C++ |
|
|
HRESULT ReconnectAsync (ITerraExplorerAsync81** pITerraExplorerObject); |
|
Return Value
pITerraExplorerObject
An ITerraExplorerAsync81 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:
· Allows for handling the various stages of the asynchronous operation, from tracking progress to managing rejection/error, and finally resolving the operation (using OnProgress, OnReject, and OnResolve respectively).
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.