{ "id": "98539", "key": "TIMOB-10289", "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": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14127", "description": "Sprint 2012-19 API", "name": "Sprint 2012-19 API", "archived": true, "released": true, "releaseDate": "2012-09-24" }, { "id": "14271", "description": "2012 Sprint 19", "name": "2012 Sprint 19", "archived": true, "released": true, "releaseDate": "2012-09-24" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-12T18:49:10.000+0000", "created": "2012-08-01T14:46:24.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "qe-testadded" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [ { "id": "19735", "type": { "id": "10000", "name": "Blocks", "inward": "is blocked by", "outward": "blocks" }, "inwardIssue": { "id": "91836", "key": "TIMOB-9132", "fields": { "summary": "Android: Maps V2 Module - Feature to allow modifications to the android mapview zoom buttons", "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": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-22T09:18:10.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\nIn iOS, on clicking the selected annotation gets deselected by clicking anywhere on the mapview. But on Android, one has to click on the selected annotation again to deselect it. The native Android behavior imitates the iOS behavior.\r\n\r\nh3. Sample Code\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\r\n", "attachment": [], "flagged": false, "summary": "Android: Unlike iOS, clicking on map outside the annotation does not deselect the annotation", "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, 2.1.1.GA", "comment": { "comments": [ { "id": "213187", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "There is ambiguity in the way touch events will behave with the zoomControls set to toggle. This will be fixed after we fix TIMOB-9132 for the case where zoomControls are always visible or always hidden.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-07T11:33:58.000+0000", "updated": "2012-08-07T11:33:58.000+0000" }, { "id": "215239", "author": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Varun,\r\n\r\nThe idea is to replace the system controls with our own to resolve 9132.\r\nThis also gives us the control needed to disable controls or just the fading behavior\r\nwhen you click on the map. This should then provide a way to work around the ambiguity of the map\r\ntouch event.\r\n", "updateAuthor": { "name": "joshroesslein", "key": "joshroesslein", "displayName": "Josh Roesslein", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-20T16:19:35.000+0000", "updated": "2012-08-20T16:19:35.000+0000" }, { "id": "216014", "author": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Assigning back to Neeraj pending fix of blocking issue.", "updateAuthor": { "name": "krowley", "key": "krowley", "displayName": "Karl Rowley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-24T09:51:49.000+0000", "updated": "2012-08-24T09:51:49.000+0000" }, { "id": "217638", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "WRT Zoom controls and this behavior, the fix (if there is one) does not affect parity. I.e., Android has had both styles of functionality, natively, and changing the behavior to match iOS when the OS default is otherwise is probably undesirable from an end user PoV.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-05T11:33:10.000+0000", "updated": "2012-09-05T11:33:10.000+0000" }, { "id": "218000", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Steps for functional test:\r\n1) Run the test case attached below.\r\n i) Click any annotation. The annotation is selected. A console log should show, eg:\r\n{code}\r\nI/TiAPI (25606): ************** e.clicksource = pin\r\nI/TiAPI (25606): ************** e.latitude = 37.776\r\nI/TiAPI (25606): ************** e.longitude = -122.419\r\nI/TiAPI (25606): ************** e.title = Citibank\r\nI/TiAPI (25606): ************** e.subtitle = #1 #1 #1 #1 #1 #1 #1 #1\r\n{code}\r\n ii) Click on the map outside of the selected annotation. The annotation should be deselected. A similar log should show in the console.\r\n iii) Select another annotation and then click anywhere on the annotation, eg \"title\", \"subtitle\", \"pin\". The annotation should not be deselected. A similar log shows in the console.\r\n\r\n2) Run the test case without \"hideAnnotationWhenTouchMap: true\". The mapview and annotation should work the same as they are before this fix. \r\n i) Click any annotation. The annotation is selected. A similar log should show in the console.\r\n ii) Click on the map outside of the selected annotation. The annotation should not be deselected.\r\n iii) Click anywhere on the selected annotation except \"pin\". The annotation should not be deselected. A similar log shows in the console.\r\n iv) Click \"pin\" of the selected annotation. The annotation should be deselected. A similar log shows in the console.\r\n\r\n{code}\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 hideAnnotationWhenTouchMap: 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(e) {\r\n Ti.API.info(\"************** e.clicksource = \" + e.clicksource);\r\n Ti.API.info(\"************** e.latitude = \" + e.latitude);\r\n Ti.API.info(\"************** e.longitude = \" + e.longitude);\r\n Ti.API.info(\"************** e.title = \" + e.title);\r\n Ti.API.info(\"************** e.subtitle = \" + e.subtitle);\r\n});\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 #1 #1 #1 #1 #1 #1 #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 leftButton : 'KS_nav_ui.png'\r\n});\r\n \r\nannotations[1] = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : 'Citibank',\r\n subtitle : '#2 #2 #2 #2 #2 #2 #2 #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 rightButton: 'KS_nav_views.png'\r\n});\r\n \r\nannotations[2] = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : 'Citibank',\r\n subtitle : '#3 #3 #3 #3 #3 #3 #3 #3 #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 leftButton : 'KS_nav_ui.png'\r\n});\r\n \r\nannotations[3] = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : 'Citibank',\r\n subtitle : '#4 #4 #4 #4 #4 #4 #4 #4 #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 rightButton: 'KS_nav_views.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{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-07T11:22:07.000+0000", "updated": "2012-09-11T11:23:02.000+0000" }, { "id": "218002", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/2885", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-07T11:23:41.000+0000", "updated": "2012-09-07T11:23:41.000+0000" }, { "id": "230073", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. \r\nExpected behavior is shown. Tested on: \r\nTitanium Studio, build: 3.0.0.201211301903\r\nTitanium SDK, builds: 3.0.0.v20121204181658; 3.1.0.v20121203181001\r\nDevices: Samsung Galaxy S III (4.0.4)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-05T18:08:07.000+0000", "updated": "2012-12-05T18:08:07.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }