Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. namespace WindowsFormsApplication5 {
  2.     public partial class Form1: Form {
  3.  
  4.         const string ApiKey = "Fmjtd%7Cluu8290125%2Cr2%3Do5-947alz  ";
  5.         const string ApiServer = "http://open.mapquestapi.com/directions/v2/route";
  6.         var parameters = new NameValueCollection {
  7.  
  8.                 // These are required!
  9.  
  10.                 { "key", ApiKey },
  11.  
  12.                 { "from", from },
  13.  
  14.                 { "to", to },
  15.  
  16.  
  17.  
  18.                 // Avoid bad routes
  19.  
  20.                 { "avoids", "limited access" },
  21.  
  22.                 { "avoids", "Toll road" },
  23.  
  24.                 { "avoids", "Unpaved" },
  25.  
  26.                 { "avoids", "Ferry" },
  27.  
  28.  
  29.  
  30.                 // These format the data to make it easy-to-parse
  31.  
  32.                 { "outFormat", "xml" },
  33.  
  34.                 { "unit", "k" },
  35.  
  36.                 { "narrativeType", "none" },
  37.  
  38.                 { "manMaps", "false" }
  39.  
  40.             };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement