All Projects β†’ suchoX β†’ Placepicker

suchoX / Placepicker

Licence: bsd-2-clause
Free Android Map Place Picker alternative using Geocoder instead of Google APIs

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Placepicker

Leku
🌍 Map location picker component for Android. Based on Google Maps. An alternative to Google Place Picker.
Stars: ✭ 612 (+385.71%)
Mutual labels:  google, location, google-maps, maps
EasyWayLocation
This library contain all utils related to google location. like, getting lat or long, Address and Location Setting dialog, many more...
Stars: ✭ 142 (+12.7%)
Mutual labels:  maps, google-maps, location, location-services
iOS-MapKit-Tutorial
iOS MapKit Getting Started
Stars: ✭ 24 (-80.95%)
Mutual labels:  map, location, location-services
Lost
A drop-in replacement for Google Play services location APIs for Android
Stars: ✭ 327 (+159.52%)
Mutual labels:  location, location-services, android-development
Google Map React
Google map library for react that allows rendering components as markers πŸŽ‰
Stars: ✭ 5,529 (+4288.1%)
Mutual labels:  google, map, maps
o.map
Open Street Map app - KaiOS
Stars: ✭ 51 (-59.52%)
Mutual labels:  map, maps, location
ReminderPro
ReminderPro(location, note, voice recording)
Stars: ✭ 27 (-78.57%)
Mutual labels:  map, location, location-services
Flask Googlemaps
Easy way to add GoogleMaps to Flask applications. maintainer: @RiverFount
Stars: ✭ 550 (+336.51%)
Mutual labels:  google-maps, map, maps
aic-mobile-ios
Art Institute of Chicago Official Mobile App
Stars: ✭ 29 (-76.98%)
Mutual labels:  maps, location, location-services
Sketch Map Generator
Sketch plugin to fill a shape with a map generated from a given location using Google Maps and Mapbox
Stars: ✭ 824 (+553.97%)
Mutual labels:  google, google-maps, maps
Pelias Android Sdk
Android sdk for pelias
Stars: ✭ 20 (-84.13%)
Mutual labels:  location, geocoder, android-development
mapus
A map tool with real-time collaboration πŸ—ΊοΈ
Stars: ✭ 2,687 (+2032.54%)
Mutual labels:  map, maps, google-maps
google streetview
A command line tool and module for Google Street View Image API
Stars: ✭ 77 (-38.89%)
Mutual labels:  map, location, address
Lenz
Console based MAP πŸ—Ί : with lots of features 🀩
Stars: ✭ 51 (-59.52%)
Mutual labels:  location, map, maps
s60-maps
Yet another maps for Symbian OS
Stars: ✭ 27 (-78.57%)
Mutual labels:  map, maps, location
Vehicle In Motion
This is a basic implementation of location listener using Google Maps Api
Stars: ✭ 339 (+169.05%)
Mutual labels:  google, location-services, maps
android
Where you can find everything Android from Mapzen
Stars: ✭ 106 (-15.87%)
Mutual labels:  maps, location, location-services
pinpoint
🌎 A python script for finding your Mac.
Stars: ✭ 56 (-55.56%)
Mutual labels:  location, location-services, geocoder
Geocoder
Geocode addresses to coordinates
Stars: ✭ 566 (+349.21%)
Mutual labels:  google, geocoder, address
Pizza Delivery
university project : Android pizza delivery app
Stars: ✭ 32 (-74.6%)
Mutual labels:  location, google-maps, map

Download

PlacePicker

Place Picker for Google Maps has been deprecated in Android and we are told to move to paid APIs. Autocomplete, Nearby and Places photos APIs are chargeable after a number of loads. Check Pricing here

Thankfully, Static and Dynamic Maps on Mobile and Geocoder is still free. PlacePicker is a Place Picker alternative library that allows you to pick a point in the map and get its coordinates and Address using Geocoder instead of Google APIs

Adding PlacePicker to your project

Include the following dependencies in your app's build.gradle :

dependencies {
  implementation 'com.sucho:placepicker:1.1.2'

  implementation 'com.google.android.gms:play-services-maps:17.0.0'
  implementation 'com.google.android.material:material:1.1.0'
  implementation 'com.google.android.libraries.places:places:2.2.0'
}

PlacePicker Uses AndroidX artifacts, thus to use it without issues, make sure your application has been migrated to AndroidX as well. If you havent done it already, Here's How

How to use

  1. You need a Maps API key and add it to your app. Here's How
  2. To start The PlacePickerActivity:
val intent = PlacePicker.IntentBuilder()
                .setLatLong(40.748672, -73.985628)  // Initial Latitude and Longitude the Map will load into
                .showLatLong(true)  // Show Coordinates in the Activity
                .setMapZoom(12.0f)  // Map Zoom Level. Default: 14.0
                .setAddressRequired(true) // Set If return only Coordinates if cannot fetch Address for the coordinates. Default: True
                .hideMarkerShadow(true) // Hides the shadow under the map marker. Default: False
                .setMarkerDrawable(R.drawable.marker) // Change the default Marker Image
                .setMarkerImageImageColor(R.color.colorPrimary)
                .setFabColor(R.color.fabColor)
                .setPrimaryTextColor(R.color.primaryTextColor) // Change text color of Shortened Address
                .setSecondaryTextColor(R.color.secondaryTextColor) // Change text color of full Address
                .setBottomViewColor(R.color.bottomViewColor) // Change Address View Background Color (Default: White)
                .setMapRawResourceStyle(R.raw.map_style)  //Set Map Style (https://mapstyle.withgoogle.com/)
                .setMapType(MapType.NORMAL)
                .setPlaceSearchBar(true, GOOGLE_API_KEY) //Activate GooglePlace Search Bar. Default is false/not activated. SearchBar is a chargeable feature by Google
                .onlyCoordinates(true)  //Get only Coordinates from Place Picker
                .hideLocationButton(true)   //Hide Location Button (Default: false)
                .disableMarkerAnimation(true)   //Disable Marker Animation (Default: false)
                .build(this)
            startActivityForResult(intent, Constants.PLACE_PICKER_REQUEST)
  1. Then get the data onActivityResult
override fun onActivityResult(requestCode: Int,resultCode: Int,data: Intent?) {
        if (requestCode == Constants.PLACE_PICKER_REQUEST) {
            if (resultCode == Activity.RESULT_OK) {
            val addressData = data?.getParcelableExtra<AddressData>(Constants.ADDRESS_INTENT)
            }
        } else {
            super.onActivityResult(requestCode, resultCode, data)
        }
    }

Note: Placepicker DOES NOT access your location. It's your app's responsibility to fet and provide the User's location and send via setLatLong. The MyLocation button takes the user in the sent location

Note: PlacePickerActivity uses the default theme of your app. If you want to change the theme, declare it in your app's Manifest:

<activity
    android:name="com.sucho.placepicker.PlacePickerActivity"
    android:theme="@style/PlacePickerTheme"/> //Included FullScreen Day-Night Theme

If you are using Java instead of Kotlin:

Intent intent = new PlacePicker.IntentBuilder()
                ...
                
                startActivityForResult(intent, Constants.PLACE_PICKER_REQUEST);
                
                ...

@Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        if (requestCode == Constants.PLACE_PICKER_REQUEST) {
            if (resultCode == Activity.RESULT_OK && data != null) {
              AddressData addressData = data.getParcelableExtra(Constants.ADDRESS_INTENT);
            }
        } else {
            super.onActivityResult(requestCode, resultCode, data);
        }
    }

Changelog

[0.1.7]

  • Option of Map Type (Normal, Satellite, Terrain, Hybrid, None)
  • Map Styling

[0.1.8]

  • Option disable bottom sheet animation
  • Option to get only coordinates from Place Picker

[1.0.0]

  • Added My Location Button
  • Fixed Map Marker not precise
  • Fixed Bottom Sheet

[1.1.0]

  • Added Optional Search Bar

[1.1.1]

  • Ability to add custom theme to PlacePickerActivity
  • Change bottom address layout background color

[1.1.2]

  • Ability to disable Marker Animation
  • Ability to disable Location button

Note: This is inspired from Mapbox Android Place Picker plugin. Code and UI has been reused from the open source library hosted on Github. Their copyright license has been added here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].