ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

Runtime compiler is not loaded #299

Closed difrankode closed 4 years ago

difrankode commented 4 years ago

I'm submitting a ... (check one with "x")

If you choose 'problem or bug report', please select OS: (check one with "x")

cordova information: (run $> cordova plugin list)

cordova-plugin-advanced-http 2.4.1 "Advanced HTTP plugin"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-googlemaps 2.7.0 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
phonegap-plugin-barcodescanner 8.1.0 "BarcodeScanner"

log

main-es2015.99849edfd8a95c4de44f.js:1 ERROR Error: Uncaught (in promise): Error: Runtime compiler is not loaded
Error: Runtime compiler is not loaded
    at ss.es (main-es2015.99849edfd8a95c4de44f.js:1)
    at u.project (main-es2015.99849edfd8a95c4de44f.js:1)
    at u._tryNext (main-es2015.99849edfd8a95c4de44f.js:1)
    at u._next (main-es2015.99849edfd8a95c4de44f.js:1)
    at u.next (main-es2015.99849edfd8a95c4de44f.js:1)
    at main-es2015.99849edfd8a95c4de44f.js:1
    at a.invoke (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at Object.onInvoke (main-es2015.99849edfd8a95c4de44f.js:1)
    at a.invoke (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at s.run (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at v (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at v (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1
    at a.invokeTask (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at Object.onInvokeTask (main-es2015.99849edfd8a95c4de44f.js:1)
    at a.invokeTask (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at s.runTask (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at _ (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at c.invokeTask [as invoke] (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)
    at u (polyfills-es2015.b7df0baf1e1f4d7ce32f.js:1)

Current behavior: The map is show in a final step of an material steeper in a modal. when i trying to load the page where are the component, error is displayed

Related code, data or error log (please format your code or data):

in my google maps service:

createMap(element: string | HTMLElement){
    let mapOptions: GoogleMapOptions = {
      camera: {
         target: {
           lat: 6.6186908,
           lng: -66.3256507
         },
         zoom: 6,
         tilt: 30
       }
    };
    return GoogleMaps.create(element, mapOptions);
  }

in my component

@ViewChild('map_view', {static: false}) mapView:ElementRef;

....

ngAfterViewChecked(){
    if(!this.map && this.mapView.nativeElement.offsetParent ) 
      this.map = this.gMap.createMap( this.mapView.nativeElement )
}

component html

<div #map_view 
    class="map-container" 
    [class.show]="isShowMap"></div> 

page where i add the component (home)

<gmap-input-autocomplete
        id="origin"
        label="Direccion de inicio"
        placeholder="Av. Principal de los Cortijos, Caracas"
        [formGroup]="originControl"
      ></gmap-input-autocomplete>

home.module ´´´ @NgModule({ imports: [ CommonModule, FormsModule, ReactiveFormsModule, IonicModule, ServiceFormPageRoutingModule,

// Material modules
MatStepperModule,
MatButtonModule,
MatSliderModule,
MatFormFieldModule,
MatInputModule,

// others
GoogleMapsModule, <-- here load the component
ImageLoaderModule

], declarations: [ServiceFormPage] }) ´´´

open the modal

async openServiceForm(){
    const modal = await this.modalController.create({
      component: ServiceFormPage
    });
    return await modal.present();
}
wf9a5m75 commented 4 years ago

I have no idea. Please ask at the ionic forum instead of here