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

marker.setIcon (*base64Image*) crashes ios version #399

Closed
schnuet opened this issue Feb 12, 2015 · 3 comments
Closed

marker.setIcon (*base64Image*) crashes ios version #399

schnuet opened this issue Feb 12, 2015 · 3 comments
Labels
Milestone

Comments

@schnuet
Copy link

schnuet commented Feb 12, 2015

Hello Masashi! First, many thanks for the awesome plugin. It is fast and works flawlessly - except for the error I just found:

When trying to set the icon of a marker to an base64 Image using the setIcon command, the app is terminated with an error message:
NSUnknownKeyException: this class is not key value code-compliant for the key url

The image was generated using the canvas.toDataUrl command.
Since there are no labels, I am writing text on my markers using that method.

I got my app running again using a workaround:
Everytime I want to change the icon, i remove the marker and create a new one at the same place using a different image.
That works, because setting the icon on creating doesn't pose any problem, even though I am using the same images when setting the icons.

On android, that problem doesn't exist, everything works fine.

Under iOS, I am developping unter Xcode 6.1.1 and Yosemite 10.10.1

I use the plugin with cordova and the ionic framework.

@wf9a5m75
Copy link
Member

Could you show me the whole error log?

@schnuet
Copy link
Author

schnuet commented Feb 12, 2015

Yes, of course. Sorry that I didn't earlier. Just finished the workaround when I thought that this might interest you.

015-02-12 23:46:21.869 parkpocket[1160:486482] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/7C3DCC4A-0BA5-4C9A-    A9E5-132C97DC8AE6/Library/Cookies/Cookies.binarycookies
2015-02-12 23:46:22.659 parkpocket[1160:486482] Multi-tasking -> Device: YES, App: YES
2015-02-12 23:46:22.685 parkpocket[1160:486482] Unlimited access to network resources
2015-02-12 23:46:22.857 parkpocket[1160:486482] [CDVTimer][keyboard] 0.170052ms
2015-02-12 23:46:23.241 parkpocket[1160:486482] [CDVTimer][splashscreen] 383.948982ms
2015-02-12 23:46:23.242 parkpocket[1160:486482] [CDVTimer][TotalPluginStartup] 385.367036ms
2015-02-12 23:46:24.088 parkpocket[1160:486482] Resetting plugins due to page load.
2015-02-12 23:46:25.148 parkpocket[1160:486482] Finished load of: file:///private/var/mobile/Containers/Bundle/Application/10F46F43-4320-4A50-8754-3245B195E28C/parkpocket.app/www/index.html#/app/search
2015-02-12 23:46:25.378 parkpocket[1160:486482] This app uses phonegap-googlemaps-plugin     version 1.2.4
2015-02-12 23:46:25.419 parkpocket[1160:486482] ---getMyLocaiton
2015-02-12 23:46:25.422 parkpocket[1160:486482] ---status=4
2015-02-12 23:46:25.423 parkpocket[1160:486482] ---status=authorized

  ( * some debug outputs from my code, then the error log after the call of setIcon: * )

2015-02-12 23:46:39.650 parkpocket[1160:486482] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSCFString 0x1571cdc00> valueForUndefinedKey:]: this class is not key value coding-compliant for the key url.'
*** First throw call stack:
(0x18436de48 0x194a600e4 0x18436dacc 0x1852080f4 0x1851550f0 0x1000e4090 0x1000e3cc8 0x18523ddf0 0x1843260e8 0x18432538c 0x18432343c 0x1842511f4 0x18d3e75a4 0x188b82784 0x1000af248 0x1950cea08)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

If you need more data, don't be afraid to ask - I might not be the best programmer, but I will try my best to assist you.

wf9a5m75 added a commit that referenced this issue Feb 16, 2015
@wf9a5m75 wf9a5m75 added the bug label Feb 16, 2015
@wf9a5m75 wf9a5m75 added this to the v1.2.5 milestone Feb 16, 2015
@wf9a5m75
Copy link
Member

Thank you for your report.
This issue is fixed in the test branch. Check it out.

$> cordova plugin rm plugin.google.maps
$> rm -rf  /platforms/ios/(your app)/Plugins/plugin.google.maps
$> cordova plugin add https://github.com/wf9a5m75/phonegap-googlemaps-plugin#test --variable API_KEY_FOR_ANDROID=... --variable API_KEY_FOR_IOS=...

wf9a5m75 added a commit that referenced this issue Mar 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants