III. Client Side Services

C-001: receiveSelectedFeature

void receiveSelectedFeature(string ck , string x , string y , bool status)

where ck = CARIS Key, x and y are respectively the projected Easting and Northing coordinates, (or Longitude and Latitude, if the server is in the Geodetic mode). Projected coordinates are ASCII versions of real numbers, while Geodetic coordinates have the form given in PS007. In addition, status = True , if there is a CARIS Key and False, if none.

This method will receive CARIS key and coordinates from the Server after the user’s click.. If STATUS is FALSE, the user did not select a valid feature, i.e. no feature with the given "fcode" (see FS001-1) was selected. In this case, no valid key is available in the "ck" and x and y give the location of the mouse click. Normally, x and y give the location of the selected feature.

C-001a receiveSelectionStatus

void receiveSelectionStatus( BOOL status )

where status = TRUE if at least one feature has been selected via one the two-way (asynchronous) methods setSelectSingleFeature (FS001-1a) or setSelectFeatureCollection (FS001-1b).

After receiving a TRUE status via this method, the Client can initiate queries for the properties of one or more of the selected features, by first calling getKeys (FS001-8a), and then using querySelectionByKey (FS001-11) or querySelectionByIndex (FS001-12).

IMPORTANT: the receiveSelectionStatus method cannot, itself, call any Server methods, as the Server is waiting for receiveSelectionStatus to return. Attempts to call server methods from within this method (or any other COM method exposed by the Client) will result in a lock-up condition. Instead, the Client should perform some local action, e.g. enable a "query" button or schedule an event (which might execute a query operation after 1 second), and then return.

C-002: receivePoint

void receivePoint(string x, string y)

where x and y are respectively the projected Easting and Northing coordinates, (or Longitude and Latitude, if the server is in the Geodetic mode). Projected coordinates are ASCII versions of real numbers, while Geodetic coordinates have the form given in PS007.

This method will receive UTM coordinates from the Server after the users click.

C-003: receiveNewPointFeature

void receiveNewPointFeature(string x, string y, string fcode, string ck)

where x and y are respectively the projected Easting and Northing coordinates, (or Longitude and Latitude, if the server is in the Geodetic mode). Projected coordinates are ASCII versions of real numbers, while Geodetic coordinates have the form given in PS007. In addition, fcode = FeatureCode, ck =CARIS Key.

This method will receive identifying information for a new point feature created by the user, via the SDM feature menu.

C004: receiveMenuAction

void receiveMenuAction( short itemIndex )

where item index is the zero-based index of the menu item (i.e. top item is zero) on which the user clicked, in the client-installed pop-up menu.

This method must be exposed by the client in order to provide a meaningful response to menu items in the popup menu installed via setClientMenu (See Section.II-1). The "itemIndex" identifies the menu item clicked by the user and should be used to determine the proper response. Any proper response must not call another SDM client method.

C005: receivePointList

void receivePointList( xList, yList )

where xList is a comma-separated list of horizontal coordinates and yList is the corresponding, comma-separated list of vertical coordinates associated with the vertices of a polyline drawn by the user via the Data Readout: Start Track/End Track menu item. xs and ys are respectively the projected Easting and Northing coordinates, (or Longitude and Latitude, if the server is in the Geodetic mode). Projected coordinates are ASCII versions of real numbers, while Geodetic coordinates have the form given in PS007.

This method must be exposed by the client if:

1. The client has identified itself to the server, via initSvc, as a receiver of client-side messages.

2. The SDM Profile permits Vector Readout.

Otherwise, a fatal error will result.

C-006: receiveUserRect

void receiveUserRect(string x1, string y1, string x2, string y2)

where x1 and y1 are the coordinates of the South West corner and x2 and y2 are the coordinates of the North East corner of a user-dragged rectangle. Coordinates are projected (e.g. UTM) unless SDM is in Geodetic mode.

This method will receive coordinates of the South West and North East corners of the user-dragged rectangle after a call to setSendUserRect (See VS001-6).

 

IV.Example >>>>