function of location search and navigate