Location.BestMapView Property

Location.BestMapView Property

Represents a collection of the best map views (a MapViewRepresentations object) for the location.


Public BestMapView As MapViewRepresentations


[C#]

public MapViewRepresentations BestMapView;

Remarks

  • For more information about map views, including the relationship between map image size and 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 ViewByHeightWidth
myViews(0) = foundResults.Results(0).FoundLocation.BestMapView.ByHeightWidth

Dim mapSpec As New MapSpecification()
mapSpec.DataSourceName = foundResults.Results(0).FoundLocation.DataSourceName
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 = foundResults.Results[0].FoundLocation.DataSourceName;
mapSpec.Views = myViews;

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


See Also

  Location Class   |   MapViewRepresentations Class   |   Working with Map Views