Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (search_term != null) {
- WhereBoxParser.extractZip(search_term) match {
- case Some(zip: String) => wrapZip(zip)
- case None => {
- WhereBoxParser.extractStateAbbrev(search_term) match {
- case Some(abbrev: String) => wrapStateAbbrev(abbrev)
- case None => {
- WhereBoxParser.extractStateName(search_term) match {
- case Some(name: String) => wrapStateName(name)
- case None => {
- if (AddressMatcher.isAddress(search_term)) {
- GeoCoder.geoCodeLocation(search_term) match {
- case Some(georesult: GeoCodedLocation) => {
- if (isValidGeoResult(georesult)) {
- wrapGeoResult(georesult)
- } else searchSphinx
- }
- case _ => searchSphinx
- }
- } else searchSphinx
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment