Warning
This feature is available in the Full MapKit SDK version
MMKSearchManager
class MMKSearchManager : NSObject |
Main interface to start search.
Summary
Instance methods
func submit(withText text: String, |
func submit(withText text: String, |
func submit(with point: MMKPoint, |
func resolveURI(withUri uri: String, |
func searchByURI(withUri uri: String, |
func createSuggestSession() -> MMKSearchSuggestSession |
Instance methods
submit(withText:geometry:searchOptions:responseHandler:)
func submit(withText text: String, |
Search request for searching a user query near given geometry.
Parameters |
|
text |
User query. |
geometry |
Geometry to search near. Supported types: point, bounding box, polyline and polygon. If the polyline is provided, setSortByDistance(polyline) is assumed on the first request. Polygon is expected to be a search window: 4 points in outer ring (or 5 if the last point is equal to the first) and no inner rings. |
searchOptions |
Various additional search parameters, see MMKSearchOptions definition for details. |
searchListener |
Listener to handle search result. |
Returns |
MMKSearchSession which allows further searches, cancel and |
submit(withText:polyline:geometry:searchOptions:responseHandler:)
func submit(withText text: String, |
Search request that is used to search for a user query along the given polyline inside the given window.
Parameters |
|
text |
User query. |
polyline |
Polyline to search near; MMKSearchSession::setSortByDistanceWithOrigin: is assumed on the first request. |
geometry |
Geometry to search near; supported types: point, bounding box, polyline and polygon. Polygon is expected to be a search window: 4 points in outer ring (or 5 if the last point is equal to first) and no inner rings. |
searchOptions |
Various additional search parameters, see MMKSearchOptions definition for details. |
searchListener |
Listener to handle search result. |
Returns |
MMKSearchSession which allows further searches, cancel and |
submit(with:zoom:searchOptions:responseHandler:)
func submit(with point: MMKPoint, |
Reverse search request (to search objects at the given coordinates)
Parameters |
|
point |
Coordinates to search at. |
zoom |
Current zoom level. Skips objects that are too small for a given zoom level. |
searchOptions |
Additional search parameters, see MMKSearchOptions definition for details. Currently the only supported options are MMKSearchOptions::origin, MMKSearchOptions::searchTypes and MMKSearchOptions::snippets. Only 'geo' and 'biz' types are supported and not at the same time. |
searchListener |
Listener to handle search result. |
Returns |
MMKSearchSession which allows further searches, cancel and |
resolveURI(withUri:searchOptions:responseHandler:)
func resolveURI(withUri uri: String, |
Search request for URI resolution.
Parameters |
|
uri |
Object uri. |
searchOptions |
Additional search parameters, see MMKSearchOptions definition for details. Currently the only supported options are MMKSearchOptions::origin and MMKSearchOptions::snippets. |
searchListener |
Listener to handle search result. |
Returns |
MMKSearchSession which allows search cancel and retry. Should |
searchByURI(withUri:searchOptions:responseHandler:)
func searchByURI(withUri uri: String, |
Search request with URI. Allows multiple results in response.
Parameters |
|
uri |
Object uri. |
searchOptions |
Additional search parameters, see MMKSearchOptions definition for details. Currently the only supported options are MMKSearchOptions::origin, MMKSearchOptions::snippets and. MMKSearchOptions::resultPageSize. |
searchListener |
Listener to handle search result. |
Returns |
MMKSearchSession which allows search cancel and retry. Should |
createSuggestSession()
func createSuggestSession() -> MMKSearchSuggestSession |
Creates session for suggest requests.