II. Server Side Services

Server Side Services can be divided into seven major services: Program, Window, View, Feature and Visibility.

II-1. Program Services

PS001: initSvc

void initSvc(string clientName)

where "clientName" is the registered name of the clients service object.

This method initializes the two-way communication between the client and the SDM.

PS002: testSvc

void testSvc()

This method tests the readiness of the SDM server service

PS003: exitApp

void exitApp()

This method terminates the SDM.

PS004: doComposition

void doComposition()

The first call to this method invokes the SICOM Composition Plug-in. A Graphic View window is opened within SCPI, and loaded with the current SDM view. Subsequent calls result in the creation of additional Graphic View windows within the plug-in, each one loaded with the current SDM view at the time of the call. Each view is also stored as a CARIS dataset, for subsequent reloading in either the plug-in or the SDM.

 

PS005 setClientMenu

void setClientMenu( string title, string itemArray )

where "title" is the text of a new, top-level menu (on the SDM menu bar) and "itemArray" is a comma-separated list of text strings for the associated pop-up menu.

This method appends a new pop-up menu to the SDM menu bar (i.e. it appears at the right). The new text appearing on the menu bar is that given by "title". The comma-separated list of text strings in "itemArray" determines both the number of menu items in the pop-up menu and the text of those menu items. The number of items in "itemArray" cannot exceed 20.

Although this method will always make the new pop-up menu appear, its utility is specific to instances when the client also exposes the method receiveMenuAction to provide the appropriate responses to the new menu items. (See Section III)

Note: this method can only be called once, i.e. only a single client menu (with a maximum of 20 menu items) can be created. The rationale is that the ability to add such a menu, when combined with the ability to modify existing menu text (See modifyMenuText in PS006 below), is sufficient to handle reasonable variations from the standard SDM menu. If the menu requirements of the client are so different from that of the SDM that this is not sufficient, it is considered more reasonable to use the Profile to greatly limit the SDM menu and have the client present its own menu (or other controls).

PS006 modifyMenuText

void modifyMenuText(string oldTextList, string newTextList)

where "oldTextList" is a comma-separated list of text strings identifying standard menu SDM menu items and "newTextList" is a comma-separated list of text strings identifying replacement strings for each of the items in the former.

This method replaces each text string in "oldTextList" with the text string in the corresponding position in "newTextList". Thus, the two lists must contain the same number of items. While "oldTextList" can contain any string values, "newTextList" must contain valid text strings, i.e. strings which are identical to those associated with the SDM menu bar. The following is the complete list of valid strings:

&File, &Open...\tCtrl+O, &Close, &Print...\tCtrl+P, P&rint setup..., &Toolbar, &Status Bar, &View, Zoom, By Rectange, Step In, Step Out, Step Size, Reset, Pan, Center at click, Drag, Step North, Step South, Step East, Step West, Step Size, Reset, Features, Add Feature, Delete Feature, Select Feature, Select Collection, Clear Selection(s), Set Selection Color, Set Current Visibility, Set Default Visibility, Define Layers, Readout, Geodetic Position, UTM Position, Pixel Position, Length Measure, Plug-ins, Certificate, Composition, Query, Project Management, &Window, &Cascade, &Tile, &Arrange Icons, &Help, &About DisplayModule...

Any string appearing in "oldTextList" that does not equal one of the above is ignored. Also, if a reference occurs to any of the above strings and the string is associated with a menu item that has been removed as a result of the profile, it will be ignored.

Chinese AP developers can follow the same syntax to change their menu items in a Chinese development environment.

PS007 setForGeodeticPositions

void setForGeodeticPositions()

This method places the SDM in geodetic position mode. That is, all API functions which normally take position parameters (x,y) in projected coordinates will, instead, expect geodetic coordinates (lon, lat), respectively. Similarly, all API functions that return positions will return latitude for y and longitude for x. The change also affects all functions exposed by the client which receive positions. Geodetic position strings returned by API functions and supplied as arguments to client-side functions are in the following format:

Lat: dd-mm-ss.sssH
Lon: ddd-mm-ss.sssH

where dd is degrees between 0 and 90, ddd is degrees between 0 and 180, mm is minutes between 0 and 59, ss.sss is seconds between 0.000 and 59.999, and H, the hemisphere designation, is either N or S for latitude and either E or W for longitude. Geodetic position strings supplied as arguments to API functions must have essentially the same format, but the number of decimal places of precision on the seconds field is not constrained.

II. Server Side Services: Window >>>>