java.lang.Object | |
↳ | com.esri.android.map.LocationService |
Class providing UI support to display the current location of the device on a MapView. To get an instance of a
LocationService see getLocationService()
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Location |
getLocation()
Returns the current location in the spatial reference WGS1984 (WKID=4326).
| ||||||||||
LocationListener |
getLocationListener()
Gets the Android LocationListener instance.
| ||||||||||
int |
getMaxAccuracyCircleSize()
Gets the max accuracy circle size in meter.
| ||||||||||
float |
getOpacity()
Gets the opacity of the location symbol.
| ||||||||||
Point |
getPoint()
Returns the current coordinates in the map's spatial reference.
| ||||||||||
Symbol |
getSymbol()
Gets the symbol.
| ||||||||||
boolean |
isAccuracyCircleOn()
Checks if the accuracy circle is on.
| ||||||||||
boolean |
isAllowNetworkLocation()
Checks if the network provider is allowed to determine the current location.
| ||||||||||
boolean |
isAutoPan()
Checks if is auto pan.
| ||||||||||
boolean |
isBearingOn()
Checks if is bearing on.
| ||||||||||
boolean |
isStarted()
Checks if is started.
| ||||||||||
boolean |
isSymbolFound(float x, float y, int tolerance)
Checks if location symbol is found for the given coordinates and tolerance.
| ||||||||||
void |
pause()
Pause.
| ||||||||||
void |
registerDebugView(TextView debugView)
Register debug view.
| ||||||||||
void |
resume()
Resume.
| ||||||||||
void |
setAccuracyCircleOn(boolean accuracyCircleOn)
Enables/Disables the accuracy circle.
| ||||||||||
void |
setAllowNetworkLocation(boolean allowNetworkLocation)
Allow/disallow the usage of the network (cellular network and WiFi if available) to determine the current location.
| ||||||||||
void |
setAutoPan(boolean autoPan)
activate/deactivate the autoPan.
| ||||||||||
void |
setBearing(boolean bearing)
activate/deactivate the bearing representation.
| ||||||||||
void |
setLocationListener(LocationListener locationListener)
Sets the Android LocationListener instance.
| ||||||||||
void |
setMaxAccuracyCircleSize(int maxSize)
Sets the max accuracy circle size in meter.
| ||||||||||
void |
setOpacity(float opacity)
Sets the opacity of the location symbol.
| ||||||||||
void |
setSymbol(Symbol symbol)
Sets the symbol for location display.
| ||||||||||
void |
start()
Starts the LocationService.
| ||||||||||
void |
stop()
Stops the LocationService.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Returns the current location in the spatial reference WGS1984 (WKID=4326). Other information are available. see
Gets the Android LocationListener instance.
Gets the max accuracy circle size in meter.
Gets the opacity of the location symbol.
Returns the current coordinates in the map's spatial reference.
Point
containing the coordinates.Gets the symbol.
Checks if the accuracy circle is on.
Checks if the network provider is allowed to determine the current location.
Checks if is auto pan.
Checks if is bearing on.
Checks if is started.
Checks if location symbol is found for the given coordinates and tolerance.
x | the screen coordinate along x axis in pixels. |
---|---|
y | the screen coordinate along y axis in pixels. |
tolerance | tolerance in pixels. |
Pause.
Register debug view.
debugView | the debug view |
---|
Resume.
Enables/Disables the accuracy circle.
accuracyCircleOn | the accuracyCircleOn to set |
---|
Allow/disallow the usage of the network (cellular network and WiFi if available) to determine the current location.
allowNetworkLocation | the flag for the usage of the network (default: true) |
---|
activate/deactivate the autoPan.
autoPan | the flag for the autoPan (default: true) |
---|
activate/deactivate the bearing representation.
bearing | flag for the bearing (default: true) |
---|
Sets the Android LocationListener instance.
locationListener | the locationListener to set |
---|
Sets the max accuracy circle size in meter. If the location fix's accuracy is beyond this limit, the accuracy circle will not grow wider and the circle outline will become red.
maxSize | size in meter. |
---|
Sets the opacity of the location symbol.
Sets the symbol for location display.
symbol | the symbol to set |
---|
Starts the LocationService.
Stops the LocationService.