We have some problems with Yahoo Maps overlay implementation. To process further we plan to find resolution or workaround.
The similar code does not work on Silverlight. It returns null stream in client_OpenReadCompleted argument.
string
bitmapRequestUrl =
"http://local.yahooapis.com/MapsService/V1/mapImage?appid=YD-4g6HBf0_JX0yq2IsdnV1Ne9JTpKxQ3Miew--&latitude=40.8470603560712&longitude=-74.267578125&image_type=png&image_height=256&image_width=256&zoom=12&output=xml";
WebClient client = new WebClient();
client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted);
client.OpenReadAsync(new Uri(bitmapRequestUrl, UriKind.Absolute));
http://local.yahooapis.com/crossdomain.xml file exists and its allow-access-from domain="*"
The similar WinForms .Net 3.5 code works correctly:
WebClient client = new WebClient();
Stream
data =
client.OpenRead("http://local.yahooapis.com/MapsService/V1/mapImage?appid=YD-4g6HBf0_JX0yq2IsdnV1Ne9JTpKxQ3Miew--&latitude=40.8470603560712&longitude=-74.267578125&image_type=png&image_height=256&image_width=256&zoom=12&output=xml");
StreamReader reader = new StreamReader(data);
string s = reader.ReadToEnd();
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5