Android Programming Press on the image to return to the main documentation page.

iLocation

List of types:

Geocoder
Location
LocationManager
Placemark

Geocoder

Provides services for converting between coordinates to addresses and vice versa.
Requests are sent in the background over the internet connection. The Complete event is raised when data
is available or if the request has failed.
Note that you should not send more than a single request at a time.

Events:

Complete (Success As Boolean, Placemarks As List)

Members:


  Initialize (EventName As String)

  IsInitialized As Boolean

  ResolveAddress (Address As String)

  ResolveCoordinate (Lat As Double, Lng As Double)

  Tag As Object

Members description:

Initialize (EventName As String)
Initializes the object and sets the sub that will handle the Complete event.
IsInitialized As Boolean
Tests whether this object was initialized.
ResolveAddress (Address As String)
Resolves the given string address. The complete event will be raised.
If the operation succeeded then there will be one or more Placemark objects in the list.
ResolveCoordinate (Lat As Double, Lng As Double)
Resolves the given coordinate (specified as latitude / longitude). The Complete event will be raised.
If the operation succeeded then there will be exactly one Placemark object in the list.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.

Location


Events:

None

Members:


  Accuracy As Double [read only]

  Altitude As Double [read only]

  Bearing As Double [read only]

  DistanceTo (TargetLocation As Location) As Double

  Initialize2 (Latitude As Double, Longitude As Double)

  IsInitialized As Boolean

  Latitude As Double [read only]

  Longitude As Double [read only]

  Speed As Double [read only]

  Tag As Object

  Time As Long [read only]

  VerticalAccuracy As Double [read only]

Members description:

Accuracy As Double [read only]
Horizontal accuracy measured in meters. Negative value means that Latitude and Longitude are invalid.
Altitude As Double [read only]
Altitude measured in meters. Only valid if VerticalAccuracy is non-negative.
Bearing As Double [read only]
Bearing angle (degrees). Only valid if value is non-negative.
DistanceTo (TargetLocation As Location) As Double
Calculates the distance in meters between the two locations.
Initialize2 (Latitude As Double, Longitude As Double)
Creates a new Location object that can be used for distance calculations.
IsInitialized As Boolean
Tests whether this object was initialized.
Latitude As Double [read only]
Latitude coordinate. Valid if Accuracy property is non-negative.
Longitude As Double [read only]
Longitude coordinate. Valid if Accuracy property is non-negative.
Speed As Double [read only]
Speed measured in meters per second. Only valid if value is non-negative.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Time As Long [read only]
Location time stamp.
VerticalAccuracy As Double [read only]
Vertical accuracy measured in meters. Negative value means that the altitude is invalid.

LocationManager


Events:

LocationChanged (Location1 As Location)
AuthorizationStatusChanged (Status As int)
LocationError
HeadingChanged (MagneticHeading As Double, TrueHeading As Double)
AllowCalibration As Boolean

Members:


  AUTHORIZATION_DENIED As Int [read only]

  AUTHORIZATION_NOT_DETERMINED As Int [read only]

  AUTHORIZATION_RESTRICTED As Int [read only]

  AuthorizationStatus As Int [read only]

  Initialize (EventName As String)

  IsAuthorized As Boolean [read only]

  LocationServicesEnabled As Boolean [read only]

  Start (MinimumDistance As Double)

  StartHeading

  Stop

  StopHeading

Members description:

AUTHORIZATION_DENIED As Int [read only]
Location services are disabled or the user denied access for this application.
AUTHORIZATION_NOT_DETERMINED As Int [read only]
Authorization status was not yet set.
AUTHORIZATION_RESTRICTED As Int [read only]
Application is not authorized and user is restricted from changing its state (parental control for example).
AuthorizationStatus As Int [read only]
Gets the current authorization status. It will be one of the three AUTHORIZATION constants or IsAuthorized will be true.
Initialize (EventName As String)
Initializes the object. The AuthorizationStatusChanged will be raised with the current status.
IsAuthorized As Boolean [read only]
Returns true if your app is authorized to access the location services.
LocationServicesEnabled As Boolean [read only]
Returns true if location services are enabled.
Start (MinimumDistance As Double)
Starts listening for the LocationChanged event.
If the authorization status is not yet determined then the user will be asked to approve it.
If location services are disabled then the user will be asked to enable location services.
The LocationChanged event will be raised with the last known location after this call and then when the location changes.
MinimumDistance - The minimum distance measured in meters, that will cause the LocationChanged event to fire. Pass 0 to receive all updates.
StartHeading
Starts listening for the HeadingChanged event.
Stop
Stops listening for the LocationChanged event.
StopHeading
Stops listening for the HeadingChanged event.

Placemark


Events:

None

Members:


  AdministrativeArea As String [read only]

  Country As String [read only]

  IsInitialized As Boolean

  Lat As Double [read only]

  Lng As Double [read only]

  Locality As String [read only]

  Name As String [read only]

  PostalCode As String [read only]

  SubLocality As String [read only]

  SubThoroughfare As String [read only]

  Tag As Object

  Thoroughfare As String [read only]

Members description:

AdministrativeArea As String [read only]
Gets the placemark state or province.
Country As String [read only]
Gets the placemark country.
IsInitialized As Boolean
Tests whether this object was initialized.
Lat As Double [read only]
Gets the placemark latitude coordinate.
Lng As Double [read only]
Gets the placemark longitude coordinate.
Locality As String [read only]
Gets the placemark city.
Name As String [read only]
Gets the placemark name.
PostalCode As String [read only]
Gets the placemark postal code.
SubLocality As String [read only]
Gets the placemark additional city-level information.
SubThoroughfare As String [read only]
Gets the placemark additional street-level information.
Tag As Object
Gets or sets the Tag object. This is a placeholder for any object you like to tie to this object.
Thoroughfare As String [read only]
Gets the placemark street address.
Top