[MOD-2455] Ti.Map: iOS - Calling removeAllAnnotations when using clusters throws error
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2018-09-05T08:45:27.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Ti.Map iOS 3.1.1 |
Components | n/a |
Labels | clustering, ios, maps |
Reporter | Mike Stancliffe |
Assignee | Vijay Singh |
Created | 2018-08-20T18:58:11.000+0000 |
Updated | 2018-09-05T08:45:27.000+0000 |
Description
In the sample app click "add annotations" and then click "remove annotations". If you remove the 2 types of annotations separately, like I have commented out in the remove function, it seems to work without issue.
error should resemble
[ERROR] : Script Error {
[ERROR] : column = 29;
[ERROR] : line = 105;
[ERROR] : message = "Invalid type passed to function";
[ERROR] : nativeLocation = "-[TiMapViewProxy annotationFromArg:] (TiMapViewProxy.m:163)";
[ERROR] : nativeReason = "expected: Object, was: MKClusterAnnotation";
[ERROR] : nativeStack = "3 MapClustering problems 0x00000001089bd379 -[TiProxy throwException:subreason:location:] + 105\n4 MapClustering problems 0x0000000108ba880f -[TiMapViewProxy annotationFromArg:] + 347\n5 MapClustering problems 0x0000000108baaa9a -[TiMapViewProxy removeAllAnnotations:] + 406\n6 CoreFoundation 0x000000011139336c __invoking___ + 140\n7 CoreFoundation 0x0000000111393240 -[NSInvocation invoke] + 320\n8 MapClustering problems 0x00000001088f5cdd -[KrollMethod call:] + 2045\n9 MapClustering problems 0x00000001088f45a1 __KrollCallAsFunction_block_invoke + 49\n10 MapClustering problems 0x00000001089fb4bd TiThreadPerformOnMainThread + 77\n11 MapClustering problems 0x00000001088f424e KrollCallAsFunction + 702\n12 JavaScriptCore 0x000000010988b940 _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE4callEPNS_9ExecStateE + 512\n13 JavaScriptCore 0x0000000109996cd1 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateEPNS_11InstructionENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 577\n14 JavaScriptCore 0x000000010999ff4d llint_entry + 27269\n15 JavaScriptCore 0x00000001099992e0 vmEntryToJavaScript + 304\n16 JavaScriptCore 0x000000010982a1df _ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE + 127\n17 JavaScriptCore 0x00000001097f0871 _ZN3JSC11Interpreter11executeCallEPNS_9ExecStateEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 433\n18 JavaScriptCore 0x00000001094e14d2 _ZN3JSC12profiledCallEPNS_9ExecStateENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 178\n19 JavaScriptCore 0x00000001098eb29d JSObjectCallAsFunction + 461";
[ERROR] : sourceURL = "file:///Users/mikestancliffe/Library/Developer/CoreSimulator/Devices/36D76DE8-F88D-40AA-A46E-7D2B8BBD7247/data/Containers/Bundle/Application/4DAF6BFF-CEDD-4439-94A4-DA4293EAD45C/MapClustering%20problems.app/alloy/controllers/index.js";
[ERROR] : stack = " at [native code]\n at remove@file:///Users/mikestancliffe/Library/Developer/CoreSimulator/Devices/36D76DE8-F88D-40AA-A46E-7D2B8BBD7247/data/Containers/Bundle/Application/4DAF6BFF-CEDD-4439-94A4-DA4293EAD45C/MapClustering%20problems.app/alloy/controllers/index.js:105:29)";
[ERROR] : }
Attachments
File | Date | Size |
index.js | 2018-08-20T18:54:29.000+0000 | 1289 |
index.xml | 2018-08-20T18:54:45.000+0000 | 268 |
Hello, I have tested the issue. I was able to reproduce the issue on our end. Removing annotation does cause the issue as described. I will forward this to our engineering. Thanks.
PR - https://github.com/appcelerator-modules/ti.map/pull/246 Test Case -
[~cliff_stander] Can you please verify with https://github.com/appcelerator-modules/ti.map/releases (iOS-3.1.1) .Thanks!