Using component created from ionic-native google maps api on multiple pages


#1

Anyone tried creating an ionic-native google maps component and using it across multiple pages? My component is interactive on the first page I use it on. On all other pages the component does not respond to user interactions. Need help with identifying what the issue is.

I’ve raised a issue. Please refer https://github.com/ionic-team/ionic-native/issues/2240

The issue description has link to the github project repository and the steps to reproduce the issue.


#2

Try the multiple_maps branch.

$> git clone https://github.com/mapsplugin/cordova-plugin-googlemaps

$> git checkout multiple_maps

$> git pull

$> cd (project dir)

$> cordova plugin rm cordova-plugin-googlemaps

$> cordova plugin add (path to)/cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="..." --variable API_KEY_FOR_IOS="..." 

#3

Dear wf9a5m75,

Thanks for the reply. The map component is now interactive on iOS as well. However, there’s a new problem that I face now on iOS after using the multiple_maps plugin. Now if I navigate back to previous pages using the map component, the overlays on the map of these pages is cleared. The markers are not visible. The map is interactive but the marker is gone. This is only happening in iOS. Android app was anyway working, even without the multiple_maps plugin.


#4

Is this your repo?

I will check it tomorrow


#5

Yes… The repo does not use the multiple_maps plugin for now. I tried it locally. Do you want me to make changes to the repo?


#7

Hi. Did you get a chance to look into the issue?


#8

Thank you for waiting. I caught a cold during the holidays, so I finally checked your repo today.

I found the problem, and fixed it.
Please reinstall the plugin from the multiple_maps branch version.


#9

Thank you for helping out. The problem of markers disappearing is solved. The my_location_button of the map does not work now. I am facing this issue on iOS devices.


#10

You should reply how does not work the button in order to save other person time.


#11

The button click does not work. On click of the my_location_button, I fetch the device location and plot/move marker. This works on android but not on iOS. Sorry for the inconvenience; I’ll be more specific going ahead.


#12

Not reproduced the issue at all.
116688_compress