Region property (MappointControl)

Returns the map region of the open map. MapPoint North America has a North American map, and MapPoint Europe has a European map. Read-only GeoMapRegion.

GeoMapRegion Value Description Version
geoMapEurope
2
European map MapPoint Europe
geoMapNorthAmerica
1
North American map MapPoint North America

Applies to

Objects:  MappointControl

Syntax

object.Region

Parameters

Part Description
object Required. An expression that returns a MappointControl object.

Remarks

The Region property may change when a new map is created or an existing map is opened because maps of both GeoMapRegions are accessible through the MapPoint Control as long as both versions of MapPoint are installed.

To open a map in the Control, use the NewMap method to open a map based on a template or the OpenMap method to open an existing .ptm file.

Example

  [Microsoft Visual Basic 6.0]
'Assume the MappointControl on your form is named "MPC"
Sub cmdGetMapRegion_Click()
  'Find the Region   If MPC.Region = geoMapNorthAmerica Then     MsgBox "Current region is North America"   Else     MsgBox "Current region is Europe"   End If
End Sub
[C#]
//Assume the MappointControl on your form is named "MPC" private void GetMapRegion_Click(object sender, System.EventArgs e) { //find the region if (MPC.ActiveMap.Application.Region == GeoMapRegion.geoMapNorthAmerica) { MessageBox.Show("Current region is North America"); } else { MessageBox.Show("Current region is Europe"); } }