SitDataManager

new SuperMap3D.SitDataManager(options)

Situation Map Manager Instance Class
Name Type Description
options Object optional Object has the following properties:
Name Type Description
scene scene optional scene
serverUrl String optional Plotting service URL
smlInfo SmlInfoStruct optional Information of the Currently Opened Situation Map
smlFileName String optional Name of the Currently Opened Situation Map
sitData SitDataStruct optional Structure of the Information for the Currently Opened Situation Map

Members

readonlyaddSmlFileCompleted : Event

Successful Event of Overlaying Local Situation Map File

readonlyaddSmlFileFailed : Event

Failed Event of Overlaying Local Situation Map File

readonlyaddSmlFileToLayerCompleted : Event

Successful Event of Overlaying Situation File to Specified Layer

readonlyaddSmlFileToLayerFailed : Event

Failed Event of Overlaying Situation File to Specified Layer

readonlydeleteSmlFileCompleted : Event

Successful Event of Deleting Server Situation Map File

readonlydeleteSmlFileFailed : Event

Failed Event of Deleting Server Situation Map File

readonlygetSmlInfoCompleted : Event

Successful Event of Obtaining Information for Specified Situation Map File

readonlygetSmlInfoFailed : Event

Failed Event of Obtaining Information for Specified Situation Map File

readonlygetSmlInfosCompleted : Event

Successful Event of Obtaining Situation Map File List

readonlygetSmlInfosFailed : Event

Failed Event of Obtaining Situation Map File List

readonlyopenLocalSmlFileCompleted : Event

Successful Event of Opening Local Situation Map File

readonlyopenLocalSmlFileFailed : Event

Failed Event of Opening Local Situation Map File

readonlyopenSmlFileCompleted : Event

Successful Event of Opening Situation Map File

readonlyopenSmlFileFailed : Event

Failed Event of Opening Situation Map File

readonlysaveSmlFileCompleted : Event

Successful Event of Saving Situation Map File

readonlysaveSmlFileFailed : Event

Failed Event of Saving Situation Map File

readonlyscene : Scene

Current scene

readonlyserverUrl : String

Plotting service URL

smlFileName : String

Current Situation Map Name

smlInfo : SmlInfoStruct

Structure of Basic Information for Situation Map

Methods

staticSuperMap3D.SitDataManager.getInstance(options)

get instance of situation map manager
Name Type Description
options Object optional Object has the following properties:
Name Type Description
scene scene optional scene
serverUrl String optional Plotting service URL
smlInfo Object optional nformation of the Currently Opened Situation Map
smlFileName String optional The Name of the Currently Opened Situation Map During Publication

addLocalSmlFile(bAllLayer)

Overlay the situation map file (local), first you need to upload the local situation map file to the server, and then overlay it
Name Type Description
bAllLayer Boolean Whether to overlay all layers: If true, overlay all layers onto the current situation map. If false, only overlay the layers that are the same as the current situation map.

addSmlFileOnServer(smlFileName, bAllLayer)

Overlay the Published Situation Map onto the Current Situation Map
Name Type Description
smlFileName String The name when saving the situation map file
bAllLayer boolean Whether to overlay all layers, if true, overlay all layers on the current situation map, if false, only overlay the same layer as the current situation map

addSmlFileToLayer(layerName)

Overlay a Situation File (Local) to a Specified Layer. First, the local situation map file needs to be uploaded to the server, and then overlay it.
Name Type Description
layerName String Name of the Layer to Be Overlaid

addSmlFileToLayerOnServer(smlFileName, layerName)

Overlay the Published Situation Map to a Specified Layer
Name Type Description
smlFileName String The name when saving the situation map file
layerName String name of the specified layer

deleteSmlFileOnServer(smlFileName)

Delete the Specified Published Situation Map File
Name Type Description
smlFileName String The Name of the Situation Map File When Saved to the Server

downloadSmlFileUrl(smlFileName)

Obtain the Download Link for the Specified Situation File from the Server
Name Type Description
smlFileName String The name when saving the situation map file

getPlottingLayers()Array.<PlottingLayer>

Get the current plotting layer
Returns:

getSmlInfo(smlFileName)

Get Information for the Specified Situation Map
Name Type Description
smlFileName string The name of the situation map file, which is the name used when saving to the server.

getSmlInfos(page, pageSize)

Get the List of Situation Map Files Published by Users on the Server
Name Type Description
page Number The number of pages, counting from the first page
pageSize Number The number of query records on each page

newSmlFile()

Creating a new situation map,it will clear the current situation map.

openAndUploadLocalSmlFile(callback)

Open the situation map file (local) and upload it to the server
Name Type Description
callback function callback function

openJsonSitData(sitData, smlFileName)

Open a Situation Map File from a JSON Object
Name Type Description
sitData Situation Map File from JSON Object
smlFileName Situation map file name (optional)

openLocalSmlFile()

Open the Situation Map file (local). Delete all layers in the current Situation Map and reload the Situation Map

openSitDataFromJson(sitData)

Open Situation Map Data in JSON Format
Name Type Description
sitData

openSmlFileOnServer(smlFileName, callback)

Open the specified published situation map file
Name Type Description
smlFileName String The Name of the Situation Map File When Saved to the Server
callback function The callback function after opening, returns the information of the opening result

saveAsSmlFile(smlFileName)

Save the current situation map data to the server
Name Type Description
smlFileName smlFileName The Name of the Situation Map File Saved to the Server

saveSitData()Object

Convert Situation Map to Object
Returns:
Situation Map JSON Object

saveSmlFile(smlFileName, isCover)

Save the current situation map data to the server, overwriting if the situation map already exists on the server.
Name Type Description
smlFileName String Name of Situation Diagram File
isCover Boolean Whether to overwrite if the same name exists on the server

uploadSmlFile(callback)

Upload situation map file
Name Type Description
callback function Callback Processing Function (Specified by the User) for Uploading Situation Files to the Server