Represents a rectangle on the map. More...
Public Member Functions | |
| void | GetBounds (out double xMin, out double yMin, out double zMin, out double xMax, out double yMax, out double zMax) |
| Gets the bounds of the extents object. | |
| void | GetMeasureBounds (out double mMin, out double mMax) |
| Gets the minimum and maximum measure bounds for the extents object. | |
| void | SetBounds (double xMin, double yMin, double zMin, double xMax, double yMax, double zMax) |
| Sets the bounds for the extents object. | |
| void | SetMeasureBounds (double mMin, double mMax) |
| Sets the measure bounds of the extents object. | |
Properties | |
| double | mMax [get] |
| The maximum measure bound in the exents object. Measure bounds only apply to shapefiles containing measure data. | |
| double | mMin [get] |
| Gets the minimum measure bound for the extents object. Measure bounds only apply to shapefiles containing measure data. | |
| double | xMax [get] |
| The maximum x bound for the extents object. | |
| double | xMin [get] |
| Gets the minimum x bound for the extents object. | |
| double | yMax [get] |
| The maximum y bound for the extents object. | |
| double | yMin [get] |
| Gets the minimum y bound for the extents object. | |
| double | zMax [get] |
| The maximum z bound for the extents object. | |
| double | zMin [get] |
| Gets the minimum z bound for the extents object. | |
Represents a rectangle on the map.
In some cases additional Z and M dimensions can also be specified to denote the altitude of the displayed data for example.
Let's see how to display certain extents on the map.
double y = 48.7; // latitude, deg. double x = 2.3; // longitude, deg. double span = 0.1; // deg. // extents from 48.5 to 48.9 degrees of north latitude and // from 2.1 to 2.5 degrees of east longitude will be set Extents ext = new Extents(); ext.SetBounds(x - span, y - span, 0.0, x + span, y + span, 0.0); // show them on the map AxMap axMap; if (axMap.MapUnits == tkUnitsOfMeasure.umDecimalDegrees){ axMap.Extents = ext; }
MapWinGIS doesn't hold instances of Extents class for layers or map, but generates them on each client call. Therefore it's useless to try to change those extents in the way like this:
The following line is needed:
axMap.Extents = ext;
In case of data layers, like shapefiles or images, the extents are obtained by calculation, so the only way to alter them is to change the underlying data.
| void Extents.GetBounds | ( | out double | xMin, |
| out double | yMin, | ||
| out double | zMin, | ||
| out double | xMax, | ||
| out double | yMax, | ||
| out double | zMax | ||
| ) |
Gets the bounds of the extents object.
| xMin | Returns the minimum x value for the extents object. |
| yMin | Returns the minimum y value for the extents object. |
| zMin | Returns the minimum z value for the extents object. |
| xMax | Returns the maximum x value for the extents object. |
| yMax | Returns the maximum y value for the extents object. |
| zMax | Returns the maximum z value for the extents object. |
| void Extents.GetMeasureBounds | ( | out double | mMin, |
| out double | mMax | ||
| ) |
Gets the minimum and maximum measure bounds for the extents object.
Measure bounds only apply to shapefiles containing measure data.
| mMin | |
| mMax |
| void Extents.SetBounds | ( | double | xMin, |
| double | yMin, | ||
| double | zMin, | ||
| double | xMax, | ||
| double | yMax, | ||
| double | zMax | ||
| ) |
Sets the bounds for the extents object.
| xMin | The new minimum x value for the bounds of the extents object. |
| yMin | The new minimum y value for the bounds of the extents object. |
| zMin | The new minimum z value for the bounds of the extents object. |
| xMax | The new maximum x value for the bounds of the extents object. |
| yMax | The new maximum y value for the bounds of the extents object. |
| zMax | The new maximum z value for the bounds of the extents object. |
| void Extents.SetMeasureBounds | ( | double | mMin, |
| double | mMax | ||
| ) |
Sets the measure bounds of the extents object.
Measure bounds only apply to shapefiles containing measure data.
| mMin | The new minimum measure bound for the extents object. |
| mMax | The new maximum measure bound for the extents object. |
double Extents.mMax [get] |
The maximum measure bound in the exents object. Measure bounds only apply to shapefiles containing measure data.
double Extents.mMin [get] |
Gets the minimum measure bound for the extents object. Measure bounds only apply to shapefiles containing measure data.
double Extents.xMax [get] |
The maximum x bound for the extents object.
double Extents.xMin [get] |
Gets the minimum x bound for the extents object.
double Extents.yMax [get] |
The maximum y bound for the extents object.
double Extents.yMin [get] |
Gets the minimum y bound for the extents object.
double Extents.zMax [get] |
The maximum z bound for the extents object.
double Extents.zMin [get] |
Gets the minimum z bound for the extents object.
1.7.6.1