All the examples I've come across using google maps api seem to show a map of some kind. I would like to incorporate the data about the estimated travel time by car they give you when you ask for a road description from A to B into a site. And only that data. Is it possible without loading up a map for the end visitor?
Yep, this is definitely possible using the API. You can construct a GDirections object without a map or directions div. You can do a load request from A to B and then call the getDuration method to get the total travel time.
First you need to create a directions object:
// no need to pass map or results div since
// we are only interested in travel time.
var directions = new GDirections ();
Then do your load request to resolve the directions (I have use two latitude, longitudes as my start and end point, but you can use addresses here as well):
var wp = new Array ();
wp[0] = new GLatLng(32.742149,119.337218);
wp[1] = new GLatLng(32.735347,119.328485);
directions.loadFromWaypoints(wp);
Then you need to listen for the load event so you can call getDuration once the directions have been resolved:
GEvent.addListener(directions, "load", function() {
$('log').innerHTML = directions.getDuration ().seconds + " seconds";
});
You can find the whole example here and the JavaScript here. You can check the Google Maps Documentation for more info about the options you can give the GDirections object (like walking distance etc...). You should also listen to the error event for geocoding failures.