00.ionic4:10.ionic4とcapacitorでgps取得
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| 00.ionic4:10.ionic4とcapacitorでgps取得 [2019/09/01] – [tab1.page.tsの編集] adash333 | 00.ionic4:10.ionic4とcapacitorでgps取得 [2019/09/01] (現在) – [tab1.page.tsの編集] adash333 | ||
|---|---|---|---|
| 行 93: | 行 93: | ||
| // | // | ||
| + | export class Tab1Page { | ||
| + | latitude: number; | ||
| + | longitude: number; | ||
| + | constructor() { | ||
| + | this.getLocation(); | ||
| + | } | ||
| - | latitude: number; | + | async getLocation() { |
| - | longitude: number; | + | const position = await Geolocation.getCurrentPosition(); |
| - | + | this.latitude = position.coords.latitude; | |
| - | + | | |
| + | } | ||
| + | } | ||
| </ | </ | ||
00.ionic4/10.ionic4とcapacitorでgps取得.1567336418.txt.gz · 最終更新: 2019/09/01 by adash333
