Service not available in geoCoder

后端 未结 3 1110
再見小時候
再見小時候 2020-12-04 20:15

I am able to get longitude and latitude but getting address i got an error.

public boolean onTouchEvent(MotionEvent event, MapView mapView)

{



        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 21:10

    GeoCoder service may/maynot be implemented as it is not part of core android framework. Check the documentation for GeoCoder here

    You need to use google APIs and parse the address from the json response for it to work on all the devices.

    A class for handling geocoding and reverse geocoding. Geocoding is the process of transforming a street address or other description of a location into a (latitude, longitude) coordinate. Reverse geocoding is the process of transforming a (latitude, longitude) coordinate into a (partial) address. The amount of detail in a reverse geocoded location description may vary, for example one might contain the full street address of the closest building, while another might contain only a city name and postal code. The Geocoder class requires a backend service that is not included in the core android framework. The Geocoder query methods will return an empty list if there no backend service in the platform. Use the isPresent() method to determine whether a Geocoder implementation exists.

提交回复
热议问题