Click here to Skip to main content
11,804,008 members (76,472 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# WPF Google-Maps
Hi ,
Im writing a WPF app to display the map from google maps api.
I was successfuly able to get info from google weather but google maps im not able to display.I dono what is exact reason.

Below is the snippet.

string url = @",CA&zoom=14&size=400x400&sensor=false";
           WebRequest webrequest = WebRequest.Create(url);
           WebProxy proxy = new WebProxy(addressVar);//, 8080);
           proxy.Credentials = CredentialCache.DefaultCredentials;
           webrequest.Proxy = proxy;
           //XmlTextReader reader = new XmlTextReader(webrequest.GetResponse().GetResponseStream());
           BitmapImage bitmap1 = new BitmapImage();
           bitmap1.UriSource = new Uri(url);
           imageMap.Source = bitmap1;
Posted 2-Aug-12 21:42pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

To complement Kenneth's answer, here's how you'd do it in C#;
string url = @",CA&zoom=14&size=400x400&sensor=false";
BitmapImage bmpImage = new BitmapImage();
bmpImage.UriSource = new Uri(mapURL);
MapImage.Source = bmpImage; 
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is an article that pulls google pictures from the web to display it in a WPF program, the source is written in but there sould be many hints on how to do it here:
WPF Map App: WPF Meets Google Geocoding and Static Maps APIs[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 3,140
1 Maciej Los 1,910
2 KrunalRohit 1,907
3 CPallini 1,845
4 Richard MacCutchan 1,187

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 6 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100