{ "id": "138717", "key": "TIMOB-17941", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-11-24T18:24:48.000+0000", "created": "2014-10-29T22:46:33.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-testadded", "supportTeam" ], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2015-01-16T23:35:23.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "h3. Issue\r\n\r\nWhen working on mobile web and using ti.map if the map visible property is set to false and the is set to true again the map will be reloaded to the original state instead of keeping the same location and zoom.\r\n\r\nh3. Steps to repro\r\n\r\n1. Run test code\r\n2. Move and zoom in the map view\r\n3. Click on the toggle button to hide it\r\n4. Click on the toggle button to show it\r\n\r\nh5. Expected Result\r\nThe map will be shown again with the last location and zoom\r\n\r\nh5. Actual Result\r\nThe map is reloaded to the original state\r\n\r\nh3. Test code\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tlayout:'vertical'\r\n});\r\n\r\nvar bt = Ti.UI.createButton({\r\n\ttop:20,\r\n\ttitle:'Toggle'\r\n});\r\n\r\nvar map = Ti.Map.createView({\r\n\tvisible:true,\r\n\ttop:20,\r\n\tuserLocation:true\r\n});\r\n\r\nTi.Geolocation.MobileWeb.locationTimeout = 10000; \r\nTi.Geolocation.getCurrentPosition(locationCallback); \r\n\r\nfunction locationCallback(e) { \r\n\tconsole.log(e); \r\n} \r\nvar last;\r\nbt.addEventListener('click',function(){\r\n\tmap.visible = !map.visible;\r\n});\r\n\r\nwin.add(bt);\r\nwin.add(map);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: When hiding a Ti.map view and showing it again the view is reloaded", "creator": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mcota", "key": "mcota", "displayName": "Marco Cota", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 265, "state": "closed", "name": "2014 Sprint 24 Tooling", "startDate": "2014-11-24T17:45:54.359Z", "endDate": "2014-12-06T02:47:00.000Z", "completeDate": "2014-12-08T17:25:44.396Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "333399", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Master pull request: https://github.com/appcelerator/titanium_mobile/pull/6380", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2014-11-24T16:47:50.000+0000", "updated": "2014-11-24T16:47:50.000+0000" }, { "id": "333425", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Works as expected using the original code on the ticket. \r\n\r\nThe code from Ingo doesn't work for me, however. Each time I hide/show the map I get different coordinates. If I understand his comments correctly, though, that's expected and isn't a valid test for this change.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-11-24T18:24:48.000+0000", "updated": "2014-11-24T18:24:48.000+0000" }, { "id": "339542", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.1\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.6.0.v20150116070927\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nGoogle Chrome\r\niPhone 6 Plus (8.1.1)\r\n\r\nBuilt and packaged using the app.js provided, when viewing from browser and device then zooming and toggling, the map always stays zoomed.\r\n\r\nClosing ticket.", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-01-16T23:35:08.000+0000", "updated": "2015-01-16T23:35:08.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }