2017-08-28 8 views
0

私は最近、数ヶ月後に私のアプリを構築することに不思議に思っています。イオン2からIonic 3.9.2にアップグレードしました。Ionic Framework - Google Map error

私はhttps://ionicframework.com/docs/native/google-maps/

での指示に従っているとインポートするときに、私は以下を得ます。私はこれを「プロバイダ」にインポートしています。

Import issue

import { NgModule, ErrorHandler } from '@angular/core'; 
import { BrowserModule } from '@angular/platform-browser'; 
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; 
import { MyApp } from './app.component'; 
import { AngularFireModule } from 'angularfire2'; 

import { IonicStorageModule } from '@ionic/storage'; 

import { 
GoogleMaps, 
GoogleMap, 
GoogleMapsEvent, 
LatLng, 
CameraPosition, 
MarkerOptions, 
Marker 
} from '@ionic-native/google-maps'; 

import { StatusBar } from '@ionic-native/status-bar'; 
import { SplashScreen } from '@ionic-native/splash-screen'; 

import { HttpModule } from '@angular/http'; 
import { AdMobFree } from '@ionic-native/admob-free'; 

// diretives and providers 
import { Loader } from '../providers/loader'; 
import { Nl2br } from '../pipes/nl2br'; 
import { HoursMinutesSeconds } from '../pipes/hours-minutes-seconds'; 
import { AuthenticatorService } from '../providers/authenticator'; 
import { Categories } from '../providers/categories'; 
import { Ionic2Rating } from 'ionic2-rating'; 

import { Geolocation } from '@ionic-native/geolocation'; 
import { SocialSharing } from '@ionic-native/social-sharing'; 
import { InAppBrowser } from '@ionic-native/in-app-browser'; 

// Custom pages generated by ionic generator 
import { HomePage } from '../pages/home/home'; 
import { SettingsPage } from '../pages/settings/settings'; 
import { ShoppingListPage } from '../pages/shopping-list/shopping-list'; 
import { TabsPage } from '../pages/tabs/tabs'; 
import { SearchPage } from '../pages/search/search'; 
import { DetailsPage } from '../pages/details/details'; 
import { CategoryPage } from '../pages/category/category'; 
import { IntroPage } from '../pages/intro/intro'; 

// Authentication 
import { LoginPage } from '../pages/authentication/login/login'; 
import { RegistrationPage } from '../pages/authentication/registration/registration'; 

import { Config } from './config' 

@NgModule({ 
    declarations: [ 
    MyApp, 
    HomePage, 
    TabsPage, 
    SearchPage, 
    ShoppingListPage, 
    DetailsPage, 
    CategoryPage, 
    SettingsPage, 
    LoginPage, 
    RegistrationPage, 
    Nl2br, 
    HoursMinutesSeconds, 
    Ionic2Rating, 
    IntroPage 
    ], 
    imports: [ 
    BrowserModule, 
    HttpModule, 
    IonicModule.forRoot(MyApp), 
    IonicStorageModule.forRoot(), 
    AngularFireModule.initializeApp(Config.FIREBASE_CONFIG) 
    ], 
    bootstrap: [IonicApp], 
    entryComponents: [ 
    MyApp, 
    HomePage, 
    TabsPage, 
    SearchPage, 
    ShoppingListPage, 
    CategoryPage, 
    DetailsPage, 
    LoginPage, 
    RegistrationPage, 
    SettingsPage, 
    IntroPage 
    ], 
    providers: [ 
    StatusBar, 
    Geolocation, 
    SocialSharing, 
    GoogleMaps, 
    GoogleMap, 
    GoogleMapsEvent, 
    LatLng, 
    CameraPosition, 
    MarkerOptions, 
    Marker, 
    InAppBrowser, 
    SplashScreen, 
    AdMobFree, 
    Loader, 
    AuthenticatorService, 
    Categories, 
    {provide: ErrorHandler, useClass: IonicErrorHandler} 
    ] 
}) 
export class AppModule {} 

このファイルでGoogleマップのインポートを参照してください。あなたが唯一のGoogleマップをインポートする必要が

誰もがそれは素晴らしいだろう手助けができれば、 おかげ

+0

コードを入力してください – JoeriShoeby

答えて

0

は、他のものは必要ありません。 あなたはコードしていることになります。

import { NgModule, ErrorHandler } from '@angular/core'; 
import { BrowserModule } from '@angular/platform-browser'; 
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular'; 
import { MyApp } from './app.component'; 
import { AngularFireModule } from 'angularfire2'; 

import { IonicStorageModule } from '@ionic/storage'; 

import {GoogleMaps} from '@ionic-native/google-maps'; 

import { StatusBar } from '@ionic-native/status-bar'; 
import { SplashScreen } from '@ionic-native/splash-screen'; 

import { HttpModule } from '@angular/http'; 
import { AdMobFree } from '@ionic-native/admob-free'; 

// diretives and providers 
import { Loader } from '../providers/loader'; 
import { Nl2br } from '../pipes/nl2br'; 
import { HoursMinutesSeconds } from '../pipes/hours-minutes-seconds'; 
import { AuthenticatorService } from '../providers/authenticator'; 
import { Categories } from '../providers/categories'; 
import { Ionic2Rating } from 'ionic2-rating'; 

import { Geolocation } from '@ionic-native/geolocation'; 
import { SocialSharing } from '@ionic-native/social-sharing'; 
import { InAppBrowser } from '@ionic-native/in-app-browser'; 

// Custom pages generated by ionic generator 
import { HomePage } from '../pages/home/home'; 
import { SettingsPage } from '../pages/settings/settings'; 
import { ShoppingListPage } from '../pages/shopping-list/shopping-list'; 
import { TabsPage } from '../pages/tabs/tabs'; 
import { SearchPage } from '../pages/search/search'; 
import { DetailsPage } from '../pages/details/details'; 
import { CategoryPage } from '../pages/category/category'; 
import { IntroPage } from '../pages/intro/intro'; 

// Authentication 
import { LoginPage } from '../pages/authentication/login/login'; 
import { RegistrationPage } from '../pages/authentication/registration/registration'; 

import { Config } from './config' 

@NgModule({ 
    declarations: [ 
    MyApp, 
    HomePage, 
    TabsPage, 
    SearchPage, 
    ShoppingListPage, 
    DetailsPage, 
    CategoryPage, 
    SettingsPage, 
    LoginPage, 
    RegistrationPage, 
    Nl2br, 
    HoursMinutesSeconds, 
    Ionic2Rating, 
    IntroPage 
    ], 
    imports: [ 
    BrowserModule, 
    HttpModule, 
    IonicModule.forRoot(MyApp), 
    IonicStorageModule.forRoot(), 
    AngularFireModule.initializeApp(Config.FIREBASE_CONFIG) 
    ], 
    bootstrap: [IonicApp], 
    entryComponents: [ 
    MyApp, 
    HomePage, 
    TabsPage, 
    SearchPage, 
    ShoppingListPage, 
    CategoryPage, 
    DetailsPage, 
    LoginPage, 
    RegistrationPage, 
    SettingsPage, 
    IntroPage 
    ], 
    providers: [ 
    StatusBar, 
    Geolocation, 
    SocialSharing, 
    GoogleMaps, 
    InAppBrowser, 
    SplashScreen, 
    AdMobFree, 
    Loader, 
    AuthenticatorService, 
    Categories, 
    {provide: ErrorHandler, useClass: IonicErrorHandler} 
    ] 
}) 
export class AppModule {} 
の悪い英語のため申し訳ありません