Android Google Places Build RectangularBounds From a List of LatLng

October 8, 2019
import com.google.android.gms.maps.model.LatLng
import com.google.android.gms.maps.model.LatLngBounds
import com.google.android.libraries.places.api.model.RectangularBounds
val boundsBuilder = LatLngBounds.builder()

boundsBuilder.include(LatLang(3.1407626,101.6241891))
boundsBuilder.include(LatLang(3.1089419,101.7379686))
boundsBuilder.include(LatLang(3.0124637,101.7550953))

val bounds = RectangularBounds.newInstance(boundsBuilder.build())

This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.