0

I'm trying to do a search with the tomtom sdk in android.

SearchApi searchApi = OnlineSearchApi.create(Activity.this);

    searchApi.search(new FuzzySearchQueryBuilder(mSearchBar.getText().toString().trim())
            .withPosition(new com.tomtom.online.sdk.common.location.LatLng(myLocation.getLatitude(), myLocation.getLongitude()))
            .withTypeAhead(true)
            .withLimit(10)
            .build(), new FuzzySearchResultListener() {
        @Override
        public void onSearchResult(FuzzySearchResponse fuzzySearchResponse) {}

        @Override
        public void onSearchError(SearchError searchError) {}
    });

My response has results not matching my query with field "Type" = "POI" (Points of interest i assume). I want to display non-points-of-interest locations and show only addresses ("Type" = "Point Address") or cities ("Type" = "Geography") matching my query.

How do I achieve this?

szogoon
  • 470
  • 3
  • 15
SomeKoder
  • 575
  • 4
  • 14

1 Answers1

1

Use

.withIdx('Geo,PAD')

This parameter defines which indexes to be queried.

szogoon
  • 470
  • 3
  • 15