Wiring up Google Maps Nativescript plugin with Angular 2

余生颓废 提交于 2019-12-02 01:08:44

You need to register the mapView tag name with the element-registry API e.g.:

https://github.com/NativeScript/nativescript-angular/blob/master/src/nativescript-angular/element-registry.ts#L70-L105

That API isn't documented yet, but we should fix that problem in the coming weeks.

I found that using this plugin with ns angualr 2 I had to manually add the applicationID to the build.gradle file in root/platforms/adnroid under:

android{
    defaultConfig{
        applicationId "org.nativescript.my_app_name"

This was after i used tns plugin add nativescript-google-sdk.

Otherwise the app was building successfully but when deployed would not install on device or emulator and checking the logcat, I find this odd as nativescript would not have you edit the build.gradle file ever. Now it works great using the code from other answer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!