{ "id": "76536", "key": "TIMOB-4453", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-04-30T17:22:31.000+0000", "created": "2011-06-17T17:47:54.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "annotation", "mapview" ], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" }, { "id": "11260", "description": "", "name": "Release 1.6.2", "archived": true, "released": true, "releaseDate": "2011-04-20" }, { "id": "11367", "description": "", "name": "Release 1.7.1", "archived": true, "released": true, "releaseDate": "2011-06-21" }, { "id": "11971", "description": "iOS5 and select Android fixes", "name": "Release 1.7.3", "archived": true, "released": true, "releaseDate": "2011-10-18" } ], "issuelinks": [ { "id": "16959", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "89814", "key": "TIMOB-8675", "fields": { "summary": "Android: Clicking on pin displayed over a MapView causes a crash", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:39:48.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": "h3. The problem\r\nIf the annotation is clicked but it does not have a pincolor, the app crashes when clicked on it\r\nh3. Solution\r\nAdd a pincolor manually to the annotation\r\nh3. Code Sample\r\n{code}\r\nvar W = {};\r\nW.MapView = function(){\r\n\tvar win = Ti.UI.createWindow({\r\n\t\ttabBarHidden:true,\r\n\t\tfullscreen:false\r\n\t});\r\n\tvar data = [];\r\n\tdata.push(\r\n\t\tTi.Map.createAnnotation({\r\n\t\t\tlatitude:40.892651,\r\n\t\t\tlongitude:-74.001920,\r\n\t\t\ttitle:'title here',\r\n\t\t\tsubtitle:'sub title here'\r\n\t\t//\t, pincolor:Titanium.Map.ANNOTATION_GREEN\r\n\t\t})\r\n\t);\r\n\tvar map = Ti.Map.createView({\r\n\t\tregion:{\r\n\t\t\tlatitude:40.892651,\r\n\t\t\tlongitude:-74.001920,\r\n\t\t\tlatitudeDelta:0.1,\r\n\t\t\tlongitudeDelta:0.1\r\n\t\t},\r\n\t\tannotations:data\r\n\t});\r\n\r\n\twin.addEventListener('open', function(){\r\n\t\twin.add(map);\r\n\t});\r\n\treturn win;\r\n}\r\n\r\nW.MapView().open();\r\n{code}\r\nh3. To reproduce\r\n1. Run the code provided in app.js as is. Click on the pin. It will crash.\r\n2. Uncomment line 14 to give it a color. It will not crash.\r\n\r\nNote that when {{pincolor}} is set to a supported color, as per the list in [TiMapView.java|https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/map/src/ti/modules/titanium/map/TiMapView.java#L199], the app does not crash and the color renders correctly.\r\n\r\nWhen {{pincolor}} is set to a non-supported color, such as \"mycolor\", the app also does not crash and the rendered color defaults to yellow.\r\n\r\n", "attachment": [ { "id": "24953", "filename": "nullPointerException.txt", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-06T10:23:20.000+0000", "size": 7807, "mimeType": "text/plain" } ], "flagged": false, "summary": "Android - Crash when clicked on a mapview annotation without pincolor property", "creator": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "penrique", "key": "penrique", "displayName": "Pedro Enrique", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Android Emulator 2.2\r\nTi 1.6.3 1.7.0 1.7.1", "comment": { "comments": [ { "id": "162219", "author": { "name": "pyephyohan", "key": "pyephyohan", "displayName": "pyephyo han", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I also have some issue but your solution is not working for me.\r\nIf you don't mind, please take a look at here also \r\nhttp://developer.appcelerator.com/question/123964/map-crashes-when-clicking-twice-on-annotation-android", "updateAuthor": { "name": "pyephyohan", "key": "pyephyohan", "displayName": "pyephyo han", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-09T09:17:20.000+0000", "updated": "2011-08-09T09:17:20.000+0000" }, { "id": "169312", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This still exists in the latest 1.7.3", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-14T12:48:00.000+0000", "updated": "2011-10-14T12:48:00.000+0000" }, { "id": "178355", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Bug persists on 1.8.0.1. I get a Java NullPointerException in the console. See attachment.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-06T10:23:06.000+0000", "updated": "2012-01-06T10:23:06.000+0000" }, { "id": "179986", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Bug Still Valid.\r\nSDK: 1.9.0.v20120118184633, 1.8.0.1\r\nAndroid: V8/Rhino\r\nStudio: 1.0.8\r\nOS: Lion\r\nDevices Tested: Galaxy Nexus 4.0.2, Nexus S 2.3.6", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-19T17:31:08.000+0000", "updated": "2012-01-19T17:31:08.000+0000" }, { "id": "193237", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is a duplicate of TIMOB-8675 which has been resolved.", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-30T17:22:31.000+0000", "updated": "2012-04-30T17:22:31.000+0000" }, { "id": "414598", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:39:48.000+0000", "updated": "2017-03-21T22:39:48.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }