Closed sverdlov closed 6 years ago
Please share your project files on GitHub.
Please share your project files on GitHub.
Thank you for sharing example project.
I just let you know, you need to use @ionic-native/core@beta
instead of @ionic-native/core
for ionic v4 beta.
"@ionic-native/core": "^4.12.2"
"@ionic-native/core": "^5.0.0-beta.17"
https://github.com/sverdlov/mapTest/blob/5cf7d6f82b4e57cdd6c94fd400106e010ecd44be/package.json#L23
I'm checking your project now.
I'll try again to be sure, but I've already tried it and had the same error
I already confirmed your issue, and I'm trying to fix the problem. Your inspection is correct.
Fixed: Please reinstall the @ionic-native/google-maps@5.0.0-beta.22
plugin
Fixed: Please reinstall the
@ionic-native/google-maps@5.0.0-beta.22
plugin
Now it works. Thank you so much)
I'm with this problem, using @ionic-native/google-maps@5.0.0-beta.23
, "@ionic-native/core": "^5.0.0-beta.20"
and not 22 but ok right?
I'm made one change of official doc, import using @ionic-native/google-maps/ngx
because when i'm use without ngx don't work and others native libs using ngx too.
My project are large and have login and password, but I will paste some important code here:
app.module.ts
import { GoogleMaps } from '@ionic-native/google-maps/ngx';
import { Geolocation } from '@ionic-native/geolocation/ngx';
providers: [
StatusBar,
SplashScreen,
GoogleMaps,
Geolocation,
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
]
map.component.html
<div id="map_canvas"></div>
map.component.ts
import { Component, Input, OnInit } from '@angular/core';
import { GoogleMap, GoogleMaps } from '@ionic-native/google-maps';
import { Platform } from '@ionic/angular';
@Component({
selector: 'app-map',
templateUrl: './map.component.html',
styleUrls: ['./map.component.scss']
})
export class MapComponent implements OnInit {
map: GoogleMap;
constructor(private platform: Platform,
private googleMaps: GoogleMaps) { }
ngOnInit() {
this.platform.ready().then(() => this.loadMap());
}
loadMap() {
this.map = this.googleMaps.create('map_canvas');
}
}
map.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { MapComponent } from './map.component';
@NgModule({
declarations: [MapComponent],
imports: [CommonModule],
exports: [MapComponent]
})
Can you help me with this information?
Found the problem, using 90% height in my case don't work, change to 150px and worked.
I'm getting this error now
Using:
"@ionic-native/core": "^5.0.0-beta.22",
"@ionic-native/google-maps": "^5.0.0-beta.25",
Importing from @ionic-native/google-maps/ngx
SCSS:
#map_canvas { width: 100%; height: 500px; }
I'm getting this error now
Using:
"@ionic-native/core": "^5.0.0-beta.22", "@ionic-native/google-maps": "^5.0.0-beta.25",
Importing from
@ionic-native/google-maps/ngx
SCSS:
#map_canvas { width: 100%; height: 500px; }
I am getting the same issue. I have tried everything from re-installing all components and libraries to making changes with the css/scss from 100% to 500 px. I am trying to put the div on a modal.
I'm getting this error now Using:
"@ionic-native/core": "^5.0.0-beta.22", "@ionic-native/google-maps": "^5.0.0-beta.25",
Importing from
@ionic-native/google-maps/ngx
SCSS:#map_canvas { width: 100%; height: 500px; }
I am getting the same issue. I have tried everything from re-installing all components and libraries to making changes with the css/scss from 100% to 500 px. I am trying to put the div on a modal.
Any updates on this?
I'm having the same problem when trying to use the div inside a modal. In a normal page, works fine...
You can not use this plugin in a modal.
Okay. Any way how I can implement it in a fixed way all across the application? - Modal or non modal?
This plugin displays the map view under the webview(browser).
You can not use this plugin in modal anyway.
I'm submitting a ... (check one with "x")
If you choose 'problem or bug report', please select OS: (check one with "x")
cordova information: (run
$> cordova plugin list
)If you use
@ionic-native/google-maps
, please tell the package.json (only@ionic-native/core
and@ionic-native/google-maps
are fine mostly) "@ionic-native/core": "^5.0.0-beta.17", "@ionic-native/google-maps": "^5.0.0-beta.21",Current behavior:
Using the tutorial materials provied at this link I've created a fresh project using Ionic Framework 4. Upon launch the following error appears in console:
Expected behavior:
According to the tutorial provided it should work out of the box.
Research done: After careful examination of this issue, I've found out that the problem lies within line 1010 of index.js of Ionic-native/google-maps
var targets = document.querySelectorAll('ion-router-outlet #' + element);
I use NavController instead of Ionic Router outlet, thats why my DOM don`t haveCan you fix that?