Closed g2dgaming closed 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!
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!