Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class constructor View cannot be invoked without 'new' #438

Open
foekall opened this issue Oct 28, 2020 · 3 comments
Open

Class constructor View cannot be invoked without 'new' #438

foekall opened this issue Oct 28, 2020 · 3 comments

Comments

@foekall
Copy link

foekall commented Oct 28, 2020

Hi,

is there any way to fix it? I am using Nativescript 7 with angular 10.

ERROR Error: Uncaught (in promise): TypeError: Class constructor View cannot be invoked without 'new'
JS: TypeError: Class constructor View cannot be invoked without 'new'
JS: at MapViewBase [as constructor] (file: node_modules/nativescript-google-maps-sdk/map-view-common.js:128:0)
JS: at new MapView (file: node_modules/nativescript-google-maps-sdk/map-view.android.js:14:0)
JS: at ViewUtil.createView (file: node_modules/@nativescript/angular/fesm2015/nativescript-angular.js:2583:0)
JS: at EmulatedRenderer.createElement (file: node_modules/@nativescript/angular/fesm2015/nativescript-angular.js:2783:0)
JS: at EmulatedRenderer.createElement (file: node_modules/@nativescript/angular/fesm2015/nativescript-angular.js:3000:0)
JS: at elementCreate (file: node_modules/@angular/core/fesm2015/core.js:7143:0)
JS: at Module.ɵɵelementStart (file: node_modules/@angular/core/fesm2015/core.js:14774:0)

@taothai
Copy link

taothai commented Oct 29, 2020

same.isuse

@MrSnoozles
Copy link

This plugin is unfortunately not yet compatible with {N}7.

@ebizcoAU
Copy link

ebizcoAU commented Nov 8, 2020

Try this soln #433 (comment)
unzip map.zip and replace the same files in /node_modules/nativescript-google-maps-sdk
But I have problem in the next stage when looking to "Auto-center map with multiple markers" with bound()
ERROR in src/app/monitor/monitor.component.ts:136:50 - error TS2339: Property 'gms' does not exist on type 'typeof android'.

136 let builder = new com.google.android.gms.maps.model.LatLngBounds.Builder();
~~~
src/app/monitor/monitor.component.ts:143:41 - error TS2339: Property 'gms' does not exist on type 'typeof android'.

143 let cu = com.google.android.gms.maps.CameraUpdateFactory.newLatLngBounds(bounds, padding);
~~~
src/app/monitor/monitor.component.ts:146:32 - error TS2304: Cannot find name 'GMSCoordinateBounds'.

146 var iosMapBounds = GMSCoordinateBounds.alloc().init();
~~~~~~~~~~~~~~~~~~~
src/app/monitor/monitor.component.ts:154:26 - error TS2304: Cannot find name 'GMSCameraUpdate'.

154 var update = GMSCameraUpdate.fitBoundsWithPadding(iosMapBounds, padding);
~~~~~~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants