Google Maps API for Android - detecting buildings / obstacles between me and a location

A hypothetical question. I am creating an augmented reality application using the Google Maps API for Android. I am wondering if there is any data that I can use to determine if a building is between me and a specified location. I ask this because at a sufficiently high magnification, the clear data on the shape of the buildings included in the map has clear data. I was wondering if there is a way like this:

boolean buildingInTheWay(myLocation, destinationLocation);

if (buildingInTheWay) {
//Do something 
} else {
//Do something else


Perhaps there is something that can be done where, if the route to a place is much longer than the bird's eye path to the place, there must be an obstacle in the way (imagine two parallel streets:

- = street
X = buildings
A = start location
B = destination location

xxxxxxxx | xxxxxxxxx


Here A to B will return true as the route around buildings is much longer than the straight distance. But C to D will return false, since the route following the road is almost exactly equal to the distance.

However, this is not very accurate - what is between the buildings? I wonder if every building on Google Maps has lat / lng points for each of its corners?

Any thoughts, anyone?


source to share

All Articles