{ "id": "85459", "key": "TIMOB-7396", "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": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13170", "name": "Sprint 2012-06", "archived": true, "released": true, "releaseDate": "2012-03-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-04-04T09:41:02.000+0000", "created": "2012-01-25T11:01:20.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_map", "parity", "qe-testadded" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" } ], "issuelinks": [ { "id": "16151", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "88847", "key": "TIMOB-8309", "fields": { "summary": "iOS: Ti.Map.Annotation event listeners don't fire consistently", "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": "2012-04-04T09:41:02.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": "h3. Problem\r\n\r\nAnnotation eventListener firing only twice\r\n\r\nh3. Reproducible steps:\r\n\r\n1. Run the code below in iOs.\r\nPlease see the attached video: iOS-1.9.0.v20120111233134 CI Build-5.0.1 iOS SDK\r\n\r\n2. Run the code below in Android\r\nPlease see the attached video: Android-1.9.0.v20120111233134 CI Build-Android 2.3.3\r\n\r\nNotice that in Android. You can press the Detail button several times, and the message of the alert\r\nis still appearing.\r\n\r\nh3. Expected behavior:\r\n\r\nCustomer wants to have the same behavior in iOS like the video:\r\nAndroid-1.9.0.v20120111233134 CI Build-Android 2.3.3\r\n\r\nh3. Tested with the next specs:\r\n\r\nSimulator\r\nAndroid version : 2.3.3\r\n\r\niPhone 4\r\nVersion of the device: 5.0.1\r\n\r\nTitanium Studio, build: 1.0.9.201201240756\r\nTitanium SDK: 1.8.0.1 & 1.9.0.v20120111233134\r\n\r\nSamsung Fit\r\nAndroid version of the device: 2.2.1\r\n\r\nh3.Code:\r\n{code}\r\nvar win = Ti.UI.createWindow(\r\n{\r\n\ttitle : 'Annotations'\r\n});\r\n\r\nvar addButton= Ti.UI.createButton(\r\n{\r\n\tstyle : Ti.UI.iPhone.SystemButton.PLAIN,\r\n\ttitle : 'Add Annotation',\r\n\tcolor : 'black',\r\n\twidth : 130,\r\n\theight : 32,\r\n\ttop:5\r\n\t\r\n});\r\n\r\nvar myMap = Titanium.Map.createView(\r\n{\r\n\tmapType : Titanium.Map.STANDARD_TYPE,\r\n\tregion : {latitude: 37, longitude: -97,latitueDelta: 10, longitudeDelta: 10},\r\n\tanimate : true,\r\n\tregionFit : true,\r\n\tuserLocation : false,\r\n});\r\n\r\nwin.add(myMap);\r\nwin.add(addButton);\r\n\r\naddButton.addEventListener('click', function()\r\n{\r\n\tvar x = 10\r\n\tvar lat = 37.422502;\r\n\tvar lon = -122.08554998;\r\n\t\t\r\n\tfor(i = 0; i < x; i++)\r\n\t{\t\r\n\t\tvar myButton = Ti.UI.createButton(\r\n\t\t{\r\n\t\t\t//style : Ti.UI.iPhone.SystemButton.INFO_DARK,\r\n\t\t\ttitle : 'Detalis',\r\n\t\t\theight : 32,\r\n\t\t\twidth : 70,\r\n\t\t\tid : i\r\n\t\t});\r\n\t\t\r\n\t\tmyButton.addEventListener('click', function()\r\n\t\t{\r\n\t\t\talert(this.id);\r\n\t\t});\r\n\t\t\r\n\t\tvar myAnnotation = Ti.Map.createAnnotation(\r\n\t\t{\r\n\t\t\tlatitude : lat,\r\n\t\t\tlongitude : lon,\r\n\t\t\ttitle : 'Google HQ ',\r\n\t\t\tsubtitle : 'sdfsda',\r\n\t\t\tanimate : true,\r\n\t\t\tpincolor : Ti.Map.ANNOTATION_RED,\r\n\t\t\tleftView : myButton\r\n\t\t});\r\n\r\n\t\tmyMap.addAnnotation(myAnnotation);\r\n\t\t\r\n\t\tlat += 1.3*0.3;\r\n\t\tlon += 2.5*0.1;\r\n\t}\r\n});\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\n\r\nh3. Helpdesk\r\nAPP-526569\r\n \r\n\r\n ", "attachment": [ { "id": "25321", "filename": "Android-1.9.0.v20120111233134 CI Build-Android 2.3.3.mov", "author": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-25T11:01:20.000+0000", "size": 6528702, "mimeType": "video/quicktime" }, { "id": "25320", "filename": "iOS-1.9.0.v20120111233134 CI Build-5.0.1 iOS SDK.mov", "author": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-25T11:01:20.000+0000", "size": 2360545, "mimeType": "video/quicktime" } ], "flagged": false, "summary": "iOS: Annotation eventListener firing only twice", "creator": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Simulator\r\nAndroid version : 2.3.3\r\n\r\niPhone 4\r\nVersion of the device: 5.0.1\r\n\r\nTitanium Studio, build: 1.0.9.201201240756\r\nTitanium SDK: 1.8.0.1 & 1.9.0.v20120111233134\r\n\r\nSamsung Fit\r\nAndroid version of the device: 2.2.1", "comment": { "comments": [ { "id": "180738", "author": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h3. Workaround:\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\t\ttitle : 'Annotations'\r\n});\r\nvar addButton= Ti.UI.createButton({\r\n\t\tstyle : Ti.UI.iPhone.SystemButton.PLAIN,\r\n\t\ttitle : 'Add Annotation',\r\n\t\tbottom : '5dp',\r\n\t\tcolor : 'black',\r\n\t\twidth : 130,\r\n\t\theight : 32,\r\n\t\tleft : 0\r\n});\r\n\r\n\r\n\r\nvar myMap = Titanium.Map.createView({\r\n\t\tmapType : Titanium.Map.STANDARD_TYPE,\r\n\t\tregion : {latitude: 37, longitude: -97,\r\n\t\t\t\t latitueDelta: 10, longitudeDelta: 10},\r\n\t\tanimate : true,\r\n\t\tregionFit : true,\r\n\t\tuserLocation : false,\r\n});\r\n\r\nwin.add(myMap);\r\nwin.add(addButton);\r\n\r\n//create an array to store annotations\r\nvar myAnnotations = [];\r\n\r\naddButton.addEventListener('click', function(){\r\n\tvar x = 10\r\n\tvar lat = 37.422502;\r\n\tvar lon = -122.08554998;\r\n\t\t\r\n\tfor(i = 0; i < x; i++){\t\r\n\t\tvar myButton = Ti.UI.createButton({\r\n\t\t\ttitle : 'Detalis',\r\n\t\t\theight : 32,\r\n\t\t\twidth : 70,\r\n\t\t\tid : i\r\n\r\n\t\t});\r\n\t\tmyButton.addEventListener('click', function(){\r\n\t\t\talert(this.id);\r\n\t\t});\r\n\t\t\r\n\t\tvar myAnnotation = Ti.Map.createAnnotation({\r\n\t\t\tlatitude : lat,\r\n\t\t\tlongitude : lon,\r\n\t\t\ttitle : 'Google HQ ',\r\n\t\t\tsubtitle : 'sdfsda',\r\n\t\t\tanimate : true,\r\n\t\t\tpincolor : Ti.Map.ANNOTATION_RED,\r\n\t\t\tleftView : myButton\r\n\t\t});\r\n //store annotation into array\r\n\t\tmyAnnotations.push(myAnnotation);\r\n\t\t\r\n\t\tlat += 1.3*0.3;\r\n\t\tlon += 2.5*0.1;\r\n\t}\r\n //add annotation array to map\r\n\tmyMap.addAnnotations(myAnnotations);\r\n});\r\n\r\nwin.open();\r\n\r\n{code}", "updateAuthor": { "name": "framirez", "key": "framirez", "displayName": "Francisco Antonio Duran Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-26T14:04:02.000+0000", "updated": "2012-01-26T14:04:02.000+0000" }, { "id": "187010", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR #1735 merged.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-18T22:05:41.000+0000", "updated": "2012-03-18T22:05:41.000+0000" }, { "id": "187012", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "additional test case \r\n\r\n{code:JavaScript|title:app.js}\r\nvar win = Ti.UI.createWindow(\r\n{\r\n\ttitle : 'Annotations'\r\n});\r\n\r\nvar addButton= Ti.UI.createButton(\r\n{\r\n\tstyle : Ti.UI.iPhone.SystemButton.PLAIN,\r\n\ttitle : 'Add Annotation',\r\n\tcolor : 'black',\r\n\twidth : 130,\r\n\theight : 32,\r\n\tright : 5,\r\n\ttop:5\r\n\t\r\n});\r\n\r\n\r\nvar myMap = Titanium.Map.createView(\r\n{\r\n\tmapType : Titanium.Map.STANDARD_TYPE,\r\n\tregion : {latitude: 37, longitude: -97,latitueDelta: 10, longitudeDelta: 10},\r\n\tanimate : true,\r\n\tregionFit : true,\r\n\tuserLocation : false,\r\n});\r\n\r\nwin.add(myMap);\r\nwin.add(addButton);\r\n\r\naddButton.addEventListener('click', function()\r\n{\r\n\tvar x = 10\r\n\tvar lat = 37.422502;\r\n\tvar lon = -122.08554998;\r\n\t\t\r\n\tfor(i = 0; i < x; i++)\r\n\t{\t\r\n\t\tvar myButton = Ti.UI.createButton(\r\n\t\t{\r\n\t\t\t//style : Ti.UI.iPhone.SystemButton.INFO_DARK,\r\n\t\t\ttitle : 'Detalis',\r\n\t\t\theight : 32,\r\n\t\t\twidth : 70,\r\n\t\t\tid : i\r\n\t\t});\r\n\t\t\r\n\t\tmyButton.addEventListener('click', function()\r\n\t\t{\r\n\t\t\talert(this.id);\r\n\t\t});\r\n\t\t\r\n\t\tvar myAnnotation = Ti.Map.createAnnotation(\r\n\t\t{\r\n\t\t\tlatitude : lat,\r\n\t\t\tlongitude : lon,\r\n\t\t\ttitle : 'Google HQ ',\r\n\t\t\tsubtitle : 'sdfsda',\r\n\t\t\tanimate : true,\r\n\t\t\tpincolor : Ti.Map.ANNOTATION_RED,\r\n\t\t\tleftView : myButton\r\n\t\t});\r\n\r\n\t\tmyMap.addAnnotation(myAnnotation);\r\n\t\t\r\n\t\tlat += 1.3*0.3;\r\n\t\tlon += 2.5*0.1;\r\n\t}\r\n});\r\nvar setAnnotationButton = Ti.UI.createButton(\r\n{\r\n\tstyle : Ti.UI.iPhone.SystemButton.PLAIN,\r\n\ttitle : 'Set Annotation',\r\n\tcolor : 'black',\r\n\twidth : 130,\r\n\theight : 32,\r\n\tleft : 5,\r\n\ttop:5\r\n\t\r\n});\r\nwin.add(setAnnotationButton);\r\nsetAnnotationButton.addEventListener('click', function()\r\n{\r\n\tvar x = 10\r\n\tvar lat = 37.422502;\r\n\tvar lon = -122.08554998;\r\n\t\r\n\tvar annotationsArray =[];\r\n\tfor(i = 0; i < x; i++)\r\n\t{\t\r\n\t\tvar myButton = Ti.UI.createButton(\r\n\t\t{\r\n\t\t\t//style : Ti.UI.iPhone.SystemButton.INFO_DARK,\r\n\t\t\ttitle : 'Detalis',\r\n\t\t\theight : 32,\r\n\t\t\twidth : 70,\r\n\t\t\tid : i\r\n\t\t});\r\n\t\t\r\n\t\tmyButton.addEventListener('click', function()\r\n\t\t{\r\n\t\t\talert(this.id);\r\n\t\t});\r\n\t\t\r\n\t\tvar myAnnotation = Ti.Map.createAnnotation(\r\n\t\t{\r\n\t\t\tlatitude : lat,\r\n\t\t\tlongitude : lon,\r\n\t\t\ttitle : 'Google HQ ',\r\n\t\t\tsubtitle : 'sdfsda',\r\n\t\t\tanimate : true,\r\n\t\t\tpincolor : Ti.Map.ANNOTATION_RED,\r\n\t\t\tleftView : myButton\r\n\t\t});\r\n\r\n\t\tannotationsArray.push(myAnnotation);\r\n\t\t\r\n\t\tlat += 1.3*0.3;\r\n\t\tlon += 2.5*0.1;\r\n\t}\r\n\tmyMap.setAnnotations(annotationsArray);\r\n});\r\nvar removeAllAnnotationButton = Ti.UI.createButton(\r\n{\r\n\tstyle : Ti.UI.iPhone.SystemButton.PLAIN,\r\n\ttitle : 'Remove Annotation',\r\n\tcolor : 'black',\r\n\twidth : 130,\r\n\theight : 32,\r\n\ttop:50\r\n\t\r\n});\r\nwin.add(removeAllAnnotationButton);\r\nremoveAllAnnotationButton.addEventListener('click', function()\r\n{\r\n\tmyMap.removeAllAnnotations();\r\n});\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-18T23:07:32.000+0000", "updated": "2012-03-18T23:07:32.000+0000" }, { "id": "187179", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Annotation eventListener gets fired any number of times.\r\nVerified fix on:\r\n\r\nSDK build: 2.0.0.v20120319003254\r\nTitanium Studio, build: 2.0.0.201203182248\r\nDevice: Simulator, Android(v 2.3.3),iPhone 4(v 5.0.1), Nexus1(v 2.2)\r\n", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-19T13:47:24.000+0000", "updated": "2012-03-19T13:47:24.000+0000" }, { "id": "189824", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening/closing to add/remove labels", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-04T09:40:27.000+0000", "updated": "2012-04-04T09:40:27.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }