Share via


MapImage.MimeData Property

MapImage.MimeData Property

Contains the map image (MimeData object), which includes the image type, the MIME label, and the binary image.


Public MimeData As [Namespace].MimeData



[C#]

public MimeData MimeData;

Remarks

Example

[Visual Basic]

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

'Render the image in a PictureBox control
Dim PictureBox1 As New System.Windows.Forms.PictureBox()
PictureBox1.Image = New System.Drawing.Bitmap(New System.IO.MemoryStream(mapImages(0).MimeData.Bits))



[C#]

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

//Render the image in a pictureBox control
System.Windows.Forms.PictureBox pictureBox1 = new System.Windows.Forms.PictureBox();
pictureBox1.Image = new System.Drawing.Bitmap(new System.IO.MemoryStream(mapImages[0].MimeData.Bits));


See Also

  MapImage Class   |   MimeData Class   |   MapOptions.ReturnType Property   |   MapReturnType Enumeration