| Package | Description |
|---|---|
| com.codename1.location |
Abstraction of location services (GPS/Geofencing etc.) providing user global positioning and monitoring over
such changes both in the foreground and background.
|
| com.codename1.maps |
The mapping API allows developers to use maps in their applications, add layers
on top of the map and to enhance the API with additional Layers, Providers and functionality.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Location |
LocationManager.getCurrentLocation()
Gets the current Location of the device, in most cases this uses the GPS.
|
Location |
LocationManager.getCurrentLocationSync()
Returns the current location synchronously, this is useful if you just want
to know the location NOW and don't care about tracking location.
|
Location |
LocationManager.getCurrentLocationSync(long timeout)
Returns the current location synchronously, this is useful if you just want
to know the location NOW and don't care about tracking location.
|
abstract Location |
LocationManager.getLastKnownLocation()
Gets the last known Location of the device.
|
Location |
Geofence.getLoc()
Gets the location of the Geofence.
|
| Modifier and Type | Method and Description |
|---|---|
Comparator<Location> |
Location.createDistanceCompartor()
Creates a comparator for sorting locations in order of increasing distance from the current
location.
|
| Modifier and Type | Method and Description |
|---|---|
static Comparator<Geofence> |
Geofence.createDistanceComparator(Location refPoint)
Creates a comparator for sorting Geofences from the given reference point.
|
double |
Location.getDistanceTo(Location l2)
Gets the distance in metres from the current location to another location.
|
void |
LocationListener.locationUpdated(Location location)
This method is been called by the system when Location is being updated
|
void |
GeofenceManager.Listener.locationUpdated(Location location)
Deprecated.
|
| Constructor and Description |
|---|
Geofence(String id,
Location loc,
int radius,
long expiration)
Constructor
|
| Constructor and Description |
|---|
MapComponent(MapProvider provider,
Location centerPosition,
int zoomLevel)
Deprecated.
Constructor
|
MapComponent(MapProvider provider,
Location centerPosition,
int zoomLevel,
boolean cacheEnabled)
Deprecated.
Constructor
|
Copyright © 2023. All rights reserved.