views:

178

answers:

3

Is there a simple way to get driving instructions?

Something like: I call "http://someservice/?start=NYC&target=Washington" and then the service returns a XML file containing routing information?

Has anybody ever tried to access such a web-based service from a standalone desktop application?

Any help would really be appreciated!

Update: Thanks for the hints, but unfortunately I can't run JavaScript. Is there still a possibility to receive driving instructions?

+6  A: 

Have you looked at the Google Maps API?

Also see how to Add Google Maps’ Directions to Your Site.

Galwegian
+3  A: 

Google maps API.

An example from the Directions doc:

// Create a directions object and register a map and DIV to hold the 
// resulting computed directions

var map;
var directionsPanel;
var directions;

function initialize() {
  map = new GMap2(document.getElementById("map_canvas"));
  directionsPanel = document.getElementById("my_textual_div");
  map.setCenter(new GLatLng(49.496675,-102.65625), 3);
  directions = new GDirections(map, directionsPanel);
  directions.load("from: 500 Memorial Drive, Cambridge, MA to: 4 Yawkey Way, Boston, MA 02215 (Fenway Park)");
}
gimel
A: 

Depending on your application, it may not yet be a viable option, but you might want to look at the various routing offerings using OpenStreetMap data. The routing wiki page provides more information on the various projects.

Jon Bright