long createLabelBetweenLocations(string ck, string fc, string label, string x1, string y1, string x2, string y2)
This method places text given by label in the TextAPI's associated view between the locations given by (x1, y1) and (x2, y2). The locations must be relative to the Exchange Coordinate System, unless the map is of type NRMR (See Map Types). After creation, the text feature has CARIS Key ck and Feature Code fc.
The text feature is created with the current default values for font, color, size, rotation, and placement relative to the given location. In addition the text can be stretched, so as to extend the entire distance between the two locations. The text feature can also be restricted to the map's cover or not. These defaults can be set via the following methods:
This method returns 0 upon success, and returns error codes under the following conditions:
- The given coordinates are invalid
- Feature placement is restricted and the coordinates are outside the map's cover
- The SDM cannot create a valid font object
- The SDM cannot create a valid label object
- The SDM cannot create a valid text object
The latter three problems should normally not occur and may indicate a corrupted map dataset.