MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
virtual void MgCoordinateSystemGridSpecification::SetUnits ( INT32  unitCode,
INT32  unitType 
) [pure virtual]

Sets the units used to define the desired grid.

.NET Syntax
virtual void SetUnits (int unitCode, int unitType);
Java Syntax
virtual void SetUnits (int unitCode, int unitType);
PHP Syntax
virtual void SetUnits (int unitCode, int unitType);
Parameters:
unitCode(int) One of the integer values defined in the MgCoordinateSystemUnitCode object which indicates the units used to define the grid parameters.
unitType(int) One of the integer values defined in the MgCoordinateSystemUnitType object which indicates the type of units (linear vs angular) used to define the grid parameters.
Remarks:
The unitCode and unitType parameters must be consistent with each other or an exception is thrown. Also, the unit tyupe must be consistent with the type of grid being requested or an exception will be thrown. That is, you may not define a graticule (i.e. a grid of geographic coordinates on a projected coordinate system map) using linear units. SImilarly, you cannot use angular units to define a grid of a projected coordinate system on a projected coordinate system map.