Share via


MapViewRepresentations.ByHeightWidth Property

MapViewRepresentations.ByHeightWidth Property

The map view as a ViewByHeightWidth object. The ViewByHeightWidth object represents the geographic extent of the MapViewRepresentations object, expressed by the height and width in distance units (DistanceUnit enumeration) and latitude and longitude coordinates that represent the center point.


Public ByHeightWidth As ViewByHeightWidth


[C#]

public ViewByHeightWidth ByHeightWidth;

Remarks

Example

[Visual Basic]

'Use the best map view to get a map of the found location
Dim findSpec As New FindSpecification()
findSpec.DataSourceName = "MapPoint.NA"
findSpec.InputPlace = "Seattle, WA"

Dim foundResults As FindResults
foundResults = findService.Find(findSpec)

Dim myViews(0) As ViewByHeightWidth
myViews(0) = foundResults.Results(0).FoundLocation.BestMapView.ByHeightWidth

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

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



[C#]

//Use the best map view to get a map of the found location
FindSpecification findSpec  = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = "Seattle, WA";

FindResults foundResults = findService.Find(findSpec);

ViewByHeightWidth[] myViews = new ViewByHeightWidth[1];
myViews[0] = foundResults.Results[0].FoundLocation.BestMapView.ByHeightWidth;

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

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


See Also

  MapViewRepresentations Class   |   ViewByHeightWidth Class   |   DistanceUnit Enumeration   |   Working with Map Views