The best way to handle this is to handle it gracefully. Communicate that the app couldn't find their location, but do it in a way that tells them how to fix the problem. "Unable to obtain location" tells me what the problem is, but it says nothing about how to fix the problem.
Users see messages like this and think that the app is being rude and telling them that they failed. But error messages are actually programs' reporting that the programs themselves failed. Many users won't realize this and will take it personally. And as your question implied, there's a better way to approach this.
Many phones have a location setting that users can change in order to make location-based services work. The first line of defense, then, may be to get users to change a setting on their phone. And then the app should be smart and try to find the location again when the phone has, in fact, finished switching into a mode where it can use location services (mine occasionally can take a few seconds to do this).
What if users don't want to turn their location setting on? Users may disable it for privacy reasons, for saving the phone's battery, or other reasons. (I usually keep it switched off for saving the battery.) You need to account for this and not assume that users want to give you their location. In other words, a user is not making a mistake when they don't want to tell you where they are.
Similarly, also assume that not every user who is using your app wants to check something for their location. For example, they may need to use the app because a friend or family member who is out of town wants them to retrieve some sort of information (about their friend or family member's location) using your app. Your app might benefit from a feature that allows people to store favorite locations.
So fall back to a state that lets users continue to do their work and accomplish their goal for using your app. You could have a popup which allows them to enter a location manually or a map which lets them enter a location visually. (If you are dealing with a lot of data points at faraway zoom levels, consider condensing them with a popup that says, in effect, "There are 100 houses here". Then when users zoom in, they will be able to see individual data points in a way that is not cluttered. I think the Zillow app does this.)
I would use a combination of the above two approaches. Something to the effect of this would be helpful (assuming that you have a way to find out if location services is turned or not): "We couldn't find your location. You could enable location services on your phone (include a link to this screen) if you want to use your location, or you could input your location manually." That way, too, the app is not enforcing its preference on the user, but it's letting users choose.
Another option would be to go ahead and fall back silently to let users input their own location, and then have a modeless status message which says, "Location services is turned off. Tap here to enable it and search from your location." Users should be able to dismiss that message forever - effectively showing the app what their preference is. They should be able to switch this back in the app's Settings screen.
Consider running an A/B test (the popup vs. the modeless status message) to see which is more effective for your app's users. Ideally also, you'll want the popup or the modeless message to show up before the user has told the app to search for anything - i.e., right when the app loads.
If finding the location is merely taking a long time, consider using a modeless message like this: "Finding your location seems to be taking a while. Enter a location?", where "Enter a location?" is a link to a screen that lets them enter a location manually.
Your goal for error messages should be to make sure that your users never have to see them. If they ever do, make the messages graceful and show users that they can recover from this error and still get what they need from your app. And if appropriate (it isn't always), you could use emotional design techniques such as what is found on humorous 404 pages.
Edit: A good answer to a similar question has a parallel to the "100 houses" point I made above: What should the default view of a map be when you don't know a user's location?.