SearchPreferences constructor
SearchPreferences({
- bool allowFuzzyResults = true,
- bool estimateMissingHouseNumbers = true,
- bool exactMatch = false,
- int maxMatches = 40,
- bool searchAddresses = true,
- bool searchMapPOIs = true,
- bool searchOnlyOnboard = false,
- int thresholdDistance = 2147483647,
- int thresholdHeading = 2147483647,
- bool easyAccessOnlyResults = false,
Create a SearchPreferences instance with the selected options.
More detailed configuration can be done via the individual property setters,
Parameters
allowFuzzyResults: Allow fuzzy (approximate) search matches. Default: true.estimateMissingHouseNumbers: Enable estimation of house numbers missing from map data. Default: true.exactMatch: Require exact token matches. Default: false.maxMatches: Maximum number of results to return. Default: 40.searchAddresses: Include addresses (and roads) in search results. Default: true.searchMapPOIs: Include map POIs in search results. Default: true.searchOnlyOnboard: Restrict searches to onboard (offline) data. Default: false.thresholdDistance: Maximum distance (in meters) from the reference used to filter results. Default: 2147483647.thresholdHeading: Maximum difference (in degrees) between a result heading and the closest route segment heading, for SearchService.searchAlongRoute. Default: 2147483647 (no filtering).easyAccessOnlyResults: Restrict results to locations with easy access. Default: false.
Implementation
factory SearchPreferences({
bool allowFuzzyResults = true,
bool estimateMissingHouseNumbers = true,
bool exactMatch = false,
int maxMatches = 40,
bool searchAddresses = true,
bool searchMapPOIs = true,
bool searchOnlyOnboard = false,
int thresholdDistance = 2147483647,
int thresholdHeading = 2147483647,
bool easyAccessOnlyResults = false,
}) {
final SearchPreferences result = SearchPreferences._create();
result.allowFuzzyResults = allowFuzzyResults;
result.estimateMissingHouseNumbers = estimateMissingHouseNumbers;
result.exactMatch = exactMatch;
result.maxMatches = maxMatches;
result.searchAddresses = searchAddresses;
result.searchMapPOIs = searchMapPOIs;
result.searchOnlyOnboard = searchOnlyOnboard;
result.thresholdDistance = thresholdDistance;
result.thresholdHeading = thresholdHeading;
result.easyAccessOnlyResults = easyAccessOnlyResults;
return result;
}