MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Virtual Earth Web Service - Retrieve Image

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


Go Back   MapPoint Forums > Map Forums > MapPoint Web Service and Virtual Earth

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



Click here to register

Reply

 

LinkBack (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 10-22-2008
Junior Member
White Belt
 
Join Date: Oct 2008
Posts: 2
Virtual Earth Web Service - Retrieve Image

Hello All,

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
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 10-24-2008
Junior Member
White Belt
 
Join Date: Jun 2005
Posts: 3
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 10-24-2008
Junior Member
White Belt
 
Join Date: Oct 2008
Posts: 2
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.
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
image, retrieve, service, virtual earth, web


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/virtual-earth-web-service-retrieve-image-8956.html

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

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 02:04 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, 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