Max extents and zoom

Functions

Extents AxMap.GetKnownExtents (tkKnownExtents extents)
 Gets known extents. More...
 
virtual bool AxMap.SetGeographicExtents (Extents pVal)
 Sets geographic extents in decimal degrees for the map. More...
 
bool AxMap.SetGeographicExtents2 (double xLongitude, double yLatitude, double widthKilometers)
 Sets geographic extents for the map. More...
 
void AxMap.SetLatitudeLongitude (double latitude, double longitude)
 Sets the Latitude and Longitude of the center of the screen in one operation More...
 

Properties

double AxMap.CurrentScale [get, set]
 Gets or sets the current map scale. More...
 
int AxMap.CurrentZoom [get, set]
 Gets or sets the current zoom level for the map. It corresponds to the zoom level of current tile provider. More...
 
int AxMap.ExtentHistory [get, set]
 Gets or sets the number of extents to cache in the extents history More...
 
double AxMap.ExtentPad [get, set]
 Gets or sets the percentage of the view used to pad the extents of a layer when zooming to a layer or maximum extents. More...
 
Extents AxMap.Extents [get, set]
 Gets or sets the extents of the map using an Extents object. More...
 
Extents AxMap.GeographicExtents [get]
 Gets geographic extents of the map in decimal degrees. More...
 
tkKnownExtents AxMap.KnownExtents [get, set]
 Gets or sets known extents for the map. More...
 
float AxMap.Latitude [get, set]
 Gets or sets latitude of the center of screen (in decimal degrees). More...
 
float AxMap.Longitude [get, set]
 Gets or sets longitude of the center of screen (in decimal degrees). More...
 
Extents AxMap.MaxExtents [get, set]
 Gets or sets the extents of the map displayed by the control. More...
 

Detailed Description

Here is list of properties and methods that affect map extents and zoom level. This module is a part of the documentation of AxMap class.

dot_inline_dotgraph_24.png

Graph description

Function Documentation

◆ GetKnownExtents()

Extents AxMap.GetKnownExtents ( tkKnownExtents  extents)

Gets known extents.

Parameters
extentsKnown extents to retrieve.
Returns
Extents object.
New API 4.9.1:
Added in version 4.9.1

◆ SetGeographicExtents()

virtual bool AxMap.SetGeographicExtents ( Extents  pVal)
virtual

Sets geographic extents in decimal degrees for the map.

Parameters
pValGeographic extents in decimal degrees.
Returns
True on success.

For operation to succeed, projection must be set for the map (see AxMap.GeoProjection property)

New API 4.9.0:
Added in version 4.9.0

◆ SetGeographicExtents2()

bool AxMap.SetGeographicExtents2 ( double  xLongitude,
double  yLatitude,
double  widthKilometers 
)

Sets geographic extents for the map.

Parameters
xLongitudeLongitude of center of the screen (degrees).
yLatitudeLatitude of center of the screen (degrees).
widthKilometersWidth of displayed extents in kilometres.

Projection for the must be specified in order for this method to work.

Returns
True on success.
New API 4.9.1:
Added in version 4.9.1

◆ SetLatitudeLongitude()

void AxMap.SetLatitudeLongitude ( double  latitude,
double  longitude 
)

Sets the Latitude and Longitude of the center of the screen in one operation

Parameters
latitudeRequested Latitude in decimal degrees
longitudeRequested Longitude in decimal degrees

Map projection must be set in order for this method to work.

New API 5.1:
Added in version 5.1.0

Properties

◆ CurrentScale

double AxMap.CurrentScale
getset

Gets or sets the current map scale.

The scale depends on the AxMap.MapUnits property. Number of pixels per logical inch and the size of window are used to determine the size of the displaying device. The calculations represent the closest approximation as there is no way to determine the physical size of displaying device. The operation of setting the new scale preserve the map coordinates of the center point on the screen.

New API 4.8:
Added in version 4.8
Examples
EditAttributes.cs, RemoveShape.cs, SelectBox.cs, ToolTip.cs, Tracking.cs, and ZoomToValues.cs.

◆ CurrentZoom

int AxMap.CurrentZoom
getset

Gets or sets the current zoom level for the map. It corresponds to the zoom level of current tile provider.

Map projection must be set in order for this property to work.

New API 4.9.1:
Added in version 4.9.1

◆ ExtentHistory

int AxMap.ExtentHistory
getset

Gets or sets the number of extents to cache in the extents history

◆ ExtentPad

double AxMap.ExtentPad
getset

Gets or sets the percentage of the view used to pad the extents of a layer when zooming to a layer or maximum extents.

Padding makes it so that there is a small border around the layer when you zoom to it.

◆ Extents

Extents AxMap.Extents
getset

Gets or sets the extents of the map using an Extents object.

If the given extents do not fit the aspect ratio of the map, the map will fit the given extents as well as possible.

New API 4.9.5:
Return value changed to IExtents in version 4.9.5
Examples
EditAttributes.cs, ShapefileToDrawingLayer.cs, TrackCars.cs, and Tracking.cs.

◆ GeographicExtents

Extents AxMap.GeographicExtents
get

Gets geographic extents of the map in decimal degrees.

For operation to succeed, projection must be set for the map (see AxMap.GeoProjection property). Otherwise null will be returned.

New API 4.9.0:
Added in version 4.9.0

◆ KnownExtents

tkKnownExtents AxMap.KnownExtents
getset

Gets or sets known extents for the map.

Map projection must be set in order for this property to work.

New API 4.9.1:
Added in version 4.9.1

◆ Latitude

float AxMap.Latitude
getset

Gets or sets latitude of the center of screen (in decimal degrees).

Map projection must be set in order for this property to work.

New API 4.9.1:
Added in version 4.9.1

◆ Longitude

float AxMap.Longitude
getset

Gets or sets longitude of the center of screen (in decimal degrees).

Map projection must be set in order for this property to work.

New API 4.9.1:
Added in version 4.9.1

◆ MaxExtents

Extents AxMap.MaxExtents
getset

Gets or sets the extents of the map displayed by the control.

Examples
Segmentation.cs.