How I can display a mapRepresentations in a desktop application (developed by Visual studio 2008 VB)? Thanks. Antonio
You would have to write your own map control. Basically you load image from MapPont Web Services as a picture and display that picture in your Windows Forms or WPF application. "Antonio" wrote in message news:453A2A42-6449-4AF8-85F2-761F70989D23@microsoft.com... > How I can display a mapRepresentations in a desktop application > (developed > by Visual studio 2008 VB)? > > Thanks. > > Antonio
> Basically you load image from MapPont Web Services as a picture and display > that picture in your Windows Forms or WPF application. Can you give me an example of code to load image from MapPont Web Services as a picture? Thanks. Antonio.
Antonio, I'd recommend you install the MWS 4.5 SDK at: http://www.microsoft.com/downloads/details.aspx?FamilyId=CB5148A9-F09E-4EC8-992F-16478C0B5D9A&displaylang=en By default after running the .msi, you'll find the ImageMap samples installed at: C:\Program Files\Microsoft MapPoint Web Service SDK, Version 4.5\Samples\.NET 2.0\ImageMap Hope that helps, -- Infusion Development http://www.infusion.com "Antonio" wrote: > > Basically you load image from MapPont Web Services as a picture and display > > that picture in your Windows Forms or WPF application. > Can you give me an example of code to load image from MapPont Web Services > as a picture? > > Thanks. > > Antonio.
> By default after running the .msi, you'll find the ImageMap samples > installed at: > C:\Program Files\Microsoft MapPoint Web Service SDK, Version > 4.5\Samples\.NET 2.0\ImageMap sorry I'm a Newbie. I have this code: 'Get the best view of two locations Dim myLocations(1) As net.mappoint.staging.Location myLocations(0) = New net.mappoint.staging.Location() myLocations(1) = New net.mappoint.staging.Location() myLocations(0).LatLong = New net.mappoint.staging.LatLong() myLocations(1).LatLong = New net.mappoint.staging.LatLong() myLocations(0).LatLong.Latitude = txtLat1.Text myLocations(0).LatLong.Longitude = txtLong1.Text myLocations(1).LatLong.Latitude = txtLat2.Text myLocations(1).LatLong.Longitude = txtLong2.Text Dim renderService As New net.mappoint.staging.RenderServiceSoap() renderService.Credentials = New System.Net.NetworkCredential("xxxx", "xxx") renderService.PreAuthenticate = True Dim mapRepresentations As net.mappoint.staging.MapViewRepresentations mapRepresentations = renderService.GetBestMapView(myLocations, "MapPoint.EU") How I can display the map on my desktop application? Thanks. Antonio.
After GetBestMapView you need to make a call to actually load image from web service by calling GetMap on renderService. _images = _render.GetMap(...) If _images.Length > 0 Then With _images(0).MimeData My.Computer.FileSystem.WriteAllBytes(.ContentID, .Bits, False) End With End If How to display an image in GUI is out of topic here. "Antonio" wrote in message news:783C2D2A-C8FF-47C8-8CCF-B3E1665A9648@microsoft.com... >> By default after running the .msi, you'll find the ImageMap samples >> installed at: >> C:\Program Files\Microsoft MapPoint Web Service SDK, Version >> 4.5\Samples\.NET 2.0\ImageMap > > sorry I'm a Newbie. > I have this code: > > 'Get the best view of two locations > Dim myLocations(1) As net.mappoint.staging.Location > myLocations(0) = New net.mappoint.staging.Location() > myLocations(1) = New net.mappoint.staging.Location() > myLocations(0).LatLong = New net.mappoint.staging.LatLong() > myLocations(1).LatLong = New net.mappoint.staging.LatLong() > myLocations(0).LatLong.Latitude = txtLat1.Text > myLocations(0).LatLong.Longitude = txtLong1.Text > myLocations(1).LatLong.Latitude = txtLat2.Text > myLocations(1).LatLong.Longitude = txtLong2.Text > > Dim renderService As New net.mappoint.staging.RenderServiceSoap() > renderService.Credentials = New > System.Net.NetworkCredential("xxxx", > "xxx") > renderService.PreAuthenticate = True > > > Dim mapRepresentations As > net.mappoint.staging.MapViewRepresentations > mapRepresentations = renderService.GetBestMapView(myLocations, > "MapPoint.EU") > > How I can display the map on my desktop application? > > Thanks. > > Antonio. >
> After GetBestMapView you need to make a call to actually load image from web > service > by calling GetMap on renderService. > > _images = _render.GetMap(...) What type should I declare _images? What parameters I must pass to _render.GetMap? > How to display an image in GUI is out of topic here. OK. Thanks. Antonio.