Share via


MapReturnType Enumeration

MapReturnType Enumeration

The possible ways to return a map image from the RenderServiceSoap.GetMap method.

Public Enum MapReturnType Inherits System.Enum

[C#]
public enum MapReturnType : System.Enum

Members

The following table lists the values for the MapReturnType enumeration.

Name Description
ReturnImage

Image is returned in the MapImage.MimeData property.

ReturnUrl

Image is returned as a standard Uniform Resource Locator (URL) in theMapImage.Url property.

ReturnSecureUrl

Image is returned as a secure Uniform Resource Locator (URL) in theMapImage.Url property.

Remarks

Example

[Visual Basic]

'Return a URL to the map instead of the whole image
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.ReturnType = MapReturnType.ReturnUrl

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

Image1.ImageUrl = mapImages(0).Url



[C#]

//Return a URL to the map instead of the whole image
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.ReturnType = MapReturnType.ReturnUrl;

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

Image1.ImageUrl = mapImages[0].Url;



See Also

  RenderServiceSoap.GetMap Method   |   MapImage.MimeData Property   |   MapImage.Url Property   |   MapOptions.ReturnType Property