{ "id": "97503", "key": "TIMOB-10009", "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": "2014-07-09T23:31:24.000+0000", "created": "2012-07-17T13:48:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "parity" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-08-07T20:26:11.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\nGiven a map view, if we call \"selectAnnotation\" on a particular annotation, the map will automatically center on that annotation. If the map height is very small the top of the annotation can be cut off. The map should not center but should bump the map up north of the annotation so that it is fully visible, just like it happens on iOS. \r\n\r\nh3. Steps to Reproduce\r\n\r\n1. Run the sample code below and click on different annotations. The ones near to the border have annotations cut-off. Running the same code on iOS shift the mapview so the annotations are clearly visible.\r\n\r\n{noformat}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor : 'white'\r\n});\r\n\r\nwin.open();\r\n\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 height : '150dp',\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\nvar selectAnnotations = Ti.UI.createButton({\r\n title : \"Select Annotations\",\r\n bottom : '20dp',\r\n height : '35dp',\r\n width : '180dp'\r\n});\r\n\r\nvar annotation = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : 'Hello I am an annotation with lots of information:',\r\n subtitle : 'This is a subtitle to an large annotation',\r\n pincolor : Titanium.Map.ANNOTATION_RED,\r\n latitude : parseFloat(37.776),\r\n longitude : parseFloat(-122.419)\r\n});\r\n\r\nvar annotation2 = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : '#2 Hello I am an annotation with lots of information:',\r\n subtitle : 'This is a subtitle to an large annotation',\r\n pincolor : Titanium.Map.ANNOTATION_RED,\r\n latitude : parseFloat(37.77501),\r\n longitude : parseFloat(-122.419)\r\n});\r\n\r\nvar annotation3 = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : '#3 Hello I am an annotation with lots of information:',\r\n subtitle : 'This is a subtitle to an large annotation',\r\n pincolor : Titanium.Map.ANNOTATION_RED,\r\n latitude : parseFloat(37.770),\r\n longitude : parseFloat(-122.419)\r\n});\r\n\r\nvar annotation4 = Titanium.Map.createAnnotation({\r\n animate : true,\r\n title : '#4 Hello I am an annotation with lots of information:',\r\n subtitle : 'This is a subtitle to an large annotation',\r\n pincolor : Titanium.Map.ANNOTATION_RED,\r\n latitude : parseFloat(37.770),\r\n longitude : parseFloat(-122.43)\r\n});\r\n\r\nmapObject.addAnnotation(annotation);\r\nmapObject.addAnnotation(annotation2);\r\nmapObject.addAnnotation(annotation3);\r\nmapObject.addAnnotation(annotation4);\r\n\r\nwin.add(mapObject);\r\nwin.add(selectAnnotations);\r\n\r\n\r\nselectAnnotations.addEventListener('click', function(e) {\r\n mapObject.selectAnnotation(annotation2);\r\n\r\n});\r\n\r\n{noformat}\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Mapview centers on selectAnnotation, parity with iOS", "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": "Titanium SDK: 2.1.0.GA\r\nPlatform OS: Android 2.3", "comment": { "comments": [ { "id": "211069", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/2666\r\nSteps for functional test:\r\n1. run the test case in description on Android.\r\n2. click the button and all the pins.\r\n3. the annotations (title, subtitle, etc) should show completely on screen.\r\n4. repeat 1-3 on iOS to see the parity.", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-01T13:30:00.000+0000", "updated": "2012-08-01T14:23:09.000+0000" }, { "id": "214453", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "2_1_X backport PR [2730|https://github.com/appcelerator/titanium_mobile/pull/2730]", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T14:58:14.000+0000", "updated": "2012-08-14T14:58:14.000+0000" }, { "id": "214599", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed.\r\nTested and verified on:\r\nTitanium Studio, build: 2.1.1.201208091713\r\nTitanium SDK, build: 2.1.2.v20120815081613\r\nDevices: Nexus 7 tab (4.1), Android Emulator (2.2)\r\n\r\nMap annotations are fully visible.", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-15T11:29:32.000+0000", "updated": "2012-08-15T11:29:32.000+0000" }, { "id": "304277", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening this issue:\r\nMac OSX 10.9.2\r\nAppcelerator Studio, build: 3.2.3.201404181520\r\nTitanium SDK, build: 3.2.3.GA\r\nTitanium CLI: 3.2.3\r\n\r\nUsing the test case provided in the description on Android does not center on the selected annotation.\r\niOS works as expected.\r\n", "updateAuthor": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-09T23:23:02.000+0000", "updated": "2014-05-09T23:23:02.000+0000" }, { "id": "313126", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "reopening to fix sprint.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-09T23:31:09.000+0000", "updated": "2014-07-09T23:31:09.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }