luisfdo
05-24-2005, 08:17 PM
ViewByHeightWidth[] myViews = new ViewByHeightWidth[1];
myViews[0] = new ViewByHeightWidth();
myViews[0].CenterPoint = new LatLong();
myViews[0].CenterPoint.Latitude = 40;
myViews[0].CenterPoint.Longitude = -120;
myViews[0].Height = 200;
myViews[0].Width = 300;
Pushpin[] myPushpins = new Pushpin[1];
myPushpins[0] = new Pushpin();
myPushpins[0].IconDataSource = "MapPoint.Icons";
myPushpins[0].IconName = "3";
myPushpins[0].LatLong = myViews[0].CenterPoint;
myPushpins[0].Label = "Center";
myPushpins[0].LabelNearbyRoads = true;
MapSpecification mapSpec = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Views = myViews;
mapSpec.Pushpins = myPushpins;
render = new RenderServiceSoap();
render.Credentials = new System.Net.NetworkCredential(User,Pass);
render.PreAuthenticate=true;
MapImage[] mapImages = render.GetMap(mapSpec);
Bitmap bMap = new Bitmap(new System.IO.MemoryStream(mapImages[0].MimeData.Bits) );
pictureMapPoint.Image=bMap;
I'm working in a Pocket Application and there is an exception in this line
Bitmap bMap = new Bitmap(new System.IO.MemoryStream(mapImages[0].MimeData.Bits) );
This same code works fine in a WindowsApplication, but not in the Pocket application tha I need.
Does anyone know why?? can you prove this method??
Please help me.. :cry:
thanks..
myViews[0] = new ViewByHeightWidth();
myViews[0].CenterPoint = new LatLong();
myViews[0].CenterPoint.Latitude = 40;
myViews[0].CenterPoint.Longitude = -120;
myViews[0].Height = 200;
myViews[0].Width = 300;
Pushpin[] myPushpins = new Pushpin[1];
myPushpins[0] = new Pushpin();
myPushpins[0].IconDataSource = "MapPoint.Icons";
myPushpins[0].IconName = "3";
myPushpins[0].LatLong = myViews[0].CenterPoint;
myPushpins[0].Label = "Center";
myPushpins[0].LabelNearbyRoads = true;
MapSpecification mapSpec = new MapSpecification();
mapSpec.DataSourceName = "MapPoint.NA";
mapSpec.Views = myViews;
mapSpec.Pushpins = myPushpins;
render = new RenderServiceSoap();
render.Credentials = new System.Net.NetworkCredential(User,Pass);
render.PreAuthenticate=true;
MapImage[] mapImages = render.GetMap(mapSpec);
Bitmap bMap = new Bitmap(new System.IO.MemoryStream(mapImages[0].MimeData.Bits) );
pictureMapPoint.Image=bMap;
I'm working in a Pocket Application and there is an exception in this line
Bitmap bMap = new Bitmap(new System.IO.MemoryStream(mapImages[0].MimeData.Bits) );
This same code works fine in a WindowsApplication, but not in the Pocket application tha I need.
Does anyone know why?? can you prove this method??
Please help me.. :cry:
thanks..