author Yermo Lamers, Flying Brick Software, LLC
 import { Component , OnInit , OnDestroy } from "@angular/core" ; import { RadSideDrawer } from "nativescript-ui-sidedrawer" ; import * as app from "tns-core-modules/application" ; import * as dialogs from "tns-core-modules/ui/dialogs" ; import { RouterExtensions } from "nativescript-angular/router" ; import { openAppSettings } from 'nativescript-advanced-permissions/core' ; import { hasLocationPermissions , requestLocationPermissions , isLocationEnabled } from 'nativescript-advanced-permissions/location' ; import { SETTINGS } from '../../../../../mapbox_config' ; /**
* Home Page - The Live Map
*
* This is the main page of the app that, when tracking, displays the current live ride.
*/ @ Component ( { selector : "home-page" , moduleId : module . id , templateUrl : "./home-page.component.html" } ) export class HomePageComponent implements OnInit , OnDestroy { settings : any = SETTINGS ; locationPermission : boolean = false ; eventHandlersRegistered : boolean = false ; distanceSubscription : any ; constructor ( private routerExtensions ) { console . log ( "HomePageComponent:constructor()" ) ; } ngOnInit ( ) { console . log ( "HomePageComponent:ngOnInit(): checking for location services." ) ; } link ngOnDestroy ( ) { } onDrawerButtonTap ( ) { const sideDrawer = < RadSideDrawer > app . getRootView ( ) ; sideDrawer . showDrawer ( ) ; } }