tsc_JobMapExtentsEventArgs

tsc_JobMapExtentsEventArgs is supplied to the tsc_JobMap::OnExtents() event handler.  It is used for modifying the 'zoom to extents' boundary.  When the user clicks the Zoom to extents button, or the map is entered for the first time, all objects displayed on the map, plus any current position, are included into the map extents.  Before these extents are used to set the map's zoom level, they are passed to the OnExtents event handler which may modify the values.

The values are grid coordinates and are always in metres, and (if the map is empty) may contain double_Null when the event handler is called.  The Extend function takes care of all possibilities, and should be used in preference to changing the values directly.

Trimble recommends that the North and East values only be increased, and the South and West values only be decreased, otherwise other objects on the map may fall outside the map window.  Using the Extend() method will ensure this rule is obeyed.

Note: This paragraph may not correctly reflect the API with the new 3D map.
The map always rounds off the scale to i * 10j, where i and j are integers, except i may also be 1.5 or 2.5. This is the value displayed by the scale bar at the bottom left. The rounding may cause zooming out slightly more than is indicated by the extents.  For example, if the extents result in a scale of 1234.56m, this will be increased to 1500m by the map. If the map horizontal units were feet, then the zoom level would be 5000ft (1234.56m is 4050.4ft). The worst-case additional zoom factor that can occur is 1.5 (eg, from 1.01 to 1.5).

Public members

tsc_JobMapStateEventArgs& State;

The current state of the map is supplied here.  This reflects the state before the zoom is performed.

Inherited members

virtual void Extend (const tsc_Grid& coordinate) = 0;
Inherited from tsc_JobmapBounds. Extends the area to include the supplied point coordinate.  The coordinate's elevation is ignored.

void Clear ();
Inherited from tsc_JobmapBounds. Resets all values to double_Null, which is equivalent to an empty rectangle.  In this state, no panning or zooming will occur.

bool IsEmpty ();
Inherited from tsc_JobmapBounds. Tests for an empty rectangle (double_Null).

double* ExtentNorth;
double* ExtentEast;
double* ExtentSouth;
double* ExtentWest;
Inherited from tsc_JobmapBounds. These four pointers allow the currently computed extents to be accessed and/or modified.  These values will change when Extend() is called. Always ensure that *ExtentNorth is greater than *ExtentSouth, and that *ExtentWest is less than *ExtentEast.  Also, the difference between north and south and between east and west will be limited to >= 0.01m.