Search code examples
google-maps-api-3google-directions-api

Altitude in a tunnel or on a bridge


In my web application, I need to know the altitude of a road. For that, I use the Google Maps API v3. I use the Direction Service for getting the waypoints and then I use the Elevation Service to get the altitude of each points that the Direction Service has returned.

The problem is, if there's a tunnel or a bridge, the elevation will returns the altitude of the mountain (for a tunnel) or under the bridge...

Is there any way to get the good altitude of the road who goes inside a tunnel or on a bridge ?

I'm open for any suggestion.
Thank you


Solution

  • The data you need could be found in Map Maker Road Attributes (is maintained by the community)

    Unfortunately there is no API for it on V3

    The "good altitude" only can be obtained with a good GPS or another hardware designed for that. A good enough value could be calculated if you somehow store the places where tall bridges are (or deep tunels), and then for those places retrieve the corrected altitude (not an easy task, but if your scope isn't too big and the data is already on Google's Map Marker it could work).