-
- 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, GpsStyleInfo style, GpsProviderType providerType)GpsLayer(Context context, GpsStyleInfo style, LocationProviderInterface initialLocationProvider)
-
Method Summary
Modifier and Type Method Description IntegergetPreferredPriority()LonggetPreferredInterval()final UnitregisterLifecycle(Lifecycle lifecycle)final LayerInterfaceasLayerInterface()final UnitupdatePosition(Coord position, Double horizontalAccuracyM)final UnitupdateHeading(Float angleHeading)final UnitsetMode(GpsMode mode)final UnitsetHeadingEnabled(Boolean enable)final UnitsetFollowInitializeZoom(Float zoom)final UnitchangeProviderType(Context context, GpsProviderType gpsProviderType)final UnitsetOnModeChangedListener(Function1<GpsMode, Unit> listener)final UnitsetOnClickListener(Function1<Coord, Unit> listener)UnitonLocationUpdate(Location newLocation)UnitonCompassUpdate(Float degrees)UnitmodeDidChange(GpsMode mode)UnitonPointClick(Coord coordinate)-
-
Constructor Detail
-
GpsLayer
GpsLayer(Context context, GpsStyleInfo style, GpsProviderType providerType)
-
GpsLayer
GpsLayer(Context context, GpsStyleInfo style, LocationProviderInterface initialLocationProvider)
-
-
Method Detail
-
getPreferredPriority
Integer getPreferredPriority()
-
getPreferredInterval
Long getPreferredInterval()
-
registerLifecycle
final Unit registerLifecycle(Lifecycle lifecycle)
-
asLayerInterface
final LayerInterface asLayerInterface()
-
updatePosition
final Unit updatePosition(Coord position, Double horizontalAccuracyM)
-
updateHeading
final Unit updateHeading(Float angleHeading)
-
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)
-
-
-
-