ElevationService Maps API v3
Google have added a new service to the Google Maps API. The new ElevationService enables map developers to determine elevation profiles.
Using the ElevationServices map developers can now request the elevation in meters for one or more sets of coordinates, or request a specific number of elevation samples equally spaced along a path. This will allow map developers to add elevation charts to their maps (as in the screenshot above which uses the Google Visualization API to plot the elevation profile.)
Via: Google Geo Developers Blog