{ "id": "87855", "key": "TIMOB-7977", "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": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-05-01T15:12:10.000+0000", "created": "2012-03-13T13:39:55.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "regression" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [ { "id": "15813", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "88166", "key": "TIMOB-8081", "fields": { "summary": "iOS: Map - App dealing with setAnnotation crashes at launch", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "15800", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "85693", "key": "TIMOB-7467", "fields": { "summary": "iOS: Map Annotation Memory Leak", "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 } } } }, { "id": "16806", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "90706", "key": "TIMOB-8856", "fields": { "summary": "Android: Map Annotations - Multiple map annotations throws a NPE", "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": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T21:38:36.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4.Issue\r\nsetAnnotations method doesn't work properly starting from Titanium SDK 1.8.2\r\n\r\nh6.Titanium API\r\nhttp://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Map.View.setAnnotations-method.html\r\n\r\nh6.Steps to reproduce\r\n1. Throw to an app.js code below or import the attached project into Studio - Annotation.zip\r\n2. There's a map with 4 annotations, the first one has another image (a pin) than the other three (Titanium logo). \r\n3. By pressing one of the update buttons the corresponding annotation should get the pin image. \r\n\r\nh4.Expected behavior\r\nAnnotation image is set as per annotation being set (This works with Mobile SDK 1.7.5, 1.8.0.1)\r\n\r\n\r\n\r\nh4.Unexpected behavior\r\nAnnotation images are not set properly (not with 1.8.2, 1.9, 2.0)\r\n\r\n\r\n\r\nh4.Repro sequence\r\n{code:title=app.js}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n\r\nvar mountainView1 = Titanium.Map.createAnnotation({\r\n latitude:37.390749,\r\n longitude:-122.081651,\r\n // title:\"Appcelerator Headquarters\",\r\n subtitle:'Mountain View, CA',\r\n image:'map_pin.png',\r\n animate:true,\r\n leftButton: '../images/appcelerator_small.png',\r\n myid:1 // Custom property to uniquely identify this annotation.\r\n});\r\n \r\nvar mountainView2 = Titanium.Map.createAnnotation({\r\n latitude:37.380749,\r\n longitude:-122.071651,\r\n // title:\"Appcelerator Headquarters\",\r\n subtitle:'Mountain View, CA',\r\n image:'appicon.png',\r\n animate:true,\r\n leftButton: '../images/appcelerator_small.png',\r\n myid:1 // Custom property to uniquely identify this annotation.\r\n});\r\n \r\nvar mountainView3 = Titanium.Map.createAnnotation({\r\n latitude:37.370749,\r\n longitude:-122.061651,\r\n // title:\"Appcelerator Headquarters\",\r\n subtitle:'Mountain View, CA',\r\n image:'appicon.png',\r\n animate:true,\r\n leftButton: '../images/appcelerator_small.png',\r\n myid:1 // Custom property to uniquely identify this annotation.\r\n});\r\n \r\nvar mountainView4 = Titanium.Map.createAnnotation({\r\n latitude:37.360749,\r\n longitude:-122.051651,\r\n title:\"Appcelerator Headquarters\",\r\n subtitle:'Mountain View, CA',\r\n image:'appicon.png',\r\n animate:true,\r\n leftButton: '../images/appcelerator_small.png',\r\n myid:1 // Custom property to uniquely identify this annotation.\r\n});\r\n\r\nvar arr = [mountainView1, mountainView2, mountainView3, mountainView4];\r\n\r\nvar mapview = Titanium.Map.createView({\r\n mapType: Titanium.Map.STANDARD_TYPE,\r\n region: {latitude:37.375749, longitude:-122.066651, \r\n latitudeDelta:0.01, longitudeDelta:0.01},\r\n animate:true,\r\n regionFit:true,\r\n userLocation:true,\r\n annotations:arr\r\n});\r\n\r\nvar btnUpdate1 = Titanium.UI.createButton({\r\n title: 'Update anno 1',\r\n top: 1,\r\n left:0,\r\n width: 80,\r\n height: 50\r\n});\r\nbtnUpdate1.addEventListener('click',function(e)\r\n{\r\n updateAnnotations( 0 );\r\n});\r\n\r\nvar btnUpdate2 = Titanium.UI.createButton({\r\n title: 'Update anno 2',\r\n top: 1,\r\n left:80,\r\n width: 80,\r\n height: 50\r\n});\r\nbtnUpdate2.addEventListener('click',function(e)\r\n{\r\n updateAnnotations( 1 );\r\n});\r\n\r\nvar btnUpdate3 = Titanium.UI.createButton({\r\n title: 'Update anno 3',\r\n top: 1,\r\n left:160,\r\n width: 80,\r\n height: 50\r\n});\r\nbtnUpdate3.addEventListener('click',function(e)\r\n{\r\n updateAnnotations( 2 );\r\n});\r\n\r\nvar btnUpdate4 = Titanium.UI.createButton({\r\n title: 'Update anno 4',\r\n top: 1,\r\n left:240,\r\n width: 80,\r\n height: 50\r\n});\r\nbtnUpdate4.addEventListener('click',function(e)\r\n{\r\n updateAnnotations( 3 );\r\n});\r\n\r\n//\r\n// create base UI tab and root window\r\n//\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\nmapview.add(btnUpdate1, btnUpdate2, btnUpdate3, btnUpdate4);\r\nwin1.add(mapview);\r\n\r\n//\r\n// create controls tab and root window\r\n//\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 2',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n\r\n\r\n//\r\n// add tabs\r\n//\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\n\r\n// open tab group\r\ntabGroup.open();\r\n\r\n/**\r\n * @description Updates the image of a map annotation when user scrolls through the detail views below the map.\r\n * @param {Number} _i Annotations array index (MUST correspond with scrollable view pages index).\r\n * @returns {null}\r\n */\r\nfunction updateAnnotations( _i ) {\r\n\tfor (var i=0, l=arr.length; i < l; i++) {\r\n\t\tif ( i == _i) {\r\n\t\t\tarr[i].image = 'map_pin.png';\r\n\t\t\t// arr[_i].setImage( CM.global.DIR_RES_ICONS + 'map_pin_aktiv.png' );\r\n\t\t} else{\r\n\t\t\tarr[i].image = 'appicon.png';\r\n\t\t};\r\n\t};\r\n\r\n\tmapview.setAnnotations( arr );\r\n};\r\n{code}", "attachment": [ { "id": "26166", "filename": "AnnotationImage1.jpg", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-13T13:39:55.000+0000", "size": 56013, "mimeType": "image/jpeg" }, { "id": "26169", "filename": "Annotations.zip", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-13T13:39:55.000+0000", "size": 3653070, "mimeType": "application/zip" }, { "id": "26168", "filename": "appicon.png", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-13T13:39:55.000+0000", "size": 4275, "mimeType": "image/png" }, { "id": "26167", "filename": "map_pin.png", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-13T13:39:55.000+0000", "size": 1853, "mimeType": "image/png" }, { "id": "27329", "filename": "missing_annotations.png", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-20T16:38:20.000+0000", "size": 286219, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Map setAnnotation image doesn't work properly +1.8.2", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": " Product: Mobile\r\n Titanium SDK: Mobile 1.8.x, 1.9, 2.0 \r\n Platform OS: iOS\r\n Platform OS Version: 4.3", "comment": { "comments": [ { "id": "186902", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue introduced by TIMOB-7467. Both should be tested for resolution of this ticket.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-16T15:31:02.000+0000", "updated": "2012-03-16T15:45:37.000+0000" }, { "id": "186969", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull #1695 merged", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-18T11:11:56.000+0000", "updated": "2012-03-18T11:11:56.000+0000" }, { "id": "187227", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Bug is currently block by TIMOB-8081.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T15:18:56.000+0000", "updated": "2012-03-19T15:18:56.000+0000" }, { "id": "187702", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 2.0.0.v20120321071752\r\nTitanium Studio, build: 2.0.0.201203202130\r\nxcode: 4.2\r\nDevice: iphone 4s (5.0.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-21T09:24:49.000+0000", "updated": "2012-03-21T09:24:49.000+0000" }, { "id": "192140", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopening bug. \r\n\r\nThis is a regression. Above code does not show 4 annotations. It shows only the 1st and 4th annotation; See attachment.\r\n\r\nTested on:\r\nSDK build: 2.0.0.GA, 2.0.1.GA2, 2.0.2.v20120418121806\r\nTitanium Studio, build: 2.0.2.201204191742\r\nxcode: 4.2, 4.3\r\nDevices: iphone 4s Verizon (5.0.1), iphone 4s Sprint (5.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-04-20T16:37:14.000+0000", "updated": "2012-04-20T16:37:14.000+0000" }, { "id": "193341", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "All the pins are there, try zooming out of the mapview. You should see all the 4 pins.\r\n\r\nMarking bug as invalid. ", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-01T15:10:19.000+0000", "updated": "2012-05-01T15:10:19.000+0000" }, { "id": "415420", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid with reference to the previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T21:38:36.000+0000", "updated": "2017-03-23T21:38:36.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }