Click here to Skip to main content
15,903,362 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:
C#
string geocodeUrl2 = string.Format(@"http://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&sensor=false");

XmlDocument geocodeXmlDoc2 = new XmlDocument();
geocodeXmlDoc2.Load(geocodeUrl2);


i want to complete this code... please someone help me.

i think i might need for loop to view directions.

and i want to pass the values in to text area...

basically if we give two location as origin and destination.

i want to get direction step by step.




and i want to show those direction in asp.net text area...
............


can someone tell me the way how to do that.....
Posted
Updated 29-Jun-13 18:36pm
v3
Comments
Sampath Lokuge 30-Jun-13 2:44am    
@promod for get better help you have to put original url for above code snippet or must put exact requirement which you have to implement (actually both).
Michael J. Eber 1-Jul-13 14:34pm    
your first problem is the improper use of string.Format. It's method signature is string.Format(string, param object[]). You do not have the tokens in your string for formatting and you did not supply the parameters to feed to format. Typical string format: ("Some string gets stuff {0}", "inserted here") The {0} is the replaceable token with 0 being the index into the parameter array.

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