Share via


Geocoder.GetFromLocationName Method

Definition

Overloads

GetFromLocationName(String, Int32, Double, Double, Double, Double, Geocoder+IGeocodeListener)
GetFromLocationName(String, Int32, Double, Double, Double, Double)

Returns an array of Addresses that attempt to describe the named location, which may be a place name such as "Dalvik, Iceland", an address such as "1600 Amphitheatre Parkway, Mountain View, CA", an airport code such as "SFO", and so forth.

GetFromLocationName(String, Int32)

Returns an array of Addresses that attempt to describe the named location, which may be a place name such as "Dalvik, Iceland", an address such as "1600 Amphitheatre Parkway, Mountain View, CA", an airport code such as "SFO", and so forth.

GetFromLocationName(String, Int32, Geocoder+IGeocodeListener)

GetFromLocationName(String, Int32, Double, Double, Double, Double, Geocoder+IGeocodeListener)

[Android.Runtime.Register("getFromLocationName", "(Ljava/lang/String;IDDDDLandroid/location/Geocoder$GeocodeListener;)V", "", ApiSince=33)]
public void GetFromLocationName (string locationName, int maxResults, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude, Android.Locations.Geocoder.IGeocodeListener listener);
[<Android.Runtime.Register("getFromLocationName", "(Ljava/lang/String;IDDDDLandroid/location/Geocoder$GeocodeListener;)V", "", ApiSince=33)>]
member this.GetFromLocationName : string * int * double * double * double * double * Android.Locations.Geocoder.IGeocodeListener -> unit

Parameters

locationName
String
maxResults
Int32
lowerLeftLatitude
Double
lowerLeftLongitude
Double
upperRightLatitude
Double
upperRightLongitude
Double
Attributes

Applies to

GetFromLocationName(String, Int32, Double, Double, Double, Double)

Returns an array of Addresses that attempt to describe the named location, which may be a place name such as "Dalvik, Iceland", an address such as "1600 Amphitheatre Parkway, Mountain View, CA", an airport code such as "SFO", and so forth.

[Android.Runtime.Register("getFromLocationName", "(Ljava/lang/String;IDDDD)Ljava/util/List;", "")]
public System.Collections.Generic.IList<Android.Locations.Address>? GetFromLocationName (string locationName, int maxResults, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude);
[<Android.Runtime.Register("getFromLocationName", "(Ljava/lang/String;IDDDD)Ljava/util/List;", "")>]
member this.GetFromLocationName : string * int * double * double * double * double -> System.Collections.Generic.IList<Android.Locations.Address>

Parameters

locationName
String

a user-supplied description of a location

maxResults
Int32

max number of addresses to return. Smaller numbers (1 to 5) are recommended

lowerLeftLatitude
Double

the latitude of the lower left corner of the bounding box

lowerLeftLongitude
Double

the longitude of the lower left corner of the bounding box

upperRightLatitude
Double

the latitude of the upper right corner of the bounding box

upperRightLongitude
Double

the longitude of the upper right corner of the bounding box

Returns

a list of Address objects. Returns null or empty list if no matches were found or there is no backend service available.

Attributes

Exceptions

if locationName is null

if any latitude is less than -90 or greater than 90

if any longitude is less than -180 or greater than 180

if the network is unavailable or any other I/O problem occurs

Remarks

Returns an array of Addresses that attempt to describe the named location, which may be a place name such as "Dalvik, Iceland", an address such as "1600 Amphitheatre Parkway, Mountain View, CA", an airport code such as "SFO", and so forth. The returned addresses should be localized for the locale provided to this class's constructor.

You may specify a bounding box for the search results by including the latitude and longitude of the lower left point and upper right point of the box.

<p class="note"><strong>Warning:</strong> 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 <b>NOT</b> use this API for any safety-critical or regulatory compliance purposes.

<p class="warning"><strong>Warning:</strong> This API may hit the network, and may block for excessive amounts of time, up to 60 seconds or more. It's strongly encouraged to use the asynchronous version of this API. If that is not possible, this should be run on a background thread to avoid blocking other operations.</p>

This member is deprecated. Use #getFromLocationName(String, int, double, double, double, double, GeocodeListener) instead to avoid blocking a thread waiting for results.

Java documentation for android.location.Geocoder.getFromLocationName(java.lang.String, int, double, double, double, double).

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

GetFromLocationName(String, Int32)

Returns an array of Addresses that attempt to describe the named location, which may be a place name such as "Dalvik, Iceland", an address such as "1600 Amphitheatre Parkway, Mountain View, CA", an airport code such as "SFO", and so forth.

[Android.Runtime.Register("getFromLocationName", "(Ljava/lang/String;I)Ljava/util/List;", "")]
public System.Collections.Generic.IList<Android.Locations.Address>? GetFromLocationName (string locationName, int maxResults);
[<Android.Runtime.Register("getFromLocationName", "(Ljava/lang/String;I)Ljava/util/List;", "")>]
member this.GetFromLocationName : string * int -> System.Collections.Generic.IList<Android.Locations.Address>

Parameters

locationName
String

a user-supplied description of a location

maxResults
Int32

max number of results to return. Smaller numbers (1 to 5) are recommended

Returns

a list of Address objects. Returns null or empty list if no matches were found or there is no backend service available.

Attributes

Exceptions

if locationName is null

if the network is unavailable or any other I/O problem occurs

Remarks

Returns an array of Addresses that attempt to describe the named location, which may be a place name such as "Dalvik, Iceland", an address such as "1600 Amphitheatre Parkway, Mountain View, CA", an airport code such as "SFO", and so forth. The returned addresses should be localized for the locale provided to this class's constructor.

<p class="note"><strong>Warning:</strong> 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 <b>NOT</b> use this API for any safety-critical or regulatory compliance purposes.</p>

<p class="warning"><strong>Warning:</strong> This API may hit the network, and may block for excessive amounts of time, up to 60 seconds or more. It's strongly encouraged to use the asynchronous version of this API. If that is not possible, this should be run on a background thread to avoid blocking other operations.</p>

This member is deprecated. Use #getFromLocationName(String, int, GeocodeListener) instead to avoid blocking a thread waiting for results.

Java documentation for android.location.Geocoder.getFromLocationName(java.lang.String, int).

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

GetFromLocationName(String, Int32, Geocoder+IGeocodeListener)

[Android.Runtime.Register("getFromLocationName", "(Ljava/lang/String;ILandroid/location/Geocoder$GeocodeListener;)V", "", ApiSince=33)]
public void GetFromLocationName (string locationName, int maxResults, Android.Locations.Geocoder.IGeocodeListener listener);
[<Android.Runtime.Register("getFromLocationName", "(Ljava/lang/String;ILandroid/location/Geocoder$GeocodeListener;)V", "", ApiSince=33)>]
member this.GetFromLocationName : string * int * Android.Locations.Geocoder.IGeocodeListener -> unit

Parameters

locationName
String
maxResults
Int32
Attributes

Applies to