views:

369

answers:

2

For some locations there is no driving directions available in the Google Maps API, but it works perfectly in maps.google.com. One such location is Orchha, India. I have tried it with different combinations like providing: state name, lattitude and longitude, but it not works in google API alone but it works in Google Maps site. is there any API to find the route available or not. or else any other solution to access Google Map database for finding the existence of direction for particular location?

A: 

To check if driving directions are available for a particular location, you may want to check the following spreadsheet: Google Code - Map Coverage Filtered.

In fact for India, driving directions, street view and traffic are not yet officially available from the Google Maps API.

Daniel Vassallo
A: 

Although there's no official support for driving directions in India yet, the code does actually work as long as the endpoints are within 5km of a road supported by the GDirections database, and the route doesn't require passing through other countries where there really isn't any GDirections support.

The GDirections road network data for rural India is quite sparse, and there's a lot of points that are more than 5km from a known road. The small rural roads shown in white are generally not in the GDirections database.

There are some state names that geocode to large empty rural areas with no nearby roads. For example "Arunachal Pradesh" geocodes to the middle of a range of mountains where there are no roads known to the GDirections server.

Since there are only 28 states in India, you might consider adding your own code to handle to ones that geocode to areas with no roads, substituting locations close to roads.

I don't have any good solutions for handling small villages. First you'd have to determine whether it's the start or end point that's more than 5km from a road by attempting to obtain GDirections from the village to itself. Then you could try to search for points reasonably nearby where there are roads, but that's rather hit-and-miss.

Routes from locations in Arunachal Pradesh to the main part of India would pass through countries where there is no GDirections support at all, so such requests always fail. As far as GDirections is concerned, it's like asking for driving directions from Hawaii to Chicago.

Mike Williams