Skip to content
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

MarkerCluster does not work with error "evaluating 'Object.keys(self._markerMap)'" #48

Closed
2 of 5 tasks
centvingt opened this issue Jul 12, 2018 · 8 comments
Closed
2 of 5 tasks

Comments

@centvingt
Copy link

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

  • question
  • any problem or bug report
  • feature request

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

  • Android
  • iOS

cordova information: (run $> cordova plugin list)

com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-googlemaps 2.3.6 "cordova-plugin-googlemaps"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

Current behavior:

I've installed the demo of ionic googlemaps (https://github.com/mapsplugin/ionic-googlemaps-quickdemo). I ran ionic cordova run ios -c. All pages work well, but not the MarkerCluster page: the map does not show up anymore, and I cannot see any pin or cluster. Here is the console print the error log above. I really need to be able to show the map, the pins and the clusters for my application which is based on geolocation: could you please help me?

Related code, data or error log (please format your code or data):

Unhandled Promise rejection: undefined is not an object (evaluating 'Object.keys(self._markerMap)') ; Zone: <root> ; Task: Promise.then ; Value: [object Object] keys@[native code]
remove@http://10.0.106.10:8100/plugins/cordova-plugin-googlemaps/www/MarkerCluster.js:307:21
clearObj@http://10.0.106.10:8100/plugins/cordova-plugin-googlemaps/www/Map.js:688:26
remove@http://10.0.106.10:8100/plugins/cordova-plugin-googlemaps/www/Map.js:697:11
http://10.0.106.10:8100/plugins/cordova-plugin-googlemaps/www/CordovaGoogleMaps.js:414:34 forEach@[native code] 
removeDomTree@http://10.0.106.10:8100/plugins/cordova-plugin-googlemaps/www/CordovaGoogleMaps.js:401:19 
http://10.0.106.10:8100/plugins/cordova-plugin-googlemaps/www/CordovaGoogleMaps.js:78:38 
run@http://10.0.106.10:8100/build/polyfills.js:3:9529 
http://10.0.106.10:8100/build/polyfills.js:3:19625 
runTask@http://10.0.106.10:8100/build/polyfills.js:3:10224 o@http://10.0.106.10:8100/build/polyfills.js:3:7281 promiseReactionJob@[native code]
@wf9a5m75
Copy link
Contributor

The error occurres when you manipulate the marker clustwr during map zooming. You can not do it.

@centvingt
Copy link
Author

Hi, thanks very much for your prompt answer. We deeply need your help in order to fix this issue.

Starting from the ionic-native-google-maps demonstration, I have removed the zooming function during the « creation » of the map, in the home.ts file:

capture d ecran 2018-07-12 a 18 23 24

Then, I have deleted the zooming parameter, during the creation of the map, in the marker-cluster.ts file:

capture d ecran 2018-07-12 a 18 23 36

The map and the cluster show up from time to time in the cluster page, but things do not remain stable and it eventually crashes, as shown in the .gif below.

180712_cluster

As you can see in this .gif, I neither manipulate the cluster, nor zoom. I only print the page and then it ends up with an error.

@wf9a5m75
Copy link
Contributor

Did you try on actual device?

@centvingt
Copy link
Author

Hi, indeed I have installed the application on an iPhone 5 with iOS 10.3.3, and the cluster makes the app crash too, on the iPhone.
I'm building the application with a MacBook Pro which is equipped with macOS 10.13.5.
The Node version I use is v10.4.1 and I also use NPM v6.1.0.

ghost pushed a commit to mapsplugin/cordova-plugin-googlemaps that referenced this issue Jul 13, 2018
@wf9a5m75 wf9a5m75 added the fixed label Jul 13, 2018
@wf9a5m75
Copy link
Contributor

wf9a5m75 commented Jul 13, 2018

Oh, wait.. hold on.

ghost pushed a commit to mapsplugin/cordova-plugin-googlemaps that referenced this issue Jul 13, 2018
@wf9a5m75
Copy link
Contributor

Ok, I fixed the problem. Please reinstall the cordova-plugin-googlemaps from the multiple_maps branch.

$> cordova plugin rm cordova-plugin-googlemaps

$> cordova plugin add https://github.com/mapsplugin/cordova-plugin-googlemaps#multiple_maps --variable ...

@wf9a5m75 wf9a5m75 changed the title Clusters do not show up on the map: 'undefined is not an object (evaluating 'Object.keys(self._markerMap)')' MarkerCluster does not work with error "evaluating 'Object.keys(self._markerMap)'" Jul 13, 2018
@centvingt
Copy link
Author

Hi, the bug seems to be fixed. Thanks very much for your quick reaction. I have sent you $100 by PayPal so that you can keep on updating this cool plugin. As things are ok now, I close the issue.

@wf9a5m75
Copy link
Contributor

Thank you for your donation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants