Community of VE/MapPoint Users and Developers
This is a discussion on MegaPoints VS.NET Sample Project within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Here's some VB.NET code taken straight from the "MegaPoints" client point-drawing example found at http://demo.mappoint.net/: ====================== Dim newBitmap As Bitmap ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| MegaPoints VS.NET Sample Project ====================== Dim newBitmap As Bitmap newBitmap = New Bitmap(ClientSize.Width, ClientSize.Height) Dim graphics As Graphics graphics = graphics.FromImage(newBitmap) Dim mapBitmap As Bitmap mapBitmap = New Bitmap(New MemoryStream(mapImages(0).MimeData.Bits)) graphics.DrawImage(mapBitmap, 0, 0) DrawPushpins(graphics, POIPins) PictureBox.Image = newBitmap ====================== This works just fine...for this Windows Forms project. I'm working with the MapPoint Web Services SDK, though, and I'd like to do client-drawing and render it to my <img> object on my ASP.NET web page. Any idea how I can do that? In that "MegaPoints" example, they end up with a System.Drawing.Bitmap object. I have yet to find a way, however, to convert this to the byte array that my <img> object consumes via the MapImage.MimeData.Bits property: ====================== With Me.Response Call .Cache.SetCacheability(HttpCacheability.NoCache) Dim oMapImage As MapPointService.MapImage Try oMapImage = CType(Me.Session.Item("Map." & msPageID & ".MapImage"), MapPointService.MapImage) Catch oMapImage = Nothing End Try If (oMapImage Is Nothing OrElse oMapImage.MimeData Is Nothing) Then .StatusCode = 404 Else Call .Clear() .ContentType = oMapImage.MimeData.MimeType Call .BinaryWrite(oMapImage.MimeData.Bits) Call .End() End If End With ====================== Thanks for any help on this. I'm striking out on Experts Exchange's .NET area with this question. |
![]() |
| Tags |
| megapoints, project, sample, vsnet |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Final Year Project | Anonymous | MapPoint Web Service and Virtual Earth | 3 | 2 Weeks Ago 09:44 AM |
| 2006 VBA Project References in Excel | onegalacticwino | MapPoint 2006/2009 Discussion | 3 | 05-20-2006 10:45 PM |
| Microsoft Dynamics CRM, GP, NAV, AX: Project Green | Andrew Karasev | News and Announcements | 0 | 10-05-2005 07:08 PM |
| Presently we are working on a project in which we .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 02-25-2002 02:50 AM |
| Can I take information from Microft Project and in.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 06-29-2001 10:13 AM |