I am in process of making a public transport app and for that cause I want to restrict my PlaceAutocompleteFragment
to only Tram, Bus and Train Stations within my city.
So far I have implemented google map
, place autocomplete fragment and restricted it to my country and city. This is part of my code:
PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)
getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
autocompleteFragment.setBoundsBias(new LatLngBounds(
new LatLng(45.707197, 15.665182),
new LatLng(45.913958, 16.277670)));
AutocompleteFilter typeFilter = new AutocompleteFilter.Builder()
.setCountry("HR")
.build();
autocompleteFragment.setFilter(typeFilter);
I looked into filters and I couldn't find anything like public transport stations. Thanks for help