Share via


MimeData.MimeType Property

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

Public Dim MimeType As String
    Member of [Namespace].MimeData
[C#]
public System.String MimeType
    Member of [Namespace].MimeData

Remarks

MapPoint Web Service supports the following MIME types:

image/gif: 8-bit color in GIF 89a 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.

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

'Output the type and ID of the returned image
Console.WriteLine(mapImages(0).MimeData.ContentID)
Console.WriteLine(mapImages(0).MimeData.MimeType)

 
[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
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);

//Output the type and ID of the returned image
Console.WriteLine(mapImages[0].MimeData.ContentID);
Console.WriteLine(mapImages[0].MimeData.MimeType);

 

See Also

MimeData Class