Let's say I have this main component:
import { Component } from "@angular/core";
@Component({
selector: "my-app",
templateUrl: "./layouts/main-layout.html"
})
export class AppComponent {
constructor(
){}
ngAfterViewInit() {
//console.log( com.google.android.gms.maps.CameraUpdateFactory );
}
}
How can I call the commented-out function, right there in app.component.ts?
Because it gives me "com" not found
error.
I have added dependencies { compile 'com.google.android.gms:play-services-maps:9.8.0' }
in App_Resources/Android/app.gradle
file.
I have also checked how nativescript-google-maps-sdk
plugin does it. It seems it does it the same way - it has its' own nativescript-google-maps-sdk/platforms/android/include.gradle
file, where it also defines the google play service maps from local android sdk, and in nativescript-google-maps-sdk/map-view.android.js
I see it is using such a command without problem:
var cameraUpdate = com.google.android.gms.maps.CameraUpdateFactory.newCameraPosition( cameraPosition );
Any insights much appreciated.