Is it possible to make a function on appinventor which detects the nearest restaurants or anything else?

I think you need a list of point locations that interest you. Then you compare your location with this list and display the points that are not far away.