November 2008 Archives

Google driving directions in C# - Update

| 13 Comments | No TrackBacks
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:

GDirections directions = new GDirections(startAddress, endAddress);

if (directions.IsValid)
    Response.Write(directions.RoutesHtml[0]);
else
    Response.Write("Route not valid.");


Powered by Movable Type 4.21-en

Recent Comments

  • Leandro Nuñez: Hey, thanks for the great share. Is there a way read more
  • Justin: cool plugin. how would you go about creating then wiring read more
  • Anil: Nice plugin. I wanted to add some validation and stop read more
  • reigel: look cool... It would be okay if it can validate read more
  • glompix: @derby We actually do use Subverison for our version control, read more
  • derby: I use xperl, dominos, and titan bar to customize my read more
  • derby: Thanks for the script. I was looking for some AJAX read more
  • A. burton: how do you set up a search for events created read more
  • NANERPUSS: LEXINGTON GOONTUCKY :hfive: read more
  • Matt: This is a great walkthrough. I am also using the read more