{ "id": "89361", "key": "TIMOB-8489", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-07-27T21:12:33.000+0000", "created": "2012-04-02T13:05:37.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-27T21:12:33.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": "Steps to reproduce\r\n\r\n1. Create a sample app and change the app.js code to the following \r\n{code}\r\n\r\nvar _window = Ti.UI.createWindow();\r\n_window.open();\r\n\r\nvar locations = '{\"pois\":[' + '{\"city\":\"Cupertino\",\"latitude\":\"37.3230144444444\",\"longitude\":\"-122.01909\"},' + '{\"city\":\"San Jose\",\"latitude\":\"37.2599948914071\",\"longitude\":\"-121.876229713452\"},' + '{\"city\":\"Mountain View\",\"latitude\":\"37.4040712\",\"longitude\":\"-122.1119444\"},' + '{\"city\":\"Fremont\",\"latitude\":\"37.5022995952419\",\"longitude\":\"-121.974959595242\"},' + '{\"city\":\"Redwood City\",\"latitude\":\"37.4914862206843\",\"longitude\":\"-122.223387131433\"},' + '{\"city\":\"Morgan Hill\",\"latitude\":\"37.1130658823529\",\"longitude\":\"-121.642779411765\"},' + '{\"city\":\"Hayward\",\"latitude\":\"37.6529567785235\",\"longitude\":\"-122.110047315436\"},' + '{\"city\":\"San Mateo\",\"latitude\":\"37.5488359183673\",\"longitude\":\"-122.310417142857\"},' + '{\"city\":\"Livermore\",\"latitude\":\"37.6834371717172\",\"longitude\":\"-121.776987575758\"},' + '{\"city\":\"Dublin\",\"latitude\":\"37.7067795513183\",\"longitude\":\"-121.928981405136\"},' + '{\"city\":\"Colma\",\"latitude\":\"37.67668\",\"longitude\":\"-122.467328319902\"},' + '{\"city\":\"El Cerrito\",\"latitude\":\"37.89991\",\"longitude\":\"-122.29843\"},' + '{\"city\":\"Concord\",\"latitude\":\"37.9726973693895\",\"longitude\":\"-122.042295983774\"},' + '{\"city\":\"Pittsburg\",\"latitude\":\"38.0060320288764\",\"longitude\":\"-121.835960060159\"},' + '{\"city\":\"Manteca\",\"latitude\":\"37.7863470369327\",\"longitude\":\"-121.254679292344\"},' + '{\"city\":\"Corte Madera\",\"latitude\":\"37.9373022828566\",\"longitude\":\"-122.518824122653\"},' + '{\"city\":\"Modesto\",\"latitude\":\"37.6891241935484\",\"longitude\":\"-120.99570516129\"},' + '{\"city\":\"Stockton\",\"latitude\":\"38.056463822656\",\"longitude\":\"-121.376204288256\"},' + '{\"city\":\"Vacaville\",\"latitude\":\"38.3629562189087\",\"longitude\":\"-121.964531681599\"},' + '{\"city\":\"Merced\",\"latitude\":\"37.3196871717172\",\"longitude\":\"-120.490417878788\"}' + ']}';\r\n\t\tvar json = JSON.parse(locations);\r\n\r\n\t\tvar mapView = Ti.Map.createView({\r\n\t\t\tmapType : Titanium.Map.STANDARD_TYPE,\r\n\t\t\tanimate : true,\r\n\t\t\tregionFit : true,\r\n\t\t\tuserLocation : true\r\n\t\t});\r\n\t\t_window.add(mapView);\r\n\r\n\t\tvar tableView = Ti.UI.createTableView({\r\n\t\t\tright : 0,\r\n\t\t\twidth : 150,\r\n\t\t\tbackgroundColor: 'white'\r\n\t\t});\r\n\t\ttableView.addEventListener('click', function(e) {\r\n\t\t\tvar toClick = mapView.annotations[e.source.index];\r\n\t\t\tmapView.selectAnnotation(toClick);\r\n\t\t})\r\n\r\n\t\t_window.add(tableView);\r\n\r\n\t\tfunction createTableViewRows(json) {\r\n\t\t\tvar rows = [];\r\n\r\n\t\t\tif(json.pois) {\r\n\t\t\t\tvar length = json.pois.length;\r\n\t\t\t\tfor(var i = 0; i < length; i++) {\r\n\r\n\t\t\t\t\tvar poi = json.pois[i];\r\n\t\t\t\t\trows.push({\r\n\t\t\t\t\t\tlatitude : poi.latitude,\r\n\t\t\t\t\t\tlongitude : poi.longitude,\r\n\t\t\t\t\t\ttitle : poi.city,\r\n\t\t\t\t\t\tstoreData : poi,\r\n\t\t\t\t\t\tindex : i,\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn rows;\r\n\t\t}\r\n\r\n\t\tfunction createAnnotations(json) {\r\n\t\t\tvar annotations = [];\r\n\r\n\t\t\tif(json.pois) {\r\n\t\t\t\tvar length = json.pois.length;\r\n\t\t\t\tfor(var i = 0; i < length; i++) {\r\n\r\n\t\t\t\t\tvar poi = json.pois[i];\r\n\t\t\t\t\tannotations.push(Ti.Map.createAnnotation({\r\n\t\t\t\t\t\tlatitude : poi.latitude,\r\n\t\t\t\t\t\tlongitude : poi.longitude,\r\n\t\t\t\t\t\ttitle : poi.city,\r\n\t\t\t\t\t\tsubtitle : poi.address1,\r\n\t\t\t\t\t\tpincolor : Titanium.Map.ANNOTATION_RED,\r\n\t\t\t\t\t\tstoreData : poi,\r\n\t\t\t\t\t}));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn annotations;\r\n\t\t}\r\n\r\n\t\tfunction load() {\r\n\t\t\ttableView.data = createTableViewRows(json);\r\n\t\t\tmapView.annotations = createAnnotations(json);\r\n\t\t}\r\n\r\n\t\tload();\r\n{code}\r\n\r\n2. Press a row in the table view\r\n\r\nActual result:\r\nThe annotation is not selected\r\n*Note* I tried logging the value of toClick and undefined was returned\r\n\r\nExpected result:\r\nAn annotation is selected *Note it might be the annotation of the selected row*", "attachment": [], "flagged": false, "summary": "Android: Map - selectAnnotation method is not functioning properly when passed an annotation", "creator": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested with Ti Studio 2.0.0.201203291340\r\nTi Mob SDK 2.0.0 GA\r\nOSX Lion 10.7.3\r\nAndroid emulator 2.2", "comment": { "comments": [ { "id": "241951", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\nDevice: Samsung galaxy s duos Android version: 4.0.4", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-13T12:57:44.000+0000", "updated": "2013-03-13T12:57:44.000+0000" }, { "id": "424996", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing due to inactivity. If this issue still exists, please raise a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-27T21:12:33.000+0000", "updated": "2017-07-27T21:12:33.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }