Share via


ViewByHeightWidth.Width Property

ViewByHeightWidth.Width Property

The distance, in distance units (DistanceUnit enumeration), for the width of the map view. Double.


Public Width As System.Double = 0



[C#]

public System.Double Width;

Remarks

  • The maximum Width property is 800,000 kilometers (497,096 miles).

  • If the Height property is set and the Width property is not, the view is a vertical line.

  • The minimum Width property value for rendering a map depends on the data source and the CenterPoint property. If the Width property sent is smaller than is valid for a particular location, MapPoint Web Service renders the map at the smallest possible width and returns the Width property used in the MapImage.View property. To return a map of the smallest possible width, set the Width property to .001.

  • For information about map views, including the relationship between map views and map image size, see Working with Map Views.

Example

[Visual Basic]

'Get a map using height and width
Dim myViews(0) As ViewByHeightWidth
myViews(0) = New ViewByHeightWidth()
myViews(0).CenterPoint = New LatLong()
myViews(0).CenterPoint.Latitude = 40
myViews(0).CenterPoint.Longitude = -120
myViews(0).Height = 200
myViews(0).Width = 300

Dim mapSpec As New MapSpecification()
mapSpec.DataSourceName = "MapPoint.NA"
mapSpec.Views = myViews

Dim mapImages() As MapImage
mapImages = renderService.GetMap(mapSpec)



[C#]

//Get a map using height and width
ViewByHeightWidth[] myViews = new ViewByHeightWidth[1];
myViews[0] = new ViewByHeightWidth();
myViews[0].CenterPoint = new LatLong();
myViews[0].CenterPoint.Latitude = 40;
myViews[0].CenterPoint.Longitude = -120;
myViews[0].Height = 200;
myViews[0].Width = 300;

MapSpecification mapSpec  = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Views = myViews;

MapImage[] mapImages;
mapImages = renderService.GetMap(mapSpec);


See Also

  ViewByHeightWidth Class   |   DistanceUnit Enumeration   |   ViewByHeightWidth.Height Property   |   ViewByHeightWidth.CenterPoint Property   |   MapImage.View Property