A detailed documentation of the functions and their parameters can be found in the Java Script source file itself which is located in the WebOffice 10.8 SP2 application directory <web application>\client_flexjs\js\api
Note:
The file ScriptApi.js contains almost the same functionality from the WebOffice html client. The other jsp files contain additional functionality that can be used in the WebOffice flex client.
Currently implemented functions for the WebOffice 10.8 SP2 Script API:
Map, map views and layers
•scriptAPI.mapByCenterpointScale( fCenterX, fCenterY, iScale )
Query a new map via centre point and scale
Tool selection
•scriptAPI.getActiveTool()
Gets the currently activated tool
•scriptAPI.getActiveCustomTool()
Gets the currently activated custom tool
•scriptAPI.getCustomTool(sToolId)
Calls a custom tool
•scriptAPI.setTool() = function ( sToolId )
Activates a corresponding tool by tool ID (this function is only available for some tools: ToolSelect, ToolEdit, geoprocessing tools, custom Tools)
•client.api.closeActiveTool()
Closes all currently active tools (also works for simple and advanced custom tools)
GUI operations
•scriptAPI.addGUIModule( sName, sUrl, iState, sTitle, bCanBeClosed )
Adds a new GUI module to the WebOffice 10.8 SP2 GUI
•scriptAPI.getGUIModule( argModule )
Gets the WebOffice 10.8 SP2 GUI module for a nested iFrame
•scriptAPI.getGUIModuleByName( argName )
Gets the WebOffice 10.8 SP2 GUI module by its name
•scriptAPI.removeGUIModule( module )
Removes the added GUI module from the name module
•scriptAPI.lockGUI: ( argOptions )
Locks the WebOffice 10.8 SP2 GUI module; no more user interactions are possible until the lock is released again
Attributive queries:
•scriptAPI.queryAttributive( sQueryname, sKeyname, sKeyvalue )
Shows result grid and selects features on map; map is updated by zooming in on result features
•scriptAPI.queryAttributiveMultiLayer( argQueries )
Displays result grid and selects features based on one or more layers on the map; map is updated by zooming in on result features
•scriptAPI.featureZoomAttributive( sQueryname, sKeyname, sKeyvalue )
No result grid; no feature selection on map, map is updated by zooming in on result features
•scriptAPI.featurePanAttributive( sQueryname, sKeyname, sKeyvalue )
No result grid; no feature selection on the map; map is updated by panning on result features
•scriptAPI.locateFeaturesAttributive( sQueryname, sKeyname, sKeyvalue )
No result grid, no feature selection on the map, no map update
•scriptAPI.displayResultAttributive( sQueryname, sKeyname, sKeyvalue )
Displays result grid; no feature selection on the map; no map update.
Snap
•scriptAPI.getSnapProfiles( callbackfct )
Fetches the configured snap profile
•scriptAPI.getSnap(sSnapProfileId, callbackfct)
Fetches the snap vertices of the current map section and the given snap profile.
Other
•scriptAPI.userMessage( sMessage, bAlert, bIsNote )
Shows a notification of the user
•scriptAPI.Env()
Returns a javascript object containing basic properties of the WebOffice 10.8 SP2 environment
•scriptAPI.mapInfo()
Returns basic information about the map
•scriptAPI.log( sLogMessage )
Logs into the client-side WebOffice 10.8 SP2 log monitor
•scriptAPI.mapByCenterpointScale: ( fCenterX, fCenterY, iScale )
Query a new map via centre point and scale