离子框架 - 谷歌地图错误

时间:2017-08-28 18:06:28

标签: angular google-maps cordova ionic-framework ionic3

我最近想知道几个月后我的应用程序正在建立我已经从离子2升级到Ionic 3.9.2,非常烦人我已经完成所有工作接受我的谷歌地图区。

我已按照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 {}

请参阅此文件中的谷歌地图导入。

如果有人可以提供帮助那就太好了, 感谢

1 个答案:

答案 0 :(得分:0)

您只需要导入GoogleMaps,其他则不需要。 你的代码是:

from xml.etree.ElementTree import ElementTree
import re
l=[]
tree = ElementTree()
tree.parse("YOURFILE.xml")
root = tree.getroot()

for parent in root.findall('.//content/..'):
    for child in parent.findall("content"):
        if(child.text != None):
            l.append(child.text)        

抱歉英文不好。