I've updated my GDirections C# class to allow for easier access to the actual driving directions. The code file can be found here. As usual, you will need your own Google Maps API key, which you can get for free at http://code.google.com/apis/maps/signup.html. You will also need JSON.NET to parse the JSON response from Google's service.
Example code:
if (directions.IsValid)
Response.Write(directions.RoutesHtml[0]);
else
Response.Write("Route not valid.");
Example code:
GDirections directions = new GDirections(startAddress, endAddress);
if (directions.IsValid)
Response.Write(directions.RoutesHtml[0]);
else
Response.Write("Route not valid.");

Recent Comments