Mindinventory / vanilla-place-picker

Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android
https://www.mindinventory.com/android-application-development.php
MIT License
120 stars 34 forks source link

issue with MAP_WITH_AUTO_COMPLETE in java #37

Closed g2dgaming closed 3 years ago

g2dgaming commented 3 years ago

LatLngBounds.Builder builder = new LatLngBounds.Builder(); builder.include(new LatLng(bottomCoordinate,leftCoordinate)).include(new LatLng(topCoordinate,rightCoordinate)); LatLngBounds cityBounds=builder.build(); Intent locationPickerIntent = new VanillaPlacePicker.Builder(OrderActivity.this) .withLocation(cityLatitude,cityLongitude) .with(PickerType.MAP) .setPickerLanguage(PickerLanguage.ENGLISH) .setLocationRestriction(cityBounds.northeast,cityBounds.southwest) .setCountry("IN") .enableShowMapAfterSearchResult(true) .setMapType(MapType.NORMAL) .setMapPinDrawable(R.drawable.ic_placeholder) .build(); startActivityForResult(locationPickerIntent, requestSenderLocationCode);

Above code works when only map is selected

LatLngBounds.Builder builder = new LatLngBounds.Builder(); builder.include(new LatLng(bottomCoordinate,leftCoordinate)).include(new LatLng(topCoordinate,rightCoordinate)); LatLngBounds cityBounds=builder.build(); Intent locationPickerIntent = new VanillaPlacePicker.Builder(OrderActivity.this) .withLocation(cityLatitude,cityLongitude) .with(PickerType.AUTO_COMPLETE) .setPickerLanguage(PickerLanguage.ENGLISH) .setLocationRestriction(cityBounds.southwest,cityBounds.northeast) .setCountry("IN") .enableShowMapAfterSearchResult(true) .setMapType(MapType.NORMAL) .setMapPinDrawable(R.drawable.ic_placeholder) .build(); startActivityForResult(locationPickerIntent, requestSenderLocationCode);

and this works when using AUTO Complete Problem is when I type MAP_WITH_AUTO_COMPLETE either search wont work or map wont start!