-1

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?

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
Chris
  • 9,209
  • 16
  • 58
  • 74

3 Answers3

6

Have you looked at the Google Maps API?

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

Galwegian
  • 41,475
  • 16
  • 112
  • 158
3

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
  • 83,368
  • 10
  • 76
  • 104
0

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
  • 13,388
  • 3
  • 31
  • 46