deleted cause this is a sirius project

This commit is contained in:
Whizel 2019-04-07 04:47:12 +02:00
parent 29b066b836
commit f0b568b3fb
10 changed files with 1 additions and 72 deletions

View file

@ -6,8 +6,6 @@ import { AppComponent } from "./app.component";
import { HomePageComponent } from "./home-page/home-page.component"; import { HomePageComponent } from "./home-page/home-page.component";
import { MyButtonComponent } from './component/my-button/my-button.component'; import { MyButtonComponent } from './component/my-button/my-button.component';
import { NativeScriptHttpClientModule } from "nativescript-angular/http-client"; import { NativeScriptHttpClientModule } from "nativescript-angular/http-client";
import { MyLocationButtonComponent } from './component/locationButton/locationButton.component';
import { CameraButtonComponent } from './component/camera-button/camera-button.component';
import { ResultPageComponent } from './result-page/result-page.component'; import { ResultPageComponent } from './result-page/result-page.component';
// Uncomment and add to NgModule imports if you need to use two-way binding // Uncomment and add to NgModule imports if you need to use two-way binding
@ -32,9 +30,7 @@ import { ResultPageComponent } from './result-page/result-page.component';
], ],
declarations: [ declarations: [
AppComponent, AppComponent,
MyLocationButtonComponent,
MyButtonComponent, MyButtonComponent,
CameraButtonComponent,
ResultPageComponent, ResultPageComponent,
HomePageComponent, HomePageComponent,
], ],

View file

@ -1 +0,0 @@
/* Add mobile styles for the component here. */

View file

@ -1 +0,0 @@
<Button text="camera-button works!" class="btn btn-primary" (tap)="onTap()"></Button>

View file

@ -1,24 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { MyCameraService } from '../../services/my-camera-service';
@Component({
selector: 'ns-camera-button',
templateUrl: './camera-button.component.html',
styleUrls: ['./camera-button.component.css'],
moduleId: module.id,
})
export class CameraButtonComponent implements OnInit {
camera:MyCameraService = new MyCameraService();
constructor() { }
ngOnInit() {
}
onTap() {
this.camera.takePicture().then(
(res) => {console.log(res)}, () => {}
);
}
}

View file

@ -1 +0,0 @@
/* Add mobile styles for the component here. */

View file

@ -1,4 +0,0 @@
<StackLayout>
<Button text="{{title}}" class="btn btn-primary" (tap)="onTap($event)"></Button>
<Label text="{{lat}}"></Label>
</StackLayout>

View file

@ -1,29 +0,0 @@
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { TouchGestureEventData, GestureEventData } from 'tns-core-modules/ui/gestures'
import { MyGeoLocationService} from '../../services/my-geo-location.service';
@Component({
selector: 'ns-locationButton',
templateUrl: './locationButton.component.html',
styleUrls: ['./locationButton.component.css'],
moduleId: module.id,
})
export class MyLocationButtonComponent implements OnInit {
title = "Click to get location!";
lat = "start";
geoLocationService = new MyGeoLocationService();
@Output() tap: EventEmitter<GestureEventData> = new EventEmitter<GestureEventData>();
constructor() {
}
ngOnInit() {
}
onTap(args: GestureEventData): any {
this.tap.emit(args);
this.geoLocationService.getLocation().then(location => {
this.lat = ""+location.latitude;
}).catch(error => {
});
}
}

View file

@ -26,7 +26,6 @@ export class HomePageComponent implements OnInit {
} }
public toggleFlatEarth(args) { public toggleFlatEarth(args) {
console.log('Reached toggleFlatearch');
let firstSwitch = <Switch>args.object; let firstSwitch = <Switch>args.object;
if (firstSwitch.checked) { if (firstSwitch.checked) {
this.isEarthFlat = true; this.isEarthFlat = true;
@ -45,7 +44,6 @@ export class HomePageComponent implements OnInit {
} else { } else {
this.inAustralia = false; this.inAustralia = false;
appSettings.setBoolean("applicationinAustralia", false); appSettings.setBoolean("applicationinAustralia", false);
console.log('isEarthflat', this.isEarthFlat);
} }
} }
@ -55,7 +53,6 @@ export class HomePageComponent implements OnInit {
isEarthFlat: this.isEarthFlat, isEarthFlat: this.isEarthFlat,
inAustralia: this.inAustralia } inAustralia: this.inAustralia }
} }
//console.log('this is inAustralia', this.inAustralia, 'This is isEarthFlat', this.isEarthFlat);
this.routerExtensions.navigateByUrl("/result-page"), navigationExtras; this.routerExtensions.navigateByUrl("/result-page"), navigationExtras;
} }
} }

View file

@ -50,7 +50,6 @@ export class ResultPageComponent implements OnInit {
return this.cameraService.takePicture(). return this.cameraService.takePicture().
then(picture => { then(picture => {
this.image = JSON.stringify(picture); this.image = JSON.stringify(picture);
//console.log('this is picture in json', JSON.stringify(picture));
this.getLocation(); this.getLocation();
}) })
} }
@ -58,7 +57,6 @@ export class ResultPageComponent implements OnInit {
public getLocation(): any { public getLocation(): any {
this.geoLocationService.getLocation().then(location => { this.geoLocationService.getLocation().then(location => {
this.locationData = location; this.locationData = location;
//console.log('this is locationData', this.locationData);
this.submit(); this.submit();
}).catch(error => { }).catch(error => {
}); });
@ -74,11 +72,9 @@ private makePostRequest(): void {
flat_earth: appSettings.getBoolean("applicationIsEarthFlat", false), flat_earth: appSettings.getBoolean("applicationIsEarthFlat", false),
in_australia: appSettings.getBoolean("applicationinAustralia", false), }) in_australia: appSettings.getBoolean("applicationinAustralia", false), })
.subscribe(res => { .subscribe(res => {
console.log('This is res', res);
this.JSONObject = res; this.JSONObject = res;
this.isBusy = false; this.isBusy = false;
this.addToArray(); this.addToArray();
//console.log('THis is myreturnJSON', this.myReturnJSON);
}); });
} }

View file

@ -11,4 +11,4 @@ var app_module_1 = require("./app/app.module");
// so we provide a wrapper platform object, platformNativeScriptDynamic, // so we provide a wrapper platform object, platformNativeScriptDynamic,
// that sets up a NativeScript application and can bootstrap the Angular framework. // that sets up a NativeScript application and can bootstrap the Angular framework.
platform_1.platformNativeScriptDynamic().bootstrapModule(app_module_1.AppModule); platform_1.platformNativeScriptDynamic().bootstrapModule(app_module_1.AppModule);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm1haW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwR0FBMEc7QUFDMUcsMERBQTRFO0FBRTVFLCtDQUE2QztBQUU3QyxnRkFBZ0Y7QUFDaEYsMEVBQTBFO0FBQzFFLHNFQUFzRTtBQUN0RSx5REFBeUQ7QUFDekQseUVBQXlFO0FBQ3pFLHdFQUF3RTtBQUN4RSxtRkFBbUY7QUFDbkYsc0NBQTJCLEVBQUUsQ0FBQyxlQUFlLENBQUMsc0J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