Ionic-native-google-maps: Unable To Call Remove or Clear Methods

Created on 1 Sep 2018  路  4Comments  路  Source: ionic-team/ionic-native-google-maps

I'm submitting a ... (check one with "x")

  • [ ] question
  • [x] any problem or bug report
  • [ ] feature request

If you choose 'problem or bug report', please select OS: (check one with "x")

  • [ ] Android
  • [ ] iOS
  • [X] Browser

cordova information: (run $> cordova plugin list)

com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-googlemaps 2.4.2-beta-20180830-1203 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.1.0 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"

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:
Calling any of the remove or clear methods (map.clear(), marker.remove(), polyline.remove()) results in an error.
ERROR Error: Uncaught (in promise): TypeError: plugin.constructor.getPluginRef is not a function

Expected behavior:
Calling any of the remove or clear methods should remove their respective item.

Screen capture or video record:
https://streamable.com/0oo8m

Related code, data or error log (please format your code or data):
myPolyline.remove(); myMarker.remove(); myMap.clear();

The person who share your project files on Github (or other git repository) is in faster lane than other people.
Please share your project files on Github or others(Bitbucket, Gitlabs...etc).
If you don't want to share your project files, please create a demo project, then share it.

Screen captures, and/or native logs(such as Logcat, xcode logs) are appreciate.

Giving much information, you are waiting time is less.
Thank you for your cooperation.
bug fixed

Most helpful comment

Thank you for sharing your project files. It's perfect to inspect the problem.
I fixed the bugs, and released it as @ionic-native/[email protected].
Please reinstall it.

https://www.npmjs.com/package/@ionic-native/google-maps/v/5.0.0-beta.21

$> npm uninstall @ionic-native/google-maps

$> npm install @ionic-native/[email protected]

All 4 comments

Please share your project files on Github.

The error comes from @InstanceCheck() decorator.
https://github.com/ionic-team/ionic-native-google-maps/blob/4ab9ac3ac9dc0d5f50721f4e666da6a65275713e/src/%40ionic-native/plugins/google-maps/index.ts#L2582-L2597

In order to inspect more deeply, please share your project files on Github.

Thank you for sharing your project files. It's perfect to inspect the problem.
I fixed the bugs, and released it as @ionic-native/[email protected].
Please reinstall it.

https://www.npmjs.com/package/@ionic-native/google-maps/v/5.0.0-beta.21

$> npm uninstall @ionic-native/google-maps

$> npm install @ionic-native/[email protected]
Was this page helpful?
0 / 5 - 0 ratings

Related issues

chandraahmad picture chandraahmad  路  9Comments

olrtg picture olrtg  路  6Comments

kiranpatel11 picture kiranpatel11  路  3Comments

imrranbadshah picture imrranbadshah  路  5Comments

nick-kisanhub picture nick-kisanhub  路  3Comments