SearchLayer class abstract
The search layer handles the map search requests and displays the results on the map automatically. It also handles the map movements and resubmits searches when needed.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- visible ↔ bool
-
Search layer visibility. Visible by default. While the layer is
invisible resubmits are not performed on map moves, but all the state
changing methods (
submitQuery
,resubmit
,deselectPlacemark
, and other) are executed as usual.getter/setter pair
Methods
-
addPlacemarkListener(
PlacemarkListener placemarkListener) → void - Add a placemark listener, which will receive notifications from the search layer.
-
addSearchResultListener(
SearchResultListener searchResultListener) → void - Add the search result listener, which will receive notifications from the search layer.
-
clear(
) → void - Clear the displayed search results from the map.
-
deselectPlacemark(
) → void - Deselect all placemarks.
-
enableMapMoveOnSearchResponse(
bool enable) → void - Enable or disable moving the map on primary search response. Map moving is enabled by default.
-
enableRequestsOnMapMoves(
bool enable) → void - Enable or disable search requests (resubmits and submits) when the map is moved. Requests are enabled by default.
-
fetchNextPage(
) → void - Load the next page of results.
-
forceUpdateIcon(
PlacemarkIconType iconType, ImageProvider image, IconStyle style, {required String geoObjectId}) → void - Update the icon image for each suitable placemark. If the placemark is not found, the image will be put in a queue and will be applied once when the placemark is created. This is not the normal way to set the image. It is highly advisable to return the right image from AssetsProvider.
-
forceUpdateMapObjects(
) → void - Force reloading all visible pins from AssetProvider. Use when there is a reason to update ALL the icons simultaneously (for example icon theme change, day/night mode, and other). This can be a pretty expensive operation, as it wipes all the map objects off of the layer and creates them from scratch. Use only if absolutely necessary.
-
getSearchResultsList(
) → List< SearchResultItem> - Get the list of search results.
-
hasNextPage(
) → bool - Check if more results could be loaded.
-
isValid(
) → bool - Usable only in runWithBlockUi or listener handlers.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
obtainAdIcons(
bool enable) → void - If enabled, the search layer will obtain and set advertising icons without asking AssetsProvider.
-
removePlacemarkListener(
PlacemarkListener placemarkListener) → void - Remove placemark listener
-
removeSearchResultListener(
SearchResultListener searchResultListener) → void - Remove search result listener.
-
resetAssetsProvider(
) → void - Reset the assets provider to default.
-
resetSort(
) → void - Reset the sort if it was previously set.
-
resubmit(
) → void - Manual resubmit.
-
searchByUri(
SearchOptions searchOptions, {required String uri}) → void - Submit search request for URI resolution. Allows multiple objects in response.
-
searchMetadata(
) → SearchMetadata? - Get the last search response metadata.
-
selectedPlacemarkId(
) → String? - Selected placemark ID. Return Placemark identifier if any placemark is selected, otherwise none.
-
selectPlacemark(
String geoObjectId) → void - Select the placemark by ID.
-
setAssetsProvider(
AssetsProvider provider) → void - Set a custom assets provider, which provides images, sizes and icon styles for placemarks.
-
setFilterCollection(
SearchFilterCollection? filters) → void - Set search filters.
-
setFilters(
List< SearchBusinessFilter> filters) → void - search.FilterCollection)} instead.
-
setInsets(
{required int top, required int left, required int bottom, required int right}) → void - Apply insets (in pixels) to the screen. If inset is not zero, search in the cut-off area will not be performed.
-
setPolylinePosition(
PolylinePosition position) → void -
When sorting by distance from polyline sets position on this
polyline. Has the same effect as sorting by distance from the
sub-polyline from
position
to the end of the polyline. Throws if no polyline is set or position is out of range. -
setSearchManager(
SearchManager searchManager) → void - Set the search manager. Do not use this method; it is for internal use only.
-
setSortByDistance(
Geometry origin) → void - Set sort order of the results by distance from given geometry.
-
submitQuery(
SearchOptions searchOptions, {required String query}) → void - Submit search query with search options.
-
submitQueryWithGeometry(
Geometry geometry, SearchOptions searchOptions, {required String query}) → void - Submit search query with search options near provided geometry.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited