mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-03 03:13:48 +00:00
[ios] fix route building error while searching when current location in none
Fixes issue https://github.com/organicmaps/organicmaps/issues/10606 Signed-off-by: Kiryl Kaveryn <kirylkaveryn@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
7be49ab00a
commit
8a331c4c67
@@ -96,24 +96,24 @@ final class SearchOnMapInteractor: NSObject {
|
||||
searchManager.showResult(at: result.index)
|
||||
case .start:
|
||||
let point = MWMRoutePoint(cgPoint: result.point,
|
||||
title: result.titleText,
|
||||
subtitle: result.addressText,
|
||||
type: .start,
|
||||
intermediateIndex: 0)
|
||||
title: result.titleText,
|
||||
subtitle: result.addressText,
|
||||
type: .start,
|
||||
intermediateIndex: 0)
|
||||
routeManager.build(from: point, bestRouter: false)
|
||||
case .finish:
|
||||
let point = MWMRoutePoint(cgPoint: result.point,
|
||||
title: result.titleText,
|
||||
subtitle: result.addressText,
|
||||
type: .finish,
|
||||
intermediateIndex: 0)
|
||||
title: result.titleText,
|
||||
subtitle: result.addressText,
|
||||
type: .finish,
|
||||
intermediateIndex: 0)
|
||||
routeManager.build(to: point, bestRouter: false)
|
||||
@unknown default:
|
||||
fatalError("Unsupported routingTooltipSearch")
|
||||
}
|
||||
return isIPad ? .none : .setSearchScreenHidden(true)
|
||||
case .suggestion:
|
||||
var suggestionQuery = SearchQuery(result.suggestion,
|
||||
let suggestionQuery = SearchQuery(result.suggestion,
|
||||
locale: query.locale,
|
||||
source: result.isPureSuggest ? .suggestion : .typedText)
|
||||
searchManager.searchQuery(suggestionQuery)
|
||||
|
||||
Reference in New Issue
Block a user