WebOffice Script API - WebOffice core

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.9 R4 application directory <web application>\client_core\js\api

 

icon_comment

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 core client.

 

For example it is possible, to switch to a tab of a ribbon in the user interface by calling the following Script API method. The parameter argRibbonIdxOrId is the external id of a ribbon.

Ribbon

client.api.showRibbon (argRibbonIdxOrId);
Shows a ribbon by calling the index or external id. The parameter argRibbonIdxOrId is the external id of a ribbon and starts with 0.

client.api.closeActiveTool();
Closes the current active Tool within the ribbon (works with simple and extended custom tool as well).

icon_comment

This parameter does not work with static custom tools or simple one-click tools

Markups

api.addApiMarkup(argMarkupObject);
Adds a new markup object (point, polyline, polygon, circle or text) in WebOffice core client. The argMarkupObject parameter is a mandatory JSON object that describes the markup.

api.hasApiMarkup(argMarkupId);
Checks if a markup is displayed on the map. The parameter argMarkupObject represents the ID of the markup that should be checked.

api.getApiMarkupIds();
Requests all markup objects created using the API.

api.deleteApiMarkupById(argMarkupIds);
Deletes all markup objects based on the specified IDs. The argMarkupIds parameter represents the IDs to be deleted as a text or a list. If the value of this parameter is NULL, all drawings will be deleted that were created using the API.

icon_comment

In order to be able to use the four functions mentioned above, the Markup tool must be configured in the appropriate WebOffice 10.9 R4 project and must be enabled for the respective user in WebOffice UserManagement. Further information on configuring the Markup tool can be found in the chapter Markup.

A detailed documentation of the four functions mentioned above including appropriate examples can be found in the following file: <Web Applikation>\client_core\js\api\readme.txt

Other

client.api.addGeoNode();
Adds Geo Nodes to the map.

client.api.snap_paths();
Recalls the confirmed snap profiles. The list of snap profiles can only change at runtime when a feature layer is uploaded.