cordova-plugin-googlemaps: ios app crash when using addMarkerCluster

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 [x ] iOS

cordova information: (run $> cordova plugin list)

com.googlemaps.ios 2.5.0 "Google Maps SDK for iOS"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin"
cordova-plugin-googlemaps 2.1.2-beta-20171122-1040 "cordova-plugin-googlemaps"
cordova-plugin-googleplus 5.1.1 "Google SignIn"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.3.0 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)@ionic-native/core”: “^4.3.3”, “@ionic-native/google-maps”: “^4.3.3”,

Current behavior:

Hello, I have an error. when I use addMarkerCluster. It draws markers but when I use a custom image for a marker at that time app crash with below error. it happens only ios. somebody can help this issue??

Expected behavior:

Screen capture or video record:

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


*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCache setObject:forKey:cost:]: attempt to insert nil value (key: http:/localhost:8080/var/containers/Bundle/Application/1E01FEE3-8DDB-4796-8CB6-196E881CA368/udc2.app/www/index.html#/menu/./assets/img/map/m1.png)'

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (10 by maintainers)

Most upvoted comments

You need to set url like this: www/assets/icons/cluster_icons/blue.png

Just if it helps someone. You get the same behavior on ios if you don’t specify the marker at all. i.e. if you leave our the icon property out all together. Just adding icon: 'red' fixed it for me.

@minortom The meaning of you get the error is you write wrong code for addEventListener()/on().

You didn’t specify the event listener function