MapViewRepresentations.ByBoundingRectangle Property
MapViewRepresentations.ByBoundingRectangle Property
The map view as a minimum bounding rectangle (ViewByBoundingRectangle object). A minimum bounding rectangle represents the geographic extent of the MapViewRepresentations object, expressed in latitude and longitude coordinates that represent the southwest and northeast corners.
Public ByBoundingRectangle As ViewByBoundingRectangle
[C#]
public ViewByBoundingRectangle ByBoundingRectangle;
Remarks
The shape defined by the ViewByBoundingRectangle object is not a true rectangle on the sphere of the Earth. The shape is actually rounded and three dimensional, and MapPoint Web Service interprets it as such.
For information about map views, see Working with Map Views.
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 ViewByBoundingRectangle
myViews(0) = foundResults.Results(0).FoundLocation.BestMapView.ByBoundingRectangle
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);
ViewByBoundingRectangle[] myViews = new ViewByBoundingRectangle[1];
myViews[0] = foundResults.Results[0].FoundLocation.BestMapView.ByBoundingRectangle;
MapSpecification mapSpec = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Views = myViews;
MapImage[] mapImages;
mapImages = renderService.GetMap(mapSpec);
See Also
MapViewRepresentations Class | ViewByBoundingRectangle Class | Working with Map Views