@@ -26,18 +26,18 @@ export class TripPlannerComponent implements OnInit {
2626 @Input ( ) private initialLat : number ;
2727 @Input ( ) private initialLng : number ;
2828
29- @ViewChild ( " pickupInput" )
29+ @ViewChild ( ' pickupInput' )
3030 public pickupInputElementRef : ElementRef ;
3131
32- @ViewChild ( " pickupOutput" )
32+ @ViewChild ( ' pickupOutput' )
3333 public pickupOutputElementRef : ElementRef ;
3434
3535 @ViewChild ( GMapsDirectionsService ) service : GMapsDirectionsService ;
3636
3737 constructor (
38- private ngZone : NgZone ,
39- private mapsAPILoader : MapsAPILoader ,
40- private gmapsApi : GoogleMapsAPIWrapper ,
38+ private ngZone : NgZone ,
39+ private mapsAPILoader : MapsAPILoader ,
40+ private gmapsApi : GoogleMapsAPIWrapper ,
4141 private _elementRef : ElementRef ) {
4242 }
4343
@@ -58,25 +58,25 @@ export class TripPlannerComponent implements OnInit {
5858 this . destinationInput = new FormControl ( ) ;
5959 this . destinationOutput = new FormControl ( ) ;
6060
61- //Update Map View
61+ // Update Map View
6262 this . setCurrentPosition ( ) ;
63-
64- //Load Autocomplete for Inputs
63+
64+ // Load Autocomplete for Inputs
6565 this . mapsAPILoader . load ( ) . then ( ( ) => {
66- let autocompleteInput = new google . maps . places . Autocomplete ( this . pickupInputElementRef . nativeElement , {
67- types : [ " address" ]
66+ const autocompleteInput = new google . maps . places . Autocomplete ( this . pickupInputElementRef . nativeElement , {
67+ types : [ ' address' ]
6868 } ) ;
6969
70- let autocompleteOutput = new google . maps . places . Autocomplete ( this . pickupOutputElementRef . nativeElement , {
71- types : [ " address" ]
70+ const autocompleteOutput = new google . maps . places . Autocomplete ( this . pickupOutputElementRef . nativeElement , {
71+ types : [ ' address' ]
7272 } ) ;
7373 this . setupPlaceChangedListener ( autocompleteInput , 'pickup' ) ;
7474 this . setupPlaceChangedListener ( autocompleteOutput , 'destination' ) ;
7575 } ) ;
7676 }
7777
7878 setCurrentPosition ( ) {
79- if ( " geolocation" in navigator ) {
79+ if ( ' geolocation' in navigator ) {
8080 navigator . geolocation . getCurrentPosition ( ( position ) => {
8181 this . latitude = position . coords . latitude ;
8282 this . longitude = position . coords . longitude ;
@@ -85,9 +85,9 @@ export class TripPlannerComponent implements OnInit {
8585 }
8686
8787 private setupPlaceChangedListener ( autocomplete :any , inputType :string ) {
88- autocomplete . addListener ( " place_changed" , ( ) => {
88+ autocomplete . addListener ( ' place_changed' , ( ) => {
8989 this . ngZone . run ( ( ) => {
90- let place : google . maps . places . PlaceResult = autocomplete . getPlace ( ) ;
90+ const place : google . maps . places . PlaceResult = autocomplete . getPlace ( ) ;
9191 if ( place . geometry === undefined ) {
9292 return ;
9393 }
0 commit comments