Share via


ImageFormat.MimeType Property

ImageFormat.MimeType Property

The Multipurpose Internet Mail Extensions (MIME) type of the map image.


Public MimeType As System.String


[C#]

public System.String MimeType;

Remarks

MapPoint Web Service supports the following MIME types:

  • image/gif: 8-bit color in GIF 89a format.

  • image/jpeg: 8-bit color in JPEG format.

  • image/png: 8-bit color in PNG (Portable Network Graphics) format.

  • image/vnd.wap.wbmp or image/vnd.wap.wbmp;level=0: 1-bit black/white in WBMP (Wireless BitMap) format. This MIME format is only valid with maps rendered in PhoneBW Map Style.

Note If your maps include polygons, you should not use the image/gif MIME type. The image/jpeg and image/png MIME types provide better quality images for polygons.

Example

[Visual Basic]

'Return the image as a GIF
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
mapSpec.Options = New MapOptions()
mapSpec.Options.Format = New ImageFormat()
mapSpec.Options.Format.MimeType = "image/gif"

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



[C#]

//Return the image as a GIF
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;
mapSpec.Options = new MapOptions();
mapSpec.Options.Format = new ImageFormat();
mapSpec.Options.Format.MimeType = "image/gif";

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


See Also

  ImageFormat Class