Class YMKSearchManager
Main interface to start search.
Instance Methods
- cancelSuggest | |
- createSuggestSession | Creates session for suggest requests. |
- requestGoodsRegisterWithUri:goodsRegisterHandler: | Search request for goods register. |
- resolveURIWithUri:searchOptions:responseHandler: | Search request for URI resolution. |
- searchByURIWithUri:searchOptions:responseHandler: | Search request with URI. |
- submitWithPoint:zoom:searchOptions:responseHandler: | Reverse search request (to search objects at the given coordinates) |
- submitWithText:geometry:searchOptions:responseHandler: | Search request for searching a user query near given geometry. |
- submitWithText:polyline:geometry:searchOptions:responseHandler: | Search request that is used to search for a user query along the given polyline inside the given window. |
- suggestWithText:window:searchOptions:responseHandler: |
- cancelSuggest | |
- createSuggestSession | Creates session for suggest requests. |
- requestGoodsRegisterWithUri:goodsRegisterHandler: | Search request for goods register. |
- resolveURIWithUri:searchOptions:responseHandler: | Search request for URI resolution. |
- searchByURIWithUri:searchOptions:responseHandler: | Search request with URI. |
- submitWithPoint:zoom:searchOptions:responseHandler: | Reverse search request (to search objects at the given coordinates) |
- submitWithText:geometry:searchOptions:responseHandler: | Search request for searching a user query near given geometry. |
- submitWithText:polyline:geometry:searchOptions:responseHandler: | Search request that is used to search for a user query along the given polyline inside the given window. |
- suggestWithText:window:searchOptions:responseHandler: |
Method Detail
-cancelSuggest
- (void)cancelSuggest
deprecated Use
createSuggestSession instead. Cancel current suggest request.
-createSuggestSession
- (nonnull YMKSearchSuggestSession *)createSuggestSession
Creates session for suggest requests.
-requestGoodsRegisterWithUri:goodsRegisterHandler:
- (nonnull YMKSearchGoodsRegisterSession *)requestGoodsRegisterWithUri:(nonnull NSString *)uri
goodsRegisterHandler:(nonnull YMKSearchGoodsRegisterSessionGoodsRegisterHandler)goodsRegisterHandler
Search request for goods register.
uri | Uri of object for which goods register is requested. |
goodsRegisterListener | Listener to handle search result. |
uri | Uri of object for which goods register is requested. |
goodsRegisterListener | Listener to handle search result. |
Returns:
YMKSearchGoodsRegisterSession which allows search cancel and retry. Should be stored by user or search is automatically cancelled.
-resolveURIWithUri:searchOptions:responseHandler:
- (nonnull YMKSearchSession *)resolveURIWithUri:(nonnull NSString *)uri
searchOptions:(nonnull YMKSearchOptions *)searchOptions
responseHandler:(nonnull YMKSearchSessionResponseHandler)responseHandler
Search request for URI resolution.
uri | Object uri. |
searchOptions | Additional search parameters, see YMKSearchOptions definition for details. Currently the only supported options are YMKSearchOptions::origin and YMKSearchOptions::snippets. |
searchListener | Listener to handle search result. |
uri | Object uri. |
searchOptions | Additional search parameters, see YMKSearchOptions definition for details. Currently the only supported options are YMKSearchOptions::origin and YMKSearchOptions::snippets. |
searchListener | Listener to handle search result. |
Returns:
YMKSearchSession which allows search cancel and retry. Should be stored by user or search is automatically cancelled.
-searchByURIWithUri:searchOptions:responseHandler:
- (nonnull YMKSearchSession *)searchByURIWithUri:(nonnull NSString *)uri
searchOptions:(nonnull YMKSearchOptions *)searchOptions
responseHandler:(nonnull YMKSearchSessionResponseHandler)responseHandler
Search request with URI.
Allows multiple results in response.uri | Object uri. |
searchOptions | Additional search parameters, see YMKSearchOptions definition for details. Currently the only supported options are YMKSearchOptions::origin, YMKSearchOptions::snippets and. YMKSearchOptions::resultPageSize. |
searchListener | Listener to handle search result. |
uri | Object uri. |
searchOptions | Additional search parameters, see YMKSearchOptions definition for details. Currently the only supported options are YMKSearchOptions::origin, YMKSearchOptions::snippets and. YMKSearchOptions::resultPageSize. |
searchListener | Listener to handle search result. |
Returns:
YMKSearchSession which allows search cancel and retry. Should be stored by user or search is automatically cancelled.
-submitWithPoint:zoom:searchOptions:responseHandler:
- (nonnull YMKSearchSession *)submitWithPoint:(nonnull YMKPoint *)point
zoom:(nullable NSNumber *)zoom
searchOptions:(nonnull YMKSearchOptions *)searchOptions
responseHandler:(nonnull YMKSearchSessionResponseHandler)responseHandler
Reverse search request (to search objects at the given coordinates)
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 YMKSearchOptions definition for details. Currently the only supported options are YMKSearchOptions::origin, YMKSearchOptions::searchTypes and YMKSearchOptions::snippets. Only 'geo' and 'biz' types are supported and not at the same time. |
searchListener | Listener to handle search result. |
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 YMKSearchOptions definition for details. Currently the only supported options are YMKSearchOptions::origin, YMKSearchOptions::searchTypes and YMKSearchOptions::snippets. Only 'geo' and 'biz' types are supported and not at the same time. |
searchListener | Listener to handle search result. |
Returns:
YMKSearchSession which allows further searches, cancel and retry. Session should be stored by user or search is automatically cancelled.
Remark:zoom | has optional type, it may be uninitialized. |
zoom | has optional type, it may be uninitialized. |
-submitWithText:geometry:searchOptions:responseHandler:
- (nonnull YMKSearchSession *)submitWithText:(nonnull NSString *)text
geometry:(nonnull YMKGeometry *)geometry
searchOptions:(nonnull YMKSearchOptions *)searchOptions
responseHandler:(nonnull YMKSearchSessionResponseHandler)responseHandler
Search request for searching a user query near given geometry.
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 YMKSearchOptions definition for details. |
searchListener | Listener to handle search result. |
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 YMKSearchOptions definition for details. |
searchListener | Listener to handle search result. |
Returns:
YMKSearchSession which allows further searches, cancel and retry.
-submitWithText:polyline:geometry:searchOptions:responseHandler:
- (nonnull YMKSearchSession *)submitWithText:(nonnull NSString *)text
polyline:(nonnull YMKPolyline *)polyline
geometry:(nonnull YMKGeometry *)geometry
searchOptions:(nonnull YMKSearchOptions *)searchOptions
responseHandler:(nonnull YMKSearchSessionResponseHandler)responseHandler
Search request that is used to search for a user query along the given polyline inside the given window.
text | User query. |
polyline | Polyline to search near_ setSortByDistanceWithOrigin: (YMKSearchSession) 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 YMKSearchOptions definition for details. |
searchListener | Listener to handle search result. |
text | User query. |
polyline | Polyline to search near_ setSortByDistanceWithOrigin: (YMKSearchSession) 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 YMKSearchOptions definition for details. |
searchListener | Listener to handle search result. |
Returns:
YMKSearchSession which allows further searches, cancel and retry. Session should be stored by user or search is automatically cancelled.
-suggestWithText:window:searchOptions:responseHandler:
- (void)suggestWithText:(nonnull NSString *)text
window:(nonnull YMKBoundingBox *)window
searchOptions:(nonnull YMKSearchOptions *)searchOptions
responseHandler:(nonnull YMKSearchManagerResponseHandler)responseHandler
deprecated Use
createSuggestSession instead. Begin a suggest request. The current request is cancelled, if present.
text | Text to get suggestions for. |
window | Current map window position. |
searchOptions | Various additional suggest parameters. See the YMKSearchOptions definition for details. Currently supported options are YMKSearchOptions::searchTypes and YMKSearchOptions::userPosition. Only 'geo', 'biz' and 'transit' types are supported by the suggest backend. If there are no supported types in searchOptions.searchTypes, the result is empty. |
suggestListener | Function called when the result is ready. |
text | Text to get suggestions for. |
window | Current map window position. |
searchOptions | Various additional suggest parameters. See the YMKSearchOptions definition for details. Currently supported options are YMKSearchOptions::searchTypes and YMKSearchOptions::userPosition. Only 'geo', 'biz' and 'transit' types are supported by the suggest backend. If there are no supported types in searchOptions.searchTypes, the result is empty. |
suggestListener | Function called when the result is ready. |