{ "id": "88196", "key": "TIMOB-8092", "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": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13170", "name": "Sprint 2012-06", "archived": true, "released": true, "releaseDate": "2012-03-25" }, { "id": "13270", "description": "Release 1.8 Service Pack 3 (CI for 1_8_X)", "name": "Release 1.8.3", "archived": true, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-04-05T09:22:15.000+0000", "created": "2012-03-19T16:07:51.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_map", "qe-testadded" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-04-05T09:22:15.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "1. Run the attached app.js sample.\r\n\r\n2. Click on the Select Annotation button (This event listener has mapview region modified)\r\n\r\n3. The map zooms to what seems to be a default zoom level instead of what is specified in the event listener above.\r\n\r\n4. Now move the map around and then from this point, on clicking the Select Annotation button the zoom level is always taken as the one that has been modified. \r\n\r\n\r\n*Note:* Just modifying the latitude and longitude properties and not the delta ones for the map too has this behavior.\r\n\r\n{noformat}\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\n//\r\n// CREATE ANNOTATIONS\r\n//\r\nvar atlantaParams = {\r\n latitude:33.74511,\r\n longitude:-84.38993,\r\n title:\"Atlanta, GA\",\r\n subtitle:'Atlanta Braves Stadium\\nfoo',\r\n animate:true,\r\n rightButton: Titanium.UI.iPhone.SystemButton.DISCLOSURE,\r\n myid:3\r\n };\r\n\r\n\r\natlantaParams.pincolor = Titanium.Map.ANNOTATION_PURPLE;\r\nvar atlanta = Titanium.Map.createAnnotation(atlantaParams);\r\n\r\n//\r\n// CREATE MAP VIEW\r\n//\r\nvar mapview = Titanium.Map.createView({\r\n mapType: Titanium.Map.STANDARD_TYPE,\r\n region:{latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5},\r\n animate:true,\r\n regionFit:true,\r\n userLocation:true\r\n});\r\n\r\n\r\n\r\nmapview.addAnnotation(atlanta);\r\nwin.add(mapview);\r\n\r\n\r\nvar bt = Ti.UI.createButton({\r\n title: \"Select Annotation\",\r\n width: 130,\r\n height: 40,\r\n left: 0,\r\n top: 0\r\n});\r\n\r\n\r\nbt.addEventListener(\"click\",function(e){\r\n mapview.region = {latitude:33.74511, longitude:-84.38993, latitudeDelta:0.5, longitudeDelta:0.5};\r\n mapview.selectAnnotation(atlanta);\r\n});\r\n\r\nwin.add(bt);\r\nwin.open();\r\n\r\n{noformat}\r\n\r\n\r\n*EXPECTED BEHAVIOR*\r\n\r\nThe mapview should center around the window with the assigned coordinates.", "attachment": [], "flagged": false, "summary": "iOS: Mapview zooms to Titanium default even after modifying the mapview region property", "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: iOS 5.0\r\nTitanium SDK: 1.8.2", "comment": { "comments": [ { "id": "188383", "author": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/1801 merged", "updateAuthor": { "name": "mstepanov", "key": "mstepanov", "displayName": "Max Stepanov", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-23T14:30:59.000+0000", "updated": "2012-03-23T14:30:59.000+0000" }, { "id": "188456", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on:\r\n\r\nSDK build: 2.0.0.v20120323221800\r\nTitanium Studio, build: 2.0.0.201203240504\r\nxcode: 4.3\r\nDevice: iphone 4s Verizon (5.0.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-03-24T09:23:22.000+0000", "updated": "2012-03-24T09:23:22.000+0000" }, { "id": "189073", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to add Fix Version 1.8.3", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-28T15:59:00.000+0000", "updated": "2012-03-28T15:59:00.000+0000" }, { "id": "189963", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening/closing to add/remove labels", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-05T09:21:27.000+0000", "updated": "2012-04-05T09:21:27.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }