views:

193

answers:

4

I'm looking for a mapping API (Google Maps-esque), preferably in PHP, that will provide driving instructions between two locations (not necessarily US-based), but will also give information on the type of roads used. The information doesn't have to be very specific - I'd be happy with knowing whether the roads taken are either urban or motorway/highway. So does anyone have any experience with that sort of thing? Cheers.

+2  A: 

The US dept. of transportation publishes road data: http://www.bts.gov/publications/north_american_transportation_atlas_data/

Tim Howland
Thanks Tim, I should have said really - I'm looking for something universal (well, as much as possible), so that'll it'll work for as many countries as possible.
mrhahn
+2  A: 

Not sure this is relevant to you, but the Google Maps API actually provides a way to fetch driving directions. Here's an example:
http://code.google.com/apis/maps/documentation/examples/directions-simple.html

Possibly you could combine this data with the previously mentioned data from
http://www.bts.gov/publications/north_american_transportation_atlas_data/

_Lasar
+2  A: 

Mapping is a unique sort of API. You have multiple means by which you can get to the data you need. Mapping APIs such as MapPoint (barely an API IMHO), or Geobase (Telogis) provide a level of abstraction from the actual map data which can be sourced from various vendors such as Navteq or Geographic Data Technologies (TeleAtlas). Both of these vendors also now offer APIs, but they are many times too low level for what many app developers would want.

You might want to look at something like Pitney Bowes MapInfo Routing J Server. There is also the OGC (Open Geospatial Consortium) that has some good info on open datasets and web service access to geospatial and street level data.

For windows based apps there are a myriad of tools, but with PHP on whatever OS you are using there aren't as many options. Some of the options can be quite expensive, so if I were you, I would start at the OGC and work my way backwards from there into commercial products.

flxkid
+2  A: 

The best source for highly detailed, free road network data in the U.S. is the Census Bureau and its TIGER data sets (also described on Wikipedia).

Drew Dara-Abrams