-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: undefined is not an object (evaluating 'targets[0].offsetHeight') #337
Comments
installed them into my ionic 5 project. When I call the google map it gives the error TypeError: undefined is not an object (evaluating 'targets[0].offsetHeight') |
Unable to trace it, and it is surprise, I gave the height of the div element where I am displaying the google map. |
Since too less information, I can't track the issue |
We would like to implement the google maps in our application, we have the proper license from google as well. <ion-button (click)="initMap()"> Submit
} in the typescript file import { //declaration for Google Map //calling the implemented method here //implemented method let mapOptions: GoogleMapOptions = { }; this.map.addMarker({ } When we ran the application, in the screen I clicked the submit button, then screen has no change, in the debug window the error is TypeError: undefined is not an object (evaluating 'targets[0].offsetHeight') I have searched whole internet, and tried different ways but no solution for this issue. |
We would like to implement the google maps in our application, we have the proper license from google as well. <ion-button (click)="initMap()"> Submit
in the typescript file import { //declaration for Google Map //calling the implemented method here //implemented method let mapOptions: GoogleMapOptions = { }; this.map.addMarker({ } When we ran the application, in the screen I clicked the submit button, then screen has no change, in the debug window the error is TypeError: undefined is not an object (evaluating 'targets[0].offsetHeight') I have searched whole internet, and tried different ways but no solution for this issue. |
I guess you try to open a map in dialog box, correct? |
No. It is not at all a dialog box. It should display on the screen only. The code snipped is ion-card. which will show it as a block of code. |
Hmm. My suggestion is that you try to start a fresh project for the test instead of implement the maps plugin into your app directly. |
Please share the small project on github. (And don't paste your code here) |
https://github.com/satsangamusa/GoogleMap.git is the small project I have committed the code now into git. Please look into ti. |
Please share the small project on github. (And don't paste your code here) |
Can anybody please give update on it? |
hi guys, I face this issue too |
I had this issue too. This worked for me:
|
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)Current behavior:
Expected behavior:
Screen capture or video record:
Related code, data or error log (please format your code or data):
The text was updated successfully, but these errors were encountered: