ImageFormat.Height Property
The height of the map image in pixels. Integer. Valid range is 32 through 2,000 pixels. Default is 240 pixels. A fault is returned with an invalid Height call.
Public Dim Height As Integer = 240
Member of [Namespace].ImageFormat
[C#]
public System.Int32 Height
Member of [Namespace].ImageFormat
Remarks
- If the MapOptions.IsOverviewMap property is set to True, the valid range for the Height property is 32 through 180 pixels.
- The Height property should be set to the height of the map control on your Windows Form or Web Form; otherwise, the displayed image is skewed.
- For information about the relationship between map image size and map views, see Working with Map Views.
Example
[Visual Basic]
'This example assumes that the service instance
''renderService' has already been created and that
'the MapPoint Web Service namespace has been imported
'Return a very large image
Dim myViews(0) As ViewByScale
myViews(0) = New ViewByScale()
myViews(0).CenterPoint = New LatLong()
myViews(0).CenterPoint.Latitude = 40
myViews(0).CenterPoint.Longitude = -120
myViews(0).MapScale = 5000
Dim mapSpec As New MapSpecification()
mapSpec.DataSourceName = "MapPoint.NA"
mapSpec.Views = myViews
mapSpec.Options = New MapOptions()
mapSpec.Options.Format = New ImageFormat()
mapSpec.Options.Format.Height = 800
mapSpec.Options.Format.Width = 800
Dim mapImages() As MapImage
mapImages = renderService.GetMap(mapSpec)
[C#]
//This example assumes that the service instance
//'renderService' has already been created and that
//the MapPoint Web Service namespace has been imported
//Return a very large image
ViewByScale[] myViews = new ViewByScale[1];
myViews[0] = new ViewByScale();
myViews[0].CenterPoint = new LatLong();
myViews[0].CenterPoint.Latitude = 40;
myViews[0].CenterPoint.Longitude = -120;
myViews[0].MapScale = 5000;
MapSpecification mapSpec = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Views = myViews;
mapSpec.Options = new MapOptions();
mapSpec.Options.Format = new ImageFormat();
mapSpec.Options.Format.Height = 800;
mapSpec.Options.Format.Width = 800;
MapImage[] mapImages;
mapImages = renderService.GetMap(mapSpec);
See Also
ImageFormat Class | MapOptions.IsOverviewMap Property | Working with Map Views