MimeData.Bits Property
MimeData.Bits Property
The binary map image.
Public Bits As System.Byte()
[C#]
public System.Byte[] Bits;
Remarks
- For information on using the Bits property on a Web page, see Using MapPoint Web Service in a Web Application.
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
MimeData Class | Using MapPoint Web Service in a Web Application