Ionic-3 Can't resolve all parameters for GoogleMap: (?, ?). at syntaxError
See original GitHub issueI’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:
- Created 6 years ago
- Comments:10 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://docs.google.com/presentation/d/1zlkmoSY4AzDJc_P4IqWLnzct41IqHyzGkLeyhlAxMDE/edit#slide=id.p
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…