[MOD-2374] iOS: Ti.Map - Crash when updating multiple annotations
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-05-20T06:37:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Map |
Labels | ios, ti.map |
Reporter | Luc-Edmond Gaspard |
Assignee | Vikas Goyal |
Created | 2017-11-24T21:11:14.000+0000 |
Updated | 2020-05-20T06:37:42.000+0000 |
Description
When updating a large number of annotations, the application closes without any message.
I attached an example, after 2 or 3 click on the update button, the app will crash.
Attachments
Hello, This is a valid bug, I was able to reproduce the issue with Map 3.0.1 version in SDK 6.3.0.GA in iOS 11 Simulator. The app crash with updating annotation without showing any error in the log. Thanks.
I just validated the issue and it was never supposed to work in the past as well. The reason is because (different to Android), iOS annotations cannot change their latitude / longitude but should re-add the annotations to redraw the map. This may work for a few annotations where Titanium tries to re-append each of them, but it was never implemented to work for multiple annotations, as the re-adding will occur for each latitude / longitude setter, so in this case 600 times. We can consider supporting this, but until now, re-add the annotations with the updated location properties. Read more about this common native iOS behavior here: - https://stackoverflow.com/questions/14131345/ios-refresh-annotations-on-mapview
PR: https://github.com/appcelerator-modules/ti.map/pull/292
Verified on below environment: *Mac OS X *= 10.15 *Node.js Version* = 12.16.0 *CLI Version* = 5.2.2 *iOS Simulator* = iPhone 11 Pro Max *iOS Version* = 13.3 *Xcode*=11.3.1 *SDK Version *= 9.1.0.v20200514121733 *ti.map version*= 3.3.1 (ios) Working fine so closing this ticket. (Attached log for reference)