Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kefahB committed Jan 11, 2022
0 parents commit 76f98f2
Show file tree
Hide file tree
Showing 956 changed files with 438,211 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
41 changes: 41 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.base.json"
},
"ignorePatterns": ["**/*"],
"plugins": ["@typescript-eslint", "@nrwl/nx"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"rules": {
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{ "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] }
]
}
]
},
"overrides": [
{
"files": ["*.tsx"],
"rules": {
"@typescript-eslint/no-unused-vars": "off"
}
}
]
}
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
node_modules
package-lock.json
yarn.lock

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

*.tgz
packages/**/angular/dist
14 changes: 14 additions & 0 deletions .history/apps/demo-angular/src/app.module_20211014172304.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { NativeScriptModule } from '@nativescript/angular';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HomeComponent } from './home.component';

@NgModule({
schemas: [NO_ERRORS_SCHEMA],
declarations: [AppComponent, HomeComponent],
bootstrap: [AppComponent],
imports: [NativeScriptModule, AppRoutingModule],
})
export class AppModule {}
20 changes: 20 additions & 0 deletions .history/apps/demo-angular/src/app.module_20220107124728.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { NativeScriptModule } from '@nativescript/angular';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HomeComponent } from './home.component';
import { isIOS } from '@nativescript/core';
declare var GMSServices: any;

if(isIOS) {
GMSServices.provideAPIKey("AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs");
}

@NgModule({
schemas: [NO_ERRORS_SCHEMA],
declarations: [AppComponent, HomeComponent],
bootstrap: [AppComponent],
imports: [NativeScriptModule, AppRoutingModule],
})
export class AppModule {}
20 changes: 20 additions & 0 deletions .history/apps/demo-angular/src/app.module_20220107125950.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { NativeScriptModule } from '@nativescript/angular';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HomeComponent } from './home.component';
import { isIOS } from '@nativescript/core';
declare var GMSServices: any;

if(isIOS) {
GMSServices.provideAPIKey("_YOUR_API_KEY_");
}

@NgModule({
schemas: [NO_ERRORS_SCHEMA],
declarations: [AppComponent, HomeComponent],
bootstrap: [AppComponent],
imports: [NativeScriptModule, AppRoutingModule],
})
export class AppModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ActionBar title="nativescript-google-maps" class="action-bar"> </ActionBar>
<StackLayout class="p-20">
<ScrollView class="h-full">
<StackLayout>
<Button text="Test nativescript-google-maps" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
</StackLayout>
</ScrollView>
</StackLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Component, NgZone } from '@angular/core';
import { DemoSharedNativescriptGoogleMaps } from '@demo/shared';
import { } from '@kefah/nativescript-google-maps';

@Component({
selector: 'demo-nativescript-google-maps',
templateUrl: 'nativescript-google-maps.component.html',
})
export class NativescriptGoogleMapsComponent {

demoShared: DemoSharedNativescriptGoogleMaps;

constructor(private _ngZone: NgZone) {}

ngOnInit() {
this.demoShared = new DemoSharedNativescriptGoogleMaps();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<GridLayout>
<MapView #mapView [latitude]="latitude" [longitude]="longitude"
[zoom]="zoom" [minZoom]="minZoom" [maxZoom]="maxZoom" [bearing]="bearing"
[tilt]="tilt" i-padding="50,50,50,50" [padding]="padding" (mapReady)="onMapReady($event)"
(markerSelect)="onMarkerEvent($event)" (markerBeginDragging)="onMarkerEvent($event)"
(markerEndDragging)="onMarkerEvent($event)" (markerDrag)="onMarkerEvent($event)"
(markerInfoWindowTapped)="onMarkerEvent($event)" (coordinateTapped)="onCoordinateTapped($event)"
(cameraChanged)="onCameraChanged($event)"
(cameraMove)="onCameraMove($event)"></MapView>
</GridLayout>
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { Component, NgZone } from '@angular/core';
import { DemoSharedNativescriptGoogleMaps } from '@demo/shared';
import { GoogleMaps, Marker, Position } from '@kefah/nativescript-google-maps';

@Component({
selector: 'demo-nativescript-google-maps',
templateUrl: 'nativescript-google-maps.component.html',
})


export class NativescriptGoogleMapsComponent {

demoShared: DemoSharedNativescriptGoogleMaps;

constructor(private _ngZone: NgZone) {}

ngOnInit() {
this.demoShared = new DemoSharedNativescriptGoogleMaps();
}

latitude = -33.86;
longitude = 151.20;
zoom = 8;
minZoom = 0;
maxZoom = 22;
bearing = 0;
tilt = 0;
padding = [40, 40, 40, 40];
mapView: GoogleMaps;

lastCamera: String;


//Map events
onMapReady(event) {
console.log('Map Ready');

this.mapView = event.object;

console.log("Setting a marker...");

var marker = new Marker();
marker.position = Position.positionFromLatLng(-33.86, 151.20);
marker.title = "Sydney";
marker.snippet = "Australia";
marker.userData = {index: 1};
this.mapView.addMarker(marker);
}

onCoordinateTapped(args) {
console.log("Coordinate Tapped, Lat: " + args.position.latitude + ", Lon: " + args.position.longitude, args);
}

onMarkerEvent(args) {
console.log("Marker Event: '" + args.eventName
+ "' triggered on: " + args.marker.title
+ ", Lat: " + args.marker.position.latitude + ", Lon: " + args.marker.position.longitude, args);
}

onCameraChanged(args) {
console.log("Camera changed: " + JSON.stringify(args.camera), JSON.stringify(args.camera) === this.lastCamera);
this.lastCamera = JSON.stringify(args.camera);
}

onCameraMove(args) {
console.log("Camera moving: " + JSON.stringify(args.camera));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { Component, NgZone } from '@angular/core';
import { DemoSharedNativescriptGoogleMaps } from '@demo/shared';
import { GoogleMaps, Marker, Position } from '@kefah/nativescript-google-maps';
import { registerElement } from '@nativescript/angular';

@Component({
selector: 'demo-nativescript-google-maps',
templateUrl: 'nativescript-google-maps.component.html',
})


// Important - must register MapView plugin in order to use in Angular templates
registerElement('MapView', () => GoogleMaps);

export class NativescriptGoogleMapsComponent {

demoShared: DemoSharedNativescriptGoogleMaps;

constructor(private _ngZone: NgZone) {}

ngOnInit() {
this.demoShared = new DemoSharedNativescriptGoogleMaps();
}

latitude = -33.86;
longitude = 151.20;
zoom = 8;
minZoom = 0;
maxZoom = 22;
bearing = 0;
tilt = 0;
padding = [40, 40, 40, 40];
mapView: GoogleMaps;

lastCamera: String;


//Map events
onMapReady(event) {
console.log('Map Ready');

this.mapView = event.object;

console.log("Setting a marker...");

var marker = new Marker();
marker.position = Position.positionFromLatLng(-33.86, 151.20);
marker.title = "Sydney";
marker.snippet = "Australia";
marker.userData = {index: 1};
this.mapView.addMarker(marker);
}

onCoordinateTapped(args) {
console.log("Coordinate Tapped, Lat: " + args.position.latitude + ", Lon: " + args.position.longitude, args);
}

onMarkerEvent(args) {
console.log("Marker Event: '" + args.eventName
+ "' triggered on: " + args.marker.title
+ ", Lat: " + args.marker.position.latitude + ", Lon: " + args.marker.position.longitude, args);
}

onCameraChanged(args) {
console.log("Camera changed: " + JSON.stringify(args.camera), JSON.stringify(args.camera) === this.lastCamera);
this.lastCamera = JSON.stringify(args.camera);
}

onCameraMove(args) {
console.log("Camera moving: " + JSON.stringify(args.camera));
}

}
Loading

0 comments on commit 76f98f2

Please sign in to comment.