Vanilla Place Picker

Simple(vanilla) yet 'Do it all' place picker for your place picking needs in Android
Alternatives To Vanilla Place Picker
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Alerts And Pickers5,156
2 years ago89mitSwift
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
Leku718
24 days ago6March 15, 202232apache-2.0Kotlin
:earth_africa: Map location picker component for Android. Based on Google Maps. An alternative to Google Place Picker.
Jquery Locationpicker Plugin370
74 years ago1January 04, 201555mitJavaScript
JQuery Location Picker plugin
Locationpicker239
106 months ago14November 04, 20195mitSwift
iOS location picker view controller
Locationpickerview230
7 years ago7mitObjective-C
MKMapView + UITableView + Parallax scrolling. Provides a framework for building an interactive location picker on iOS.
React Native Google Place Picker184
123 years ago5January 06, 201726mitJava
React Native Wrapper of Google Place Picker for iOS + Android.
Google_map_location_picker171
1a year ago57March 06, 202171apache-2.0Dart
🌍 Map location picker component for flutter Based on google_maps_flutter
Nibo163
5 years ago12mitJava
Android Place picker dependent on Google places, made a custom version so I could style it anyway I wanted for my current project, WIP
Placepicker147
4 months ago9bsd-2-clauseKotlin
Free Android Map Place Picker alternative using Geocoder instead of Google APIs
Locationpicker142
16 months ago24January 18, 202219otherDart
Location picker for Flutter.
Alternatives To Vanilla Place Picker
Select To Compare


Alternative Project Comparisons
Readme

Vanilla Place Picker

Vanilla Place Picker provides a UI that displays an interactive map to get the place details and Autocomplete functionality, which displays place predictions based on user search input.

Developers often come across a requirement of adding precise location. So, a place picker which is easy to implement, less time consuming, and simple enough for users to use it is always in demand and here we have a Vanilla Place Picker which developer can add it in quick simple steps.

Preview

image image

Key features

  • Android 13 support
  • Simple implementation for place picker either using Autocomplete, Map or both
  • Set your own custom map styles
  • Customise map pin icon
  • Set default location position
  • Use it without location permission
  • Choose to show only open businesses or all
  • Highly customise attributes
  • Multi languages support
  • RTL layout support

Usage

Dependencies

  • Step 1. Add the JitPack repository in your project build.gradle:
allprojects {
	    repositories {
		    ...
		    maven { url 'https://jitpack.io' }
	    }
    }

or If Android studio version is Arctic Fox or higher then add it in your settings.gradle

dependencyResolutionManagement {
  		repositories {
       		...
       		maven { url 'https://jitpack.io' }
   		}
   }
  • Step 2. Add the dependency in your app module build.gradle file
        dependencies {
            ...
            implementation 'com.github.Mindinventory:VanillaPlacePicker:X.X.X'
        }

Implementation

  • Step 1. Add Google MAP API KEY in your local.properties file with the same variable name as defined below (google.maps_api_key)
     google.maps_api_key=PLACE YOUR API KEY HERE
  • Step 2. To get Google MAP Api key from local.properties file, write below defined code in your app module build.gradle file
       android {
  ...
  defaultConfig {
  ...
  #Access Google MAP Api Key from local.properties file 
  def properties = new Properties()
  file("../local.properties").withInputStream { properties.load(it)
  #Share the key with your `AndroidManifest.xml`
  manifestPlaceholders = [ googleMapsApiKey:"${properties.getProperty('google.maps_api_key')}"]
  }
  • Step 3. Add below defined meta-data code to your AndroidManifest.xml:
      <application ... >
        ...
        
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="${googleMapsApiKey}" />
        
      </application>
  • Step 4. Add VanillaPlacePicker Builder in to your activity class:

#startActivityForResult is deprecated so better to use registerForActivityResult
     var placePickerResultLauncher =
       registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
           if (result.resultCode == Activity.RESULT_OK && result.data != null) {
               val vanillaAddress = VanillaPlacePicker.getPlaceResult(result.data)
           }
       }
       
#Launch caller with Intent
     val intent = VanillaPlacePicker.Builder(this)
        .with(PickerType.MAP_WITH_AUTO_COMPLETE) // Select Picker type to enable autocompelte, map or both
        .withLocation(23.057582, 72.534458)
        .setPickerLanguage(PickerLanguage.HINDI) // Apply language to picker
        .setLocationRestriction(LatLng(23.0558088,72.5325067), LatLng(23.0587592,72.5357321)) // Restrict location bounds in map and autocomplete
        .setCountry("IN") // Only for Autocomplete
        .enableShowMapAfterSearchResult(true) // To show the map after selecting the place from place picker only for PickerType.MAP_WITH_AUTO_C
        /*
         * Configuration for Map UI
         */
        .setMapType(MapType.SATELLITE) // Choose map type (Only applicable for map screen) 
        .setMapStyle(R.raw.style_json) // Containing the JSON style declaration for night-mode styling
        .setMapPinDrawable(android.R.drawable.ic_menu_mylocation) // To give custom pin image for map marker
        .build()

     placePickerResultLauncher.launch(intent)
                  

Requirements

  • minSdkVersion >= 21
  • Androidx

LICENSE!

Vanilla Place Picker is MIT-licensed.

Let us know!

We’d be really happy if you send us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding our work.

Popular Picker Projects
Popular Location Projects
Popular User Interface Components Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Kotlin
Location
Picker
Autocomplete
Kotlin Android