Share via


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 Dim Views As [Namespace].MapView()
    Member of [Namespace].MapSpecification
[C#]
public [Namespace].MapView[] Views
    Member of [Namespace].MapSpecification

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.
  • MapPoint Web Service constrains the map view in terms of how far the map is zoomed out or zoomed in. The constraints vary per data source and map style. If the Views or Options properties are set such that these limits would be exceeded, the returned map image is modified to meet the limit, and the MapImage.View property contains the returned view.

Example

 
[Visual Basic] 
'This example assumes that the service instance 
''renderService' has already been created and that 
'the MapPoint Web Service namespace has been imported 

'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#]
//This example assumes that the service instance 
//'renderService' has already been created and that 
//the MapPoint Web Service namespace has been imported 

//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