Skip to content

bullheadandplato/MuftPlacePicker

Repository files navigation

MuftPlacePicker

OpenStreetMap Place Picker for Android. Based on OSMdroid

How To Use

STEP 1

Add it to your build.gradle with:

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

and:

dependencies {
      implementation 'com.github.bullheadandplato:MuftPlacePicker:1.0.0'
}

STEP 2

Show Place Picker

 PlacePicker.show(PlacePickerUiOptions.builder()
                                     .primaryColor(R.color.purple_700)
                                     .secondaryColor(R.color.white)
                                     .searchTextColor(R.color.black)
                                     .build(),
                             PlacePickerMapOptions.builder()
                                     .zoom(16)
                                     .build(),
                             place -> {
                                 placeTextView.setText(place.getDisplayName());
                             },
                             getSupportFragmentManager());