Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have a website where in I want to display the Google map according to the address entered in the textbox. I tried to use the geo coding example shown(in C#) but it nowhere takes the address as input to display the location according to the address. Please help me.
Posted
Comments
bbirajdar 2-Oct-12 13:03pm    
Issue in your code.. You need to fix it ..

1 solution

Everything you need to do this is in the documentation

https://developers.google.com/maps/documentation/geocoding/[^]

Make a request to Googles service and receive the request back in the format you want, either XML or JSON

e.g. click this link, it's doing what you need to do

http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=false[^]

That can be a standard HTTP request in c#, which you can just deserialize and retrieve the geometry->location->lng/lat values. Or, you can make a request directly from script. (Client-side geocoding)

https://developers.google.com/maps/articles/geocodestrat[^]

Once you have them, just plot the coorindates onto a map and it will display!
 
Share this answer
 

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