OfflineSearchEngine class abstract
The OfflineSearchEngine works without internet and unlocks the search and geocoding capabilities of HERE services to provide developers with unmatched flexibility to create differentiating location-enabled applications.
It provides the same interfaces as the SearchEngine, but the results may slightly differ as the results are taken from already downloaded map data instead of initiating a new request to a HERE backend service. This way the data may be, for example, older compared to the data you may receive when using the SearchEngine. On the other hand, this class provides results faster as no online connection is necessary.
In comparison to the SearchEngine, there are a few limitations:
- The IDs of POIs are different and may differ among different map versions.
- The implementation is different and the resources are limited, so the results can differ.
- OfflineSearchEngine sometimes doesn't return the requested number of results.
Note: You can search only within persistent map data (downloaded via MapDownloader) or existing cached data. However, cached data may be incomplete, which can result in searches returning partial or incomplete information. Therefore, it is recommended to use persistent map data. Make sure that at least LayerConfigurationFeature.offlineSearch is enabled. For EV rich attributes also enable LayerConfigurationFeature.ev, for truck rich attributes also enable LayerConfigurationFeature.truckServiceAttributes, for fuel station rich attributes also enable LayerConfigurationFeature.fuelStationAttributes in SDKOptions.layerConfiguration.
- Implemented types
Constructors
- OfflineSearchEngine()
-
Creates a new instance of this class.
factory
- OfflineSearchEngine.withSdkEngine(SDKNativeEngine sdkEngine)
-
Creates a new instance of this class.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
attach(
MyPlaces dataSource, OnTaskCompleted callback) → TaskHandle - Attach data source into SearchEngine instance.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
searchByAddress(
AddressQuery query, SearchOptions options, SearchCallback callback) → TaskHandle -
Performs an asynchronous address query search for Place instances.
inherited
-
searchByAddressElements(
StructuredQuery query, SearchOptions options, SearchCallback callback) → TaskHandle - Performs an asynchronous request to search for places.
-
searchByCategory(
CategoryQuery query, SearchOptions options, SearchCallback callback) → TaskHandle -
Performs an asynchronous category search for Place instances.
inherited
-
searchByCoordinates(
GeoCoordinates coordinates, SearchOptions options, SearchCallback callback) → TaskHandle -
Performs an asynchronous search for Place instances based on the given
geographic coordinates.
inherited
-
searchByPickedPlace(
PickedPlace pickedPlace, LanguageCode? languageCode, PlaceIdSearchCallback callback) → TaskHandle -
Performs an asynchronous search for a Place based on the content found in PickedPlace.
inherited
-
searchByPlaceId(
PlaceIdQuery query, LanguageCode? languageCode, PlaceIdSearchCallback callback) → TaskHandle -
Performs an asynchronous search for a Place based on its ID and
LanguageCode.
inherited
-
searchByText(
TextQuery query, SearchOptions options, SearchCallback callback) → TaskHandle -
Performs an asynchronous text query search for Place instances within a given TextQueryArea.
inherited
-
suggestByAddressElements(
StructuredQuery query, SearchOptions options, SuggestCallback callback) → TaskHandle - Performs an asynchronous request to suggest places for a StructuredQuery built with address elements and returns candidate suggestions sorted by relevance.
-
suggestByText(
TextQuery query, SearchOptions options, SuggestCallback callback) → TaskHandle -
Performs an asynchronous request to suggest places for text queries and
returns suggestions sorted by relevance.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
setIndexOptions(
SDKNativeEngine sdkEngine, OfflineSearchIndexOptions options, OfflineSearchIndexListener listener) → OfflineSearchIndexError? - Enables or disables indexing.