An Adaptive Peer-to-Peer Overlay Scheme for Location-based Services