Share via


MapSpecification.Views Property

MapSpecification.Views Property

An array of map views (MapView[] objects) to render. One map image is returned for each map view. Valid array range is 0 through 50.


Public Views As MapView()



[C#]

public MapView[] Views;

Remarks

  • The Views property is required if the Route property is null. If both the Views and Route properties are null, a SOAP fault is returned.

Example

[Visual Basic]

'Get a map using scale
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

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



[C#]

//Get a map using scale
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;

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


See Also

  MapSpecification Class   |   MapView Class   |   MapSpecification.Route Property   |   MapImage.View Property