{ "id": "176277", "key": "TIMOB-28529", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "21201", "description": "", "name": "Release 10.1.0", "archived": false, "released": true, "releaseDate": "2021-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-09-01T00:33:41.000+0000", "created": "2021-08-31T19:50:14.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "camera", "parity", "ti.map" ], "versions": [], "issuelinks": [], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-09-01T00:33:41.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": "*Summary:*\r\niOS' version of the \"ti.map\" modules supports the ability to control the height, pitch, and rotation of the camera via the following APIs. We should add the same on Android.\r\n* [MapView.camera|https://titaniumsdk.com/api/modules/map/view.html#camera] property\r\n* [MapView.animateCamera()|https://titaniumsdk.com/api/modules/map/view.html#animatecamera] method\r\n\r\n*Implementation:*\r\nA community written PR has been made to do this by [~michael]. _(Thanks!)_\r\nhttps://github.com/appcelerator-modules/ti.map/pull/451\r\n\r\n*Animate Camera Test:*\r\nThis smoothly animates the camera to 2 different positions.\r\n{code:javascript}\r\nconst Map = require('ti.map');\r\nconst window = Titanium.UI.createWindow();\r\nconst mapview = Map.createView({\r\n\tmapType: Map.NORMAL_TYPE,\r\n\tanimate: false,\r\n\tregionFit: true\r\n});\r\nwindow.add(mapview);\r\nwindow.addEventListener('open', () => {\r\n\tsetTimeout(() => {\r\n\t\tconst camera = Map.createCamera({\r\n\t\t\taltitude: 15.5,\r\n\t\t\tcenterCoordinates: { longitude: 151.276417, latitude: -33.891614 },\r\n\t\t\theading: -90,\r\n\t\t\tpitch: 75\r\n\t\t});\r\n\t\tmapview.animateCamera({ camera: camera, duration: 5000 }, () => {\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tcamera.centerCoordinates = { longitude: 151.20689, latitude: -33.87365 };\r\n\t\t\t\tcamera.heading = 90;\r\n\t\t\t\tcamera.pitch = 50;\r\n\t\t\t\tmapview.animateCamera({ camera: camera });\r\n\t\t\t}, 2000);\r\n\t\t});\r\n\t}, 2000);\r\n});\r\nwindow.open();\r\n{code}\r\n\r\n*Camera Property Test:*\r\nThis instantly moves the camera (without animation) to 2 different locations.\r\n{code:javascript}\r\nvar Map = require('ti.map');\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar mapview = Map.createView({\r\n\tmapType: Map.NORMAL_TYPE,\r\n\tanimate: false,\r\n\tregionFit: true\r\n});\r\n\r\nvar camera = Map.createCamera({\r\n\taltitude: 15.5,\r\n\tcenterCoordinates: {\r\n\t\tlongitude: 151.276417,\r\n\t\tlatitude: -33.891614\r\n\t},\r\n\theading: -90,\r\n\tpitch: 75\r\n});\r\n\r\n\r\nsetTimeout(function() {\r\n\tmapview.camera = camera;\r\n\r\n\tcamera.centerCoordinates = {\r\n\t\tlongitude: 151.20689,\r\n\t\tlatitude: -33.87365\r\n\t};\r\n\tcamera.heading = 90;\r\n\tcamera.pitch = 50;\r\n\tsetTimeout(function() {\r\n\t\tmapview.camera = camera;\r\n\t}, 6000)\r\n}, 2000)\r\nwin.add(mapview);\r\nwin.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Update \"ti.map\" module to support \"camera\" property and animateCamera()", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "459021", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (ti.map): https://github.com/appcelerator-modules/ti.map/pull/451", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-08-31T19:50:47.000+0000", "updated": "2021-08-31T19:50:47.000+0000" }, { "id": "459027", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-09-01T00:33:38.000+0000", "updated": "2021-09-01T00:33:38.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }