MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MegaPoints VS.NET Sample Project

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
MegaPoints VS.NET Sample Project

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
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 09-20-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
I can't seem to get the map to draw

Were you able to at least get the map to draw the pushpins? I save the map and all it has is the map by it self.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
megapoints, project, sample, vsnet


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 08:24 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55