com.mapsted.positioning.CoreApi.Location |
Use LocationManager to get data based on user location
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | CoreApi.Location.NearbyPropertiesChangedListener | Listener for changes in nearby properties | |||||||||
interface | CoreApi.Location.PositionAnimationListener | Listener for position animation to show user position movement. | |||||||||
interface | CoreApi.Location.PositionChangeListener | Listener for position change. | |||||||||
interface | CoreApi.Location.PositionVisibilityListener | Listener to show/hide user position |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean |
addNearbyPropertyChangeListener(CoreApi.Location.NearbyPropertiesChangedListener listener)
Add listener for changes in nearby properties
| ||||||||||
abstract boolean |
addPositionAnimationListener(CoreApi.Location.PositionAnimationListener listener)
add listener to get position for animation purpose.
| ||||||||||
abstract boolean |
addPositionChangeListener(CoreApi.Location.PositionChangeListener listener)
Get updates when user position changes
| ||||||||||
abstract boolean |
addPositionVisibilityChange(CoreApi.Location.PositionVisibilityListener listener)
add listener to get update about whether position should be visible or not
| ||||||||||
abstract void |
enableSnapBlueDotToRoute(boolean enable)
When enabled, if the user is in navigation mode and the blue dot is nearby the
routing path, it will attempt to snap the blue dot to the routing path
| ||||||||||
abstract IZone |
getCurrentUserZone()
Get an IZone where the user currently located.
| ||||||||||
abstract Position |
getLastKnownPosition()
get last known user position which may be null.
| ||||||||||
abstract boolean |
getLastPositionVisibility()
get last info about whether position should be visible or not.
| ||||||||||
abstract void |
getNearByEntities(Consumer<List<EntityZoneDistance>> callback)
Get list of nearby entities
| ||||||||||
abstract Set<Integer> |
getNearbyProperties()
Gets HashSet of nearby properties
| ||||||||||
abstract void |
getQuickRoughEstimate(Context context, FusedGpsLocationManager.Listener locationListener)
Get a quick fuzzy location.
| ||||||||||
abstract boolean |
hasInit()
Check if current user position exists or not.
| ||||||||||
abstract CoreApi.Heading |
heading()
Get access to heading-related information and utilities
| ||||||||||
abstract boolean | isSnapBlueDotToRouteEnabled() | ||||||||||
abstract boolean |
removeNearbyPropertyChangeListener(CoreApi.Location.NearbyPropertiesChangedListener listener)
remove listener
| ||||||||||
abstract boolean |
removePositionAnimationListener(CoreApi.Location.PositionAnimationListener listener)
remove listener
| ||||||||||
abstract boolean |
removePositionChangeListener(CoreApi.Location.PositionChangeListener listener)
remove listener
| ||||||||||
abstract boolean |
removePositionVisibilityChange(CoreApi.Location.PositionVisibilityListener listener)
remove listener
|
Add listener for changes in nearby properties
add listener to get position for animation purpose. This listener may get notified several times in a short period of time, so keep the logic only for ui update.
Get updates when user position changes
add listener to get update about whether position should be visible or not
When enabled, if the user is in navigation mode and the blue dot is nearby the routing path, it will attempt to snap the blue dot to the routing path
enable | whether or not to enable the feature |
---|
Get an IZone where the user currently located.
get last known user position which may be null.
get last info about whether position should be visible or not. May be null.
Get list of nearby entities
callback | with sorted list of EntityZoneDistance each containing entity's id information and distance to the user. This might return an empty list if user position is unknown.
|
---|
Gets HashSet of nearby properties
Get a quick fuzzy location.
Use this function when initializing the location because the accurate location takes a long time.
context | context |
---|---|
locationListener | LocationListener |
Check if current user position exists or not.
Get access to heading-related information and utilities
remove listener
remove listener
remove listener
remove listener