Ionic-native-google-maps: Can't use marker.remove() or map.clear() functions

Created on 2 Apr 2018  路  22Comments  路  Source: ionic-team/ionic-native-google-maps

I'm pushing markers to this array 'temp1' shown in the console, but I cant use .remove() function. I tested .getPosition() and .getId() functions and they worked.

Same problem with map.clear();

TypeError: Right-hand side of 'instanceof' is not an object

cbxe2

Most helpful comment

I updated 4.6.3. Try again please.

All 22 comments

Please share the project files that reproduce your issue 100% onto the GitHub

I've a bitbucket project how can I share it?

Please invite me to the bitbucket. My email address is open in my profile page.

Could you indicate the steps how to reproduce your issue in your app?
capture

Yes, if you tap on the blue arrow it will open a popover, then tap the first option it will open the map with some bus markers, but I can't remove them to update the markers array.

So how to update the array from UI?

And the map page is main_map.ts or cartao_map.ts?

Actually it's a loop function in pages/mapas/main_map.ts that updates it, the problem is in clearMarkersOnibus() function

Confirmed your issue.

Okay, please reinstall the @ionic-native/[email protected].

$> npm uninstall \@ionic-native/google-maps
$> npm install \@ionic-native/[email protected]

Reinstalled it with 4.6.2 but my project says "Cannot find module '@ionic-native/google-maps'".

Any idea?

You didn't install ionic-native/[email protected]. yet.

capturar

That's your environment problem, not plugin's bug.
My recommendation is to remove the node_modules folder, then reinstall all plugins again.

I'm not sure but it seems that 4.6.2 is not installing/compiling correctly because it shows the whole folders structure, while 4.6.1 shows only some js files...

Umm.

I updated 4.6.3. Try again please.

Thanks, now it's working!!!

I'm experiencing a similar issue on 5.0.0-beta.20. Getting this error when trying to call any remove or clear method.
ERROR Error: Uncaught (in promise): TypeError: plugin.constructor.getPluginRef is not a function

Any idea what might be causing this?

Please create a new issue instead of communicating in an old thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arihantdaga picture arihantdaga  路  3Comments

piernik picture piernik  路  3Comments

MohamedBesher picture MohamedBesher  路  10Comments

fadao23 picture fadao23  路  5Comments

nick-kisanhub picture nick-kisanhub  路  3Comments