{ "id": "98550", "key": "TIMOB-10296", "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": "13870", "description": "", "name": "Sprint 2012-16 API", "archived": true, "released": true, "releaseDate": "2012-08-13" }, { "id": "14096", "description": "Release 2.1.2", "name": "Release 2.1.2", "archived": true, "released": true, "releaseDate": "2012-08-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-04T00:26:03.000+0000", "created": "2012-08-01T16:10:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_map", "qe-review", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-09-04T00:26:03.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. Issue\r\n\r\nOn Android if we have annotations with the same title, only 1st of the annotations with the title can be selected. In iOS the correct annotation is selected, even if the titles are the same. It would make more sense to have annotations identified by the titleid instead of the title since the title can be the same.\r\n\r\nh3. Sample Code\r\n\r\nIn the attached code there are 4 annotations created with unique titleid's. On iOS, when the Select Annotation button is clicked Citibank #3 is selected (which is correct). On Android however the first annotation with that title is selected so Citibank #1 is selected. \r\n\r\n{noformat}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white'\r\n});\r\nwin.open();\r\n\r\n//create object instance, a parasitic subclass of Observable\r\nvar self = Ti.UI.createView();\r\nwin.add(self);\r\nvar mapObject = Titanium.Map.createView({\r\n mapType : Titanium.Map.STANDARD_TYPE,\r\n animate : true,\r\n regionFit : true,\r\n userLocation : true,\r\n top : '150',\r\n height : '400dp',\r\n zoomEnabled : true,\r\n region : {\r\n latitude : 37.77501,\r\n longitude : -122.419,\r\n latitudeDelta : 0.01,\r\n longitudeDelta : 0.01\r\n },\r\n});\r\n\r\nmapObject.addEventListener('click', function() {\r\n alert('map clicked');\r\n});\r\n\r\nvar selectAnnotations = Ti.UI.createButton({\r\n title : \"Select Annotations\",\r\n top : '0',\r\n});\r\nvar annotations = []\r\n\r\nannotations[0] = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : 'Citibank',\r\n subtitle : '#1',\r\n id : '1',\r\n pincolor : Titanium.Map.ANNOTATION_RED,\r\n latitude : parseFloat(37.776),\r\n longitude : parseFloat(-122.419),\r\n image : '/images/locPin.png'\r\n});\r\n\r\nannotations[1] = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : 'Citibank',\r\n subtitle : '#2',\r\n id : '2',\r\n pincolor : Titanium.Map.ANNOTATION_RED,\r\n latitude : parseFloat(37.77501),\r\n longitude : parseFloat(-122.419),\r\n image : '/images/locPin.png'\r\n});\r\n\r\nannotations[2] = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : 'Citibank',\r\n subtitle : '#3',\r\n id : '3',\r\n pincolor : Titanium.Map.ANNOTATION_RED,\r\n latitude : parseFloat(37.770),\r\n longitude : parseFloat(-122.419),\r\n image : '/images/locPin.png'\r\n});\r\n\r\nannotations[3] = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : 'Citibank',\r\n subtitle : '#4',\r\n id : '4',\r\n pincolor : Titanium.Map.ANNOTATION_RED,\r\n latitude : parseFloat(37.770),\r\n longitude : parseFloat(-122.43),\r\n image : '/images/locPin.png'\r\n});\r\n\r\nmapObject.addAnnotation(annotations[0]);\r\nmapObject.addAnnotation(annotations[1]);\r\nmapObject.addAnnotation(annotations[2]);\r\nmapObject.addAnnotation(annotations[3]);\r\n\r\nself.add(mapObject);\r\nself.add(selectAnnotations);\r\n\r\nvar thisObj = this;\r\nselectAnnotations.addEventListener('click', function(e) {\r\n mapObject.selectAnnotation(annotations[2], true);\r\n});\r\n\r\n{noformat}\r\n", "attachment": [], "flagged": false, "summary": "Android: Annotations with the same title cannot be uniquley selected. The first is always selected.", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Platform OS: Android 2.3, 4.0\r\nTitanium SDK: 2.1.0.GA", "comment": { "comments": [ { "id": "213027", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2683", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-06T16:08:23.000+0000", "updated": "2012-08-06T16:08:23.000+0000" }, { "id": "213863", "author": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with:\r\nTitanium Studio, build: 2.1.1.201207271312\r\nTitanium SDK, build: 2.2.0.v20120810080115\r\n\r\nDevice:\r\nLG VS910 4G (2.3.6)", "updateAuthor": { "name": "etcarev", "key": "etcarev", "displayName": "Evgenii Tcarev", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-10T14:16:05.000+0000", "updated": "2012-08-10T14:16:05.000+0000" }, { "id": "214430", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopen to add backport fix version", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T14:21:33.000+0000", "updated": "2012-08-14T14:21:33.000+0000" }, { "id": "214431", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backport PR https://github.com/appcelerator/titanium_mobile/pull/2727 merged.", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T14:22:17.000+0000", "updated": "2012-08-14T14:22:17.000+0000" }, { "id": "217363", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-04T00:25:30.000+0000", "updated": "2012-09-04T00:25:30.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }