Click here to Skip to main content
16,021,288 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Hope someone will be able to help me with this.. I want
to link google maps to a form . To be more specific I have a
picture box , so when the address is typed
into the textbox the maps should display
in the picture box and only the maps not the
complete google maps webpage.

Please any help would be appriciated

Thanks
Posted

1 solution

how about



C#
string mygoogURL = "http://maps.googleapis.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&sensor=false";
string myfilename = "c:\\mymap.png";

new System.Net.WebClient().DownloadFile(mygoogURL,myfilename);
pictureBox1.Image = new Bitmap(myfilename);


take a look at the link below for more map options

http://code.google.com/apis/maps/documentation/staticmaps/index.html#StyledMaps[^]
 
Share this answer
 
Comments
Ben Paxton 14-Jul-11 12:00pm    
Thanks alot
RaviRanjanKr 14-Jul-11 15:43pm    
Nice Answer, My 5+
Salmen Essridi 14-Jul-11 17:31pm    
good, my 5

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900