Module: Toybox::Position
位置情報のインターフェースを提供する
- Since : 1.0.0
- App Types :Widget, App
- Requires Permission : Positioning
Defined Under Namespace
定数
The GEO enum is used to retrieve coordinate information in various String representations.
- GEO_DEG = 0 : Degree Format, ddd.dddddd: 38.278652. Since : 1.0.0
- GEO_DM = 1 : Degree/Minute Format, dddmm.mmm: 38 27.865'. Since : 1.0.0
- GEO_DMS = 2 : Degree/Minute/Seconds Format, dddmmss: 38 27' 8“. Since : 1.0.0
- GEO_MGRS = 3 : Military Grid Reference System (MGRS): 4QFJ12345678. Since : 1.0.0
The QUALITY enum is used to represent the quality of GPS fix with which the Location information was calculated.
- QUALITY_NOT_AVAILABLE = 0 : GPS is not available. Since : 1.0.0
- QUALITY_LAST_KNOWN = 1 : The Location is based on the last known GPS fix. Since : 1.0.0
- QUALITY_POOR = 2 : The Location was calculated with a poor GPS fix. Only a 2-D GPS fix is available, likely due to a limited number of tracked satellites. Since : 1.0.0
- QUALITY_USABLE = 3 : GPS情報からい位置を計算している。 許容レベルで 3-D GPS 補正を使用。 Since : 1.0.0
- QUALITY_GOOD = 4 : 良好なGPS情報から位置を計算している。良好なHDOPで 3-D GPS 補正を使用。 Since : 1.0.0
- LOCATION_ONE_SHOT = 0 : One-time retrieval of Location. Since : 1.0.0
- LOCATION_CONTINUOUS = 1 : Register for Location updates. Since : 1.0.0
- LOCATION_DISABLE = 2 : Unregister for Location updates. Since : 1.0.0
Instance Method Summary
- (Object) enableLocationEvents(type, listener) : Request a location event with enableLocationEvents().
- (Location.Info) getInfo : Use getInfo() to retrieve the current Location.Info.
- (Location) parse(input, format) : Use parse() to parse an input string and convert it into a Location.
Instance Method Details
(Object) enableLocationEvents(type, listener)
Request a location event with enableLocationEvents().
- Parameters
- type : LOCATION_ONE_SHOT for a single location request, LOCATION_CONTINUOUS to enable location tracking, and LOCATION_DISABLE to turn off location tracking
- listener (Method) : Method object to call with location updates; receives a Position.Info as an argument
- Since : 1.0.0
(Location.Info) getInfo : Use getInfo() to retrieve the current Location.Info.
- Returns : (Location.Info) The Info object containing the current information
- Since : 1.0.0
(Location) parse(input, format)
Use parse() to parse an input string and convert it into a Location.
- Parameters
- input (String) : String to parse
- format : Coordinate format to use for parsing (Position.GEO_XXX constant)
- Returns : (Location) The Location object
- Since : 1.0.0
最終更新:2016年03月06日 21:05