-
- All Implemented Interfaces:
-
androidx.lifecycle.LifecycleObserver,io.openmobilemaps.gps.compass.CompassUpdateListener,io.openmobilemaps.gps.providers.LocationUpdateListener
public final class GpsLayer extends GpsLayerCallbackInterface implements LifecycleObserver, LocationUpdateListener, CompassUpdateListener
-
-
Field Summary
Fields Modifier and Type Field Description private final IntegerpreferredPriorityprivate final LongpreferredInterval
-
Constructor Summary
Constructors Constructor Description GpsLayer(Context context, GpsStyleInfoInterface style, GpsProviderType providerType)GpsLayer(Context context, GpsStyleInfoInterface style, LocationProviderInterface initialLocationProvider)
-
Method Summary
-
-
Constructor Detail
-
GpsLayer
GpsLayer(Context context, GpsStyleInfoInterface style, GpsProviderType providerType)
-
GpsLayer
GpsLayer(Context context, GpsStyleInfoInterface style, LocationProviderInterface initialLocationProvider)
-
-
Method Detail
-
getPreferredPriority
Integer getPreferredPriority()
-
getPreferredInterval
Long getPreferredInterval()
-
registerLifecycle
final Unit registerLifecycle(Lifecycle lifecycle)
-
asLayerInterface
final LayerInterface asLayerInterface()
-
setDrawPoint
final Unit setDrawPoint(Boolean enable)
-
setDrawHeading
final Unit setDrawHeading(Boolean enable)
-
enablePointRotationInvariant
final Unit enablePointRotationInvariant(Boolean enable)
-
updateStyle
final Unit updateStyle(GpsStyleInfoInterface styleInfo)
-
updatePosition
final Unit updatePosition(Coord position, Double horizontalAccuracyM)
-
updateHeading
final Unit updateHeading(Float angleHeading)
-
setModeWithRotationReset
final Unit setModeWithRotationReset(GpsMode mode, Boolean resetRotation)
-
setHeadingEnabled
final Unit setHeadingEnabled(Boolean enable)
-
setFollowInitializeZoom
final Unit setFollowInitializeZoom(Float zoom)
-
changeProviderType
final Unit changeProviderType(Context context, GpsProviderType gpsProviderType)
-
setOnModeChangedListener
final Unit setOnModeChangedListener(Function1<GpsMode, Unit> listener)
-
setOnClickListener
final Unit setOnClickListener(Function1<Coord, Unit> listener)
-
onLocationUpdate
Unit onLocationUpdate(Location newLocation)
-
onCompassUpdate
Unit onCompassUpdate(Float degrees)
-
modeDidChange
Unit modeDidChange(GpsMode mode)
-
onPointClick
Unit onPointClick(Coord coordinate)
-
-
-
-