Udostępnij za pośrednictwem


Location.Speed Property

Definition

Returns the speed at the time of this location in meters per second. -or- Set the speed at the time of this location, in meters per second.

public virtual float Speed { [Android.Runtime.Register("getSpeed", "()F", "GetGetSpeedHandler")] get; [Android.Runtime.Register("setSpeed", "(F)V", "GetSetSpeed_FHandler")] set; }
[<get: Android.Runtime.Register("getSpeed", "()F", "GetGetSpeedHandler")>]
[<set: Android.Runtime.Register("setSpeed", "(F)V", "GetSetSpeed_FHandler")>]
member this.Speed : single with get, set

Property Value

speed at the time of this location

Attributes

Remarks

Property getter documentation:

Returns the speed at the time of this location in meters per second. Note that the speed returned here may be more accurate than would be obtained simply by calculating distance / time for sequential positions, such as if the Doppler measurements from GNSS satellites are taken into account.

This is only valid if #hasSpeed() is true.

Java documentation for android.location.Location.getSpeed().

Property setter documentation:

Set the speed at the time of this location, in meters per second.

Java documentation for android.location.Location.setSpeed(float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to