Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

433
Views
Error: No capturado (en promesa): Error: No hay proveedor para GoogleMaps

Estoy usando el marco iónico, pero al integrar Google Maps recibo este error: Error: No detectado (en promesa): Error: ¡No hay proveedor para GoogleMaps!

esta es mi clase de mapa:

 import { Component,ViewChild } from '@angular/core'; import { NavController,Platform } from 'ionic-angular'; import { App, MenuController } from 'ionic-angular'; import { GoogleMaps, GoogleMap, GoogleMapsEvent, LatLng, CameraPosition, MarkerOptions, Marker } from '@ionic-native/google-maps'; import { HttpModule } from '@angular/http'; import { NgModule } from '@angular/core'; @NgModule({ imports: [ HttpModule ]}) @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { map: GoogleMap; constructor(public platform: Platform,public navCtrl: NavController,app: App, menu: MenuController,private googleMaps: GoogleMaps) { menu.enable(true); platform.ready().then(() => { this.loadMap(); }); } @ViewChild('map') mapElement;

// Cargar mapa solo después de inicializar la vista loadMap(){

 let location = new LatLng(-34.9290,138.6010); this.map = new GoogleMap('map', { 'backgroundColor': 'white', 'controls': { 'compass': true, 'myLocationButton': true, 'indoorPicker': true, 'zoom': true }, 'gestures': { 'scroll': true, 'tilt': true, 'rotate': true, 'zoom': true }, 'camera': { 'latLng': location, 'tilt': 30, 'zoom': 15, 'bearing': 50 } }); this.map.on(GoogleMapsEvent.MAP_READY).subscribe(() => { console.log('Map is ready!'); }); }

}

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Debe agregar el proveedor al NgModule, es decir, module.ts en proveedores,

 providers: [ GoogleMaps ]
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!