{ "id": "135233", "key": "TIMOB-19521", "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": null, "resolutiondate": null, "created": "2014-08-23T00:58:38.000+0000", "priority": null, "labels": [ "TCSupportTriage", "android", "mapView", "parity" ], "versions": [ { "id": "16919", "description": "Critical updates", "name": "Release 4.1.1", "archived": true, "released": true, "releaseDate": "2015-07-15" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T19:54:59.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "function setLocation (e) {\r\n Ti.API.info(\"Annotation \" + e.title + \" clicked, id: \" + e.annotation.myid);\r\n $.mapview.setLocation({\r\n latitude: 32.8245525,\r\n longitude: -117.0951632,\r\n animate: true,\r\n });\r\n}\r\n\r\nCalling that function will center the map on the specified location but zoom the map out to the maximum. The documentation makes it seem like latitudeDelta and longitudeDelta are optional.\r\n\r\nI just want to center the map, not change the zoom level. I'm not aware of any workarounds on Android.\r\n\r\nGitHub repo illustrating problem: https://github.com/davidfischer/setLocationBug\r\n\r\nThe above application can be built for iOS and Android. Clicking the annotation will center and zoom the map out on Android. It only centers the map on iOS.\r\n\r\nTitanium: 3.3.0.GA\r\nPlatform: 4.4.2\r\nAPI: 19\r\nGoogle APIs x86", "attachment": [], "flagged": false, "summary": "Ti.Map MapView setLocation zooms out to the maximum on Android unless latitudeDelta longitudeDelta are present", "creator": { "name": "davidfischer", "key": "davidfischer", "displayName": "David Fischer", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "davidfischer", "key": "davidfischer", "displayName": "David Fischer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "320293", "author": { "name": "hmrida", "key": "hmrida", "displayName": "Harish Mridha", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hi,\r\n\r\nWe tried to reproduce this issue with sample test case. It only centers the map on iOS not android. So it’s now working as expected with Titanium SDK 3.3.0.GA.\r\n \r\nh5. TESTING ENVIRONMENT:\r\n\r\n Titanium SDK: 3.2.3.GA and 3.3.0.GA\r\n Titanium CLI: 3.3.0\r\n OS X Version: 10.9.3\r\n Android API Level: 19\r\n iOS Version: 7.1.2\r\n\r\nh5. TEST CODE:\r\n\r\nalloy.js\r\n{code} \r\nAlloy.Globals.Map = require('ti.map');\r\n{code}\r\n\r\nindex.xml\r\n{code} \r\n\r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nindex.tss\r\n{code} \r\n\".container\": {\r\n\tbackgroundColor:\"white\"\r\n}\r\n\"#mapview\": {\r\n width: Ti.UI.FILL,\r\n height: Ti.UI.FILL,\r\n userLocation: true,\r\n enableZoomControls: false,\r\n region : {\r\n latitude: 32.8345525,\r\n longitude: -117.0851632,\r\n latitudeDelta:0.05,\r\n longitudeDelta:0.05,\r\n }\r\n}\r\n\"#hq\": {\r\n latitude: 32.841,\r\n longitude: -117.092,\r\n title: \"Somewhere\",\r\n pincolor: Alloy.Globals.Map.ANNOTATION_RED\r\n}\r\n{code}\r\n\r\nindex.js\r\n{code} \r\nfunction setLocation (e) {\r\n Ti.API.info(\"Annotation \" + e.title + \" clicked, id: \" + e.annotation.myid);\r\n $.mapview.setLocation({\r\n latitude: 32.8245525,\r\n longitude: -117.0951632,\r\n animate: true,\r\n });\r\n}\r\n\r\n$.window.open();\r\n{code}\r\n \r\nh5. STEPS TO TEST:\r\n\r\n- Create a simple alloy project.\r\n- Update project using test code\r\n- Add Map module in tiapp.xml\r\n- Run on android/iOS device\r\n \r\nh5. EXPECTED RESULT:\r\n\r\nIt’s a valid bug.\r\n\r\nThanks\r\n", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-08-26T05:55:08.000+0000", "updated": "2014-10-28T08:40:50.000+0000" }, { "id": "329757", "author": { "name": "davidfischer", "key": "davidfischer", "displayName": "David Fischer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can you explain to me why this issue was closed? What exactly couldn't you reproduce? Nowhere in your comment was the zoom level (the problem!) even mentioned. I just reran the sample project and clicking on the annotation zoomed the map out to the maximum (on Android) which is not the expected result.\r\n\r\nFrom the documentation:\r\n\r\n {quote}\r\n setLocation( location ) : void\r\n Sets the map location and zoom level.\r\n\r\n The location is set using a simple dictionary object, described in MapLocationTypeV2. If latitudeDelta and longitudeDelta are set, these specified parameters bound the area of interest, which is centered and displayed at the greatest possible zoom level. This method can only be called after the map completes loading. Before that, use region to set the map location.\r\n{quote}\r\n\r\nFor completeness, I ran the project with Titanium SDK 3.4.0GA and the problem persists in the current versions.", "updateAuthor": { "name": "davidfischer", "key": "davidfischer", "displayName": "David Fischer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-28T16:16:06.000+0000", "updated": "2014-10-28T16:16:06.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }