nativescript-google-maps-sdk icon indicating copy to clipboard operation
nativescript-google-maps-sdk copied to clipboard

Class constructor View cannot be invoked without 'new'

Open foekall opened this issue 4 years ago • 3 comments

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)

foekall avatar Oct 28 '20 20:10 foekall

same.isuse

taothai avatar Oct 29 '20 06:10 taothai

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

MrSnoozles avatar Nov 07 '20 18:11 MrSnoozles

Try this soln https://github.com/dapriett/nativescript-google-maps-sdk/issues/433#issuecomment-704964585 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); ~~~~~~~~~~~~~~~

ebizcoAU avatar Nov 08 '20 12:11 ebizcoAU