MapSpecification.Options Property
The map rendering options (MapOptions object), such as image format, panning and zooming factors, identification of the requested map as an overview map, route highlight colors, font size, and map style. Optional.
Public Dim Options As [Namespace].MapOptions
Member of [Namespace].MapSpecification
[C#]
public [Namespace].MapOptions Options
Member of [Namespace].MapSpecification
Remarks
- If the Options property is null, the default property values of the MapOptions object are used.
- 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 height and width
Dim myViews(0) As ViewByHeightWidth
myViews(0) = New ViewByHeightWidth()
myViews(0).CenterPoint = New LatLong()
myViews(0).CenterPoint.Latitude = 40
myViews(0).CenterPoint.Longitude = -120
myViews(0).Height = 200
myViews(0).Width = 300
Dim mapSpec As New MapSpecification()
mapSpec.DataSourceName = "MapPoint.NA"
mapSpec.Views = myViews
mapSpec.Options = New MapOptions()
mapSpec.Options.Style = MapStyle.Terrain
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 height and width
ViewByHeightWidth[] myViews = new ViewByHeightWidth[1];
myViews[0] = new ViewByHeightWidth();
myViews[0].CenterPoint = new LatLong();
myViews[0].CenterPoint.Latitude = 40;
myViews[0].CenterPoint.Longitude = -120;
myViews[0].Height = 200;
myViews[0].Width = 300;
MapSpecification mapSpec = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Views = myViews;
mapSpec.Options = new MapOptions();
mapSpec.Options.Style = MapStyle.Terrain;
MapImage[] mapImages;
mapImages = renderService.GetMap(mapSpec);
See Also
MapSpecification Class | MapOptions Class | MapImage.View Property