If I look at the documentation of setRegionCode("se") I see this javadoc documentation:
To restrict results to a region, use
region_code_restriction
.
I would like to restrict the results to "sweden"
But can't find on AutocompletePlacesRequest a setRegionCodeRestriction("se") method?
AutocompletePlacesRequest.newBuilder()
.setInput(placeInput)
.addIncludedPrimaryTypes("geocode")
.setIncludeQueryPredictions(true)
.setRegionCode("se")
.setLanguageCode("en")
.setSessionToken("12345")
.build();
Is the documentation on the java autocomplete client misleading?
.setLocationRestriction( LatLngBounds.newBuilder() .setSouthwest(LatLng.newBuilder().setLatitude(55.0).setLongitude(11.0).build()) .setNortheast(LatLng.newBuilder().setLatitude(69.0).setLongitude(24.0).build()) .build() )
Filter responses post-fetch to enforce "Sweden-only" results by looking at the returned address components.