Compartir a través de


MediaRecorder.SetLocation(Single, Single) Method

Definition

Set and store the geodata (latitude and longitude) in the output file.

[Android.Runtime.Register("setLocation", "(FF)V", "GetSetLocation_FFHandler")]
public virtual void SetLocation (float latitude, float longitude);
[<Android.Runtime.Register("setLocation", "(FF)V", "GetSetLocation_FFHandler")>]
abstract member SetLocation : single * single -> unit
override this.SetLocation : single * single -> unit

Parameters

latitude
Single

latitude in degrees. Its value must be in the range [-90, 90].

longitude
Single

longitude in degrees. Its value must be in the range [-180, 180].

Attributes

Exceptions

if the given latitude or longitude is out of range.

Remarks

Set and store the geodata (latitude and longitude) in the output file. This method should be called before prepare(). The geodata is stored in udta box if the output format is OutputFormat.THREE_GPP or OutputFormat.MPEG_4, and is ignored for other output formats. The geodata is stored according to ISO-6709 standard.

Java documentation for android.media.MediaRecorder.setLocation(float, 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