Community of VE/MapPoint Users and Developers
This is a discussion on Virtual Earth Web Service - Retrieve Image within the MapPoint Web Service and Virtual Earth forums, part of the Map Forums category; Hello All, I'm attempting to use the new VEWS version 1.0 to retrieve a static image via the imagery service. ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Virtual Earth Web Service - Retrieve Image I'm attempting to use the new VEWS version 1.0 to retrieve a static image via the imagery service. I'm using VS 2008 / VB. On the .GetMapUri call, I get this error message back: "The argument value must be between 80 and 900. Parameter name: Options.ImageSize.Width Actual value was 0." I've attempted to pass the control's dimensions and also hard-coded the size values (both well within the stated limits) but regardless, it is returning this error message. My credentials are fine, as I can geocode for instance. However, I'm stuck on attempting to pull a static map back using the service. Any advice from anyone? (source code below)... Thanks in advance, -Greg Dim mapUriRequest AsNew VEWS_Staging_ImageryService.MapUriRequest 'Set credentials using a valid Virtual Earth Token mapUriRequest.Credentials = New VEWS_Staging_ImageryService.Credentials mapUriRequest.Credentials.Token = sToken 'Set the location of the requested image mapUriRequest.Center = New VEWS_Staging_ImageryService.Location mapUriRequest.Center.Latitude = AddressToDisplay.YCoord_Latitude mapUriRequest.Center.Longitude = AddressToDisplay.XCoord_Longitude 'Set the map style and zoom level Dim mapUriOptions AsNew VEWS_Staging_ImageryService.MapUriOptions mapUriOptions.Style = VEWS_Staging_ImageryService.MapStyle.AerialWithLab els mapUriOptions.ZoomLevel = 10 'Set the size of the requested image to match the size of the image control mapUriOptions.ImageSize = New VEWS_Staging_ImageryService.SizeOfint mapUriOptions.ImageSize.Width = 200 mapUriOptions.ImageSize.Height = 200 mapUriRequest.Options = mapUriOptions Dim imageryService = New VEWS_Staging_ImageryService.ImageryService 'Make the image request Dim mapUriResponse As VEWS_Staging_ImageryService.MapUriResponse mapUriResponse = imageryService.GetMapUri(mapUriRequest) PictureBox1.ImageLocation = mapUriResponse.Uri.ToString |
| |||
| Re: Virtual Earth Web Service - Retrieve Image
Greg, When I generated the VEWS proxy (C#) I noticed that there were 2 additional properties that I needed to set to get it working. mapUriOptions.ImageSize.HeightSpecified = true; mapUriOptions.ImageSize.WidthSpecified = true; Best Regards, Dave David Langley SpatialPoint, LLC. 1000 Executive Way Des Plaines, IL 60018 Virtual Earth | MapPoint | Locator Experts | SpatialPoint |
| |||
| Re: Virtual Earth Web Service - Retrieve Image
Thanks for the reply. That worked great and I'm very appreciative. I'm not certain why the MS code examples don't utilize this (yet still work), but regardless it's working as expected now. Thanks again. |
![]() |
| Tags |
| image, retrieve, service, virtual earth, web |
| ||||
| Posted By | For | Type | Date | |
| Technorati: Discussion about “Virtual Earth Web Service - Retrieve Image” | This thread | Refback | 11-03-2008 04:07 AM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 10-24-2008 10:39 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting a Map with the Virtual Earth Web Service | VirtualEarth MSDN Blog | Virtual Earth Blogs | 0 | 09-26-2008 07:22 PM |
| Lancement de Virtual Earth Web Service et du Virtual Earth Map Control 6.2 | Virtual Earth Europe | Virtual Earth Blogs | 0 | 09-25-2008 04:22 AM |
| Announcing The Virtual Earth Web Service and Virtual Earth Map Control 6.2 | VirtualEarth MSDN Blog | Virtual Earth Blogs | 0 | 09-25-2008 01:21 AM |
| Virtual Earth Image Updates in July 2008 | VE For Government | Virtual Earth Blogs | 0 | 07-23-2008 03:51 PM |
| January Virtual Earth Image Updates | VE For Government | Virtual Earth Blogs | 0 | 01-29-2008 02:41 PM |