Open manivelponnusamy opened 4 years ago
cordova-plugin-googlemaps 1.4.0 "
Out of support version
Hi,
Even if I use latest google maps plugin also getting the same above error.
v1 and v2 are completely different api.
Please try to use this plugin in a new project, and only this plugin to confirm your problem. Even if it doesn't work, please share the project files on GitHub.
As you may know, this plugin is used by many developers.
Hi,
I found the solution.
#Google Maps Rules
-keep class plugin.google.maps.** { *; }
_gmaps_cdv_
class is not removing from body and other div in Android app. So When we call map.remove(), we removed the _gmaps_cdv_
css class from body and other div using JavaScript. Now it is working perfectly. We are using the below code for initiate the map.map = plugin.google.maps.Map.getMap();
$timeout(function() { map.setDiv($element[0]); }, 1000);
I don't have any idea that why plugin is not removing `_gmapscdv' class properly when we go back from map page or when we call map.remove() method. One more thing, we are using directives to display maps, might be that is causing the issue, but. when we were using the older version of google maps plugin, we are not facing this issue.
Thank you for your updates.
The biggest difference of v1 and v2 is that the position of the map view.
In the v1, the map view is placed on <body>
.
Because of this, you can not put any HTML elements on the map, such as button, or you can not display a HTML dialog (such as modal).
In the v2, the map view is placed under the . It means behind the <body>
.
Because of this, you can put any HTML on the map, such as button, or display over the map, such as a dialog.
But can you guess how the app can detect the touch is for HTML or Map?
WebView can not. Because WebView manages only <html>
. MapView is out of <html>
.
Answer is this plugin.
In v2, this plugin manages all position, size, hierarchy of (most of) all HTML elements.
So, inside the v1 to v2, it becomes very complicated.
That's why the maps plugin can not cover the some cases like your code.
any update on this, didnt find any proper answer for this
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: I am developing Cordova app and am using this plugin to display google map. Recently I have upgraded my app Android API Level to 29 using Cordova Android version 9.0.0. I was using Android@8.0.0 (Android API Level 28) and google map is working fine. After upgrade my Cordova Android platform version to 9.0.0 and using AndroidX, google map is not working. And getting the below error
Even I tried with latest plugin also but it is not working. When I use Latest plugin and getting alert pop-up when device ready.
Expected behavior: Google map should work without any issue
Screen capture or video record:
Related code, data or error log (please format your code or data):