Android Placepicker 2019

折月煮酒 提交于 2020-01-11 12:14:10

问题


The Android Placepicker is deprecated since last month. How do i get or build a simple lat/long coordinates (place-)picker with the "new" Google Maps Platform (API)?


回答1:


Here's a codelab for building a place picker from scratch with nearbyPlaces query:

https://codelabs.developers.google.com/codelabs/location-places-android/




回答2:


Here is what i did.

I have used this tutorial to implement the mapView.

CodeLab Tutorial Link: https://codelabs.developers.google.com/codelabs/location-places-android/

But the above codelab does not allows user to move/drag the marker on map or select a definite location. It just lists all the nearby places to user's current location.

Link to my Solution: [SOLVED]How to Implement Place Picker in Android App after Deprecation of previous Maps SDK

Using my implementation,

  • user can get a mapView working
  • user can press a button to geolocate their current location
  • user can long-press on red-marker to move it on the map
  • on clicking the Button below mapView, it will return the exact co-ordinates of the place on which the marker is placed.


来源:https://stackoverflow.com/questions/57414445/android-placepicker-2019

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!