tsc_JobMapStateEventArgs

Note: This documentation may not correctly reflect the API with the new 3D map.

This class contains a number of methods to obtain information about the current state of the map.

Most tsc_JobMap event handlers will be passed a tsc_JobMapStateEventArgs instance, or some other *eventArgs class that contains a tsc_JobMapStateEventArgs.  This allows most event handlers to obtain the current map state.

Public methods

tsc_Size GetMapViewableSize ();
Returns the width and height of the visible part of the map window.  This will usually be slightly smaller than the window size, due to elements on the right such as the status panel or the map window "shrink" button.  The origin is always zero.

tsc_Size GetMapWindowSize ();
Returns the width and height of the entire map window.  The image created by tsc_JobMap::CreateCompatibleImage() is this size also.

tsc_Grid GetMapWindowOrigin ();
Returns the lowest grid coordinate visible on the map.  This is the smallest easting and smallest northing values, regardless of where on the image this coordinate maps to.  In a North-East grid coordinate system (the most common), this equates to the bottom-left corner of the visible area.  In other grid systems, such as North-West, this coordinate will map to a different corner.

tsc_Grid GetMapWindowOpposite ();
Returns the grid coordinate that is opposite to that returned by GetMapWindowOrigin().  This will equate to the highest grid coodinates that are currently visible.

tsc_JobMapPoint GridToPoint (tsc_Grid position);
Converts a grid coordinate to a window pixel coordinate.  The returned point may be outside the window, possibly by a very large amount; the values are limited to the range [MinInt, MaxInt]. The grid elevation is ignored. To avoid problems with points outside the window and therefore not valid for the tsc_Image being used to draw the map layer, you should be aware of the following:

tsc_Grid PointToGrid (tsc_JobMapPoint point);
Converts a map window pixel coordinate to a grid position.  The grid's elevation value will be double_Null.

tsc_Grid PointToGrid (int xPixel, int yPixel);
Converts a map window X and Y pixel position to a grid position.  The grid's elevation value will be double_Null.

bool IsViewable (tsc_JobMapPoint point);
Returns true if pixel at the supplied point is on the viewable part of the map window.  This is unaffected by z-order (that is, if another window covers the map or the application is minmized, it can still return true).

bool IsViewable (tsc_Grid position);
Returns true if the supplied grid coordinate is on the viewable part of the map window.  This is unaffected by z-order (that is, if another window covers the map or the application is minmized, it can still return true).

tsc_MarqueeMode GetMarqueeMode ();
Returns the current state of the marquee.  See tsc_MarqueeMode for more information. Deprecated.

tsc_Grid GetMarqueeLower ();
Returns the lower coordinate of the marquee rectangle.  That is, the grid position with the smallest North and East values. Deprecated.

tsc_Grid GetMarqueeUpper ();
Returns the upper coordinate of the marquee rectangle.  That is, the grid position with the largest North and East values. Deprecated.

tsc_DisplaySymbolsMode DisplaySymbolsMode();
Returns how points are displayed, using one of these enum values:
enum tsc_DisplaySymbolsMode

{

    tsc_Dots = 0,         ///< Point symbols are all drawn as dots

    tsc_MethodSymbols,    ///< Point symbols are drawn accordinate to the points survey method

    tsc_FeatureSymbols    ///< Point symbols are drawn using the loaded feature code library symbols

};