Språk

Geocoder.GetFromLocationAsync Method

Definition

Overloads

Name Description
GetFromLocationAsync(Double, Double, Int32)

Returns a task that provides a list of addresses that attempt to describe the area immediately surrounding the given latitude and longitude.

GetFromLocationAsync(Double, Double, Int32, Geocoder+IGeocodeListener)

Provides a list of addresses that attempt to describe the area immediately surrounding the given latitude and longitude.

GetFromLocationAsync(Double, Double, Int32)

Returns a task that provides a list of addresses that attempt to describe the area immediately surrounding the given latitude and longitude.

public System.Threading.Tasks.Task<System.Collections.Generic.IList<Android.Locations.Address>?> GetFromLocationAsync(double latitude, double longitude, int maxResults);
member this.GetFromLocationAsync : double * double * int -> System.Threading.Tasks.Task<System.Collections.Generic.IList<Android.Locations.Address>>

Parameters

latitude
Double

the latitude a point for the search. Value is between -90.0f and 90.0f inclusive

longitude
Double

the longitude a point for the search. Value is between -180.0f and 180.0f inclusive

maxResults
Int32

max number of addresses to return. Smaller numbers (1 to 5) are recommended. Value is 1 or greater

Returns

A task whose result is a list of addresses, or null or an empty list if no matches were found or there is no backend service available.

Remarks

Provides a list of addresses that attempt to describe the area immediately surrounding the given latitude and longitude. The returned addresses should be localized for the locale provided to this class's constructor.

Warning: Geocoding services may provide no guarantees on availability or accuracy. Results are a best guess, and are not guaranteed to be meaningful or correct. Do NOT use this API for any safety-critical or regulatory compliance purposes.

Android reference for android.location.Geocoder.getFromLocation.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetFromLocationAsync(Double, Double, Int32, Geocoder+IGeocodeListener)

Provides a list of addresses that attempt to describe the area immediately surrounding the given latitude and longitude.

public System.Threading.Tasks.Task GetFromLocationAsync(double latitude, double longitude, int maxResults, Android.Locations.Geocoder.IGeocodeListener listener);
member this.GetFromLocationAsync : double * double * int * Android.Locations.Geocoder.IGeocodeListener -> System.Threading.Tasks.Task

Parameters

latitude
Double

the latitude a point for the search. Value is between -90.0f and 90.0f inclusive

longitude
Double

the longitude a point for the search. Value is between -180.0f and 180.0f inclusive

maxResults
Int32

max number of addresses to return. Smaller numbers (1 to 5) are recommended. Value is 1 or greater

listener
Geocoder.IGeocodeListener

a listener for receiving results. This value cannot be null.

Returns

A task for the call to the listener-based method. The geocoding result is delivered to the listener, not through the task.

Remarks

Provides a list of addresses that attempt to describe the area immediately surrounding the given latitude and longitude. The returned addresses should be localized for the locale provided to this class's constructor.

Warning: Geocoding services may provide no guarantees on availability or accuracy. Results are a best guess, and are not guaranteed to be meaningful or correct. Do NOT use this API for any safety-critical or regulatory compliance purposes.

Android reference for android.location.Geocoder.getFromLocation.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to