question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ionic-3 Can't resolve all parameters for GoogleMap: (?, ?). at syntaxError

See original GitHub issue

I’m used IONIC-3 and Try to add Google MAP API for My university project I’m Already follow your instruction , but I have following error My error

Can’t resolve all parameters for GoogleMap: (?, ?). at syntaxError This is my code app.module.ts

import {GoogleMaps,GoogleMap} from '@ionic-native/google-maps';
@NgModule({

  providers: [
    GoogleMaps,
    GoogleMap,]

addproject.html

<div class="map">
<div id="map" style="height: 100%;"></div>
</div>

addproject.ts

import { Componen } from '@angular/core';
import { IonicPage, NavController, NavParams,ViewController, Platform } from 'ionic-angular';
     import {
     GoogleMaps,
     GoogleMap,
     GoogleMapsEvent,
     GoogleMapOptions,
     CameraPosition,
     MarkerOptions,
     Marker
    } from '@ionic-native/google-maps';


        @IonicPage()
        @Component({
          selector: 'page-addproject',
          templateUrl: 'addproject.html',
        })
        export class AddprojectPage {
          @ViewChild('map')
          private mapElement:ElementRef;
          private map:GoogleMap;
          private location:LatLng;
      ionViewDidLoad() {
       this.loadMap();
   }
      map: GoogleMap;
      constructor(private googleMaps: GoogleMaps) { }
     loadMap() {

        let mapOptions: GoogleMapOptions = {
          camera: {
            target: {
              lat: 43.0741904,
              lng: -89.3809802
            },
            zoom: 18,
            tilt: 30
          }
        };

        this.map = this.googleMaps.create('map_canvas', mapOptions);

        // Wait the MAP_READY before using any methods.
        this.map.one(GoogleMapsEvent.MAP_READY)
          .then(() => {
            console.log('Map is ready!');

            // Now you can use all methods safely.
            this.map.addMarker({
                title: 'Ionic',
                icon: 'blue',
                animation: 'DROP',
                position: {
                  lat: 43.0741904,
                  lng: -89.3809802
                }
              })
              .then(marker => {
                marker.on(GoogleMapsEvent.MARKER_CLICK)
                  .subscribe(() => {
                    alert('clicked');
                  });
              });

          });
      }
    }

how to fix that issue Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
battikacommented, Jan 17, 2018

Please check out the sample project written for Ionic 2/3: https://github.com/mapsplugin/ionic-googlemaps-quickdemo

In nutshell, you don’t even need to import GoogleMap…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Runtime Error Can't resolve all parameters for GoogleMap
I changed my app.module.ts file import {GoogleMaps,GoogleMap} from '@ionic-native/google-maps'; providers: [ StatusBar, SplashScreen, ...
Read more >
Error: Can't resolve all parameters for <Ionic Page>
Hi all! I have a crazy issue. I instantiated a custom provider in an Ionic Page, but it seems to be undefined. This...
Read more >
[Done]-Can't resolve all parameters for setupPlatform
Best coding solution for query Can't resolve all parameters for setupPlatform: (?, [object Object], [object Object]) error on ionic serve.
Read more >
Fixing the “can't resolve all parameters” exception with ...
Here's what the error looked like: Can't resolve all parameters for QuillConfigurationDirective: [object Object], (?). The (?) indicates that Angular couldn't ...
Read more >
Simple Ionic Login with Angular 2+ - Devdactic
Almost every mobile app nowadays has a login, and using Ionic 2 and Angular it's pretty easy to craft the UI and logic...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found