ImageFormat.MimeType Property
The Multipurpose Internet Mail Extensions (MIME) type of the map image. String.
Public Dim MimeType As String
Member of [Namespace].ImageFormat
[C#]
public System.String MimeType
Member of [Namespace].ImageFormat
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.
.gif)
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.
.gif)
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
'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#]
//This example assumes that the service instance
//'renderService' has already been created and that
//the MapPoint Web Service namespace has been imported
//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