{ "id": "61528", "key": "TIMOB-896", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11230", "name": "Release 1.5.0 M05", "archived": true, "released": true, "releaseDate": "2010-12-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:35.000+0000", "created": "2011-04-15T02:38:44.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:35.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

There are several places in ViewProxy.java (the map ViewProxy)\nthat refer to the variable (field) named \"view\". That thing is\nnever ever set anywhere. It's always null. The Atlanta KS test\nworks because the annotations are passed at the time of createView\nand not added later.

{html}", "attachment": [], "flagged": false, "summary": "Android: Map addAnnotation throws NPE", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "124288", "author": { "name": "joshua", "key": "joshua", "displayName": "Joshua", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Is there a work around for this? I have a map where users can\nfilter the type of venue's they can see on the map, but that\nrequires the map to remove current annotations and add new ones.\nThis currently doesn't work on android.

{html}", "updateAuthor": { "name": "joshua", "key": "joshua", "displayName": "Joshua", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:45.000+0000", "updated": "2011-04-15T02:38:45.000+0000" }, { "id": "124289", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

I'm \"in the code\" anyway looking at #2154, so\nI'll have a look at this today.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:38:46.000+0000", "updated": "2011-04-15T02:38:46.000+0000" }, { "id": "124290", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Failcase app.js (don't worry about the UI, just run this as your\napp.js):

\n
\nvar dawson = Titanium.Map.createAnnotation({\n    latitude:48.199678,\n    longitude:16.395807,\n    title:\"Dawsonhaus\"\n});\n\nvar regionDefault = {latitude:48.199678,longitude:16.4,animate:true,latitudeDelta:0.04, longitudeDelta:0.04};\n\nvar mapview = Titanium.Map.createView({\n    mapType: Titanium.Map.STANDARD_TYPE,\n    region:regionDefault,\n    regionFit:true,\n    top: 50, left: 0, right: 0, bottom: 0,\n    userLocation:true\n});\n\nmapview.addAnnotation(dawson);\n
{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:38:46.000+0000", "updated": "2011-04-15T02:38:46.000+0000" }, { "id": "124291", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

(from [7b2cd40ce89729fa4cd7bca5a3697ecd6d97e534])\n[#896\nstatus:fixed-in-qa] use peekView() and null checks to avoid NPEs\nwhen trying to set TiMapView properties or call methods \nhttps://github.com/appcelerator/titanium_mobile/commit/7b2cd40ce897...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:38:47.000+0000", "updated": "2011-04-15T02:38:47.000+0000" }, { "id": "124292", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Added #2546 for a bigger issue, namely that\npre-view-creation anything done with .addAnnotation\nand .removeAnnotation (and maybe other stuff) is\nignored.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:38:47.000+0000", "updated": "2011-04-15T02:38:47.000+0000" }, { "id": "124293", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[INFO] Titanium SDK version: 1.5.0 (12/10/10\n09:14 0c31e15) using provided sample. need to add it to\nbugtests

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:38:47.000+0000", "updated": "2011-04-15T02:38:47.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }