[TIMOB-896] Android: Map addAnnotation throws NPE
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:54:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M05 |
Components | Android |
Labels | android, defect |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T02:38:44.000+0000 |
Updated | 2011-04-17T01:54:35.000+0000 |
Description
There are several places in ViewProxy.java (the map ViewProxy) that refer to the variable (field) named "view". That thing is never ever set anywhere. It's always null. The Atlanta KS test works because the annotations are passed at the time of createView and not added later.
Is there a work around for this? I have a map where users can filter the type of venue's they can see on the map, but that requires the map to remove current annotations and add new ones. This currently doesn't work on android.
I'm "in the code" anyway looking at #2154, so I'll have a look at this today.
Failcase app.js (don't worry about the UI, just run this as your app.js):
(from [7b2cd40ce89729fa4cd7bca5a3697ecd6d97e534]) [#896 status:fixed-in-qa] use peekView() and null checks to avoid NPEs when trying to set TiMapView properties or call methods https://github.com/appcelerator/titanium_mobile/commit/7b2cd40ce89729fa4cd7bca5a3697ecd6d97e534"> https://github.com/appcelerator/titanium_mobile/commit/7b2cd40ce897...
Added #2546 for a bigger issue, namely that pre-view-creation anything done with
.addAnnotation
and.removeAnnotation
(and maybe other stuff) is ignored.[INFO] Titanium SDK version: 1.5.0 (12/10/10 09:14 0c31e15) using provided sample. need to add it to bugtests