PublishToSGS

Publishes a project and all its layers, resources, and styling to SkylineGlobe Server. Through a single publishing operation, the project is made available to desktop, mobile and TE for Web clients, as well as standard geospatial clients such as WFS/WFS-T/WMS/WMTS/3D Tiles (Cesium).

This method executes asynchronously, i.e., it returns immediately. You can then use ISGWorld.OnPublishFinished to be notified when publishing is complete.

 

JavaScript

 

PublishToSGS (

       HideProgressDialog,

       UseExistingLayers,

       ConvertModelLayersTo3DML,

       viewAccess,

       editAccess,

       Tag,

       viewerToken)

 

C#

 

string PublishToSGS (

       bool HideProgressDialog = False,

       bool UseExistingLayers = True,

       bool ConvertModelLayersTo3DML = True,

       TerraExplorerX.SGPublishPermission viewAccess = 3,

       TerraExplorerX.SGPublishPermission editAccess = 3,

       string Tag = "",

       string viewerToken = "")

 

C++

 

HRESULT PublishToSGS(

       [in] VARIANT_BOOL HideProgressDialog,

       [in] VARIANT_BOOL UseExistingLayers,

       [in] VARIANT_BOOL ConvertModelLayersTo3DML,

       [in] SGPublishPermission viewAccess,

       [in] SGPublishPermission editAccess,

       [in] BSTR Tag,

       [in] BSTR viewerToken,

       [out, retval] BSTR* json);

 

Parameters

HideProgressDialog

A Boolean that determines whether to hide the progress dialog that shows the approximate percentage of completion.

UseExistingLayers

A Boolean that determines whether to use existing layers on the server for layers for which a match was found. For more information, see the TerraExplorer User Manual.

ConvertModelLayersTo3DML

A Boolean that determines whether to convert model layers to the optimized, fully textured 3DML format.

viewAccess

An enum that determines the view access for the published project. Users with View access can view and load the project from the Layers page. The following are the possible values:

·          SG_PERMISSION_ONLY_ME = 0,

·          SG_PERMISSION_MY_GROUP = 1,

·          SG_PERMISSION_MY_SITE = 2,

·          SG_PERMISSION_EVERYONE = 3

editAccess

An enum that determines the edit access for the published project. Edit access adds the ability to load, edit and save changes to the project from TerraExplorer and the browser. The following are the possible values:

·          SG_PERMISSION_ONLY_ME = 0,

·          SG_PERMISSION_MY_GROUP = 1,

·          SG_PERMISSION_MY_SITE = 2,

·          SG_PERMISSION_EVERYONE = 3

Tag

Tags, i.e., key words or terms associated with the project file for advanced searches, represented as a semi-colon delimited string. E.g., if the project has three tags, pass "a;b;c" for this parameter, where "a" is the value of the first tag, "b" is the value of the second, and "c" the value of the third.

viewerToken

Viewer token (generated in SkylineGlobe Server Manager) that can be used to grant view access to the project. The token is appended to the project URL that is generated in the publishing process, e.g., https://cloud.skylineglobe.com/sg/TEF80/tew.html?project=https://cloud.skylineglobe.com/SG/demos/projects/Mexico_Beach_Emergency_Response&token= 13ccec69e6dc4cfd88828db25609dc7c, and it enables a user to directly access SGS project layers that are non-public, without logging in to SGS. See the Access Token property in the "Adding Users and Setting User Properties" chapter of the SkylineGlobe Server User Guide for more information.

Return Value

json

A json with the URL's of the desktop, web, and mobile published projects. For example:

{

    "TE Desktop": "https://www.skylineglobe.com/SG/projects/SG.1111111",

    "TE Web": "https://www.skylineglobe.com/SG/terraexplorerweb/terraexplorer.html?catalogid=SG.1111111",

    "TE Mobile": "https://www.skylineglobe.com/SG/terraexplorerweb/terraexplorer.html?catalogid=SG.1111111&isMobileApp=1"

}  

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.