Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace WindowsFormsApplication5 {
- public partial class Form1: Form {
- const string ApiKey = "Fmjtd%7Cluu8290125%2Cr2%3Do5-947alz ";
- const string ApiServer = "http://open.mapquestapi.com/directions/v2/route";
- var parameters = new NameValueCollection {
- // These are required!
- { "key", ApiKey },
- { "from", from },
- { "to", to },
- // Avoid bad routes
- { "avoids", "limited access" },
- { "avoids", "Toll road" },
- { "avoids", "Unpaved" },
- { "avoids", "Ferry" },
- // These format the data to make it easy-to-parse
- { "outFormat", "xml" },
- { "unit", "k" },
- { "narrativeType", "none" },
- { "manMaps", "false" }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement