{ "id": "86448", "key": "TIMOB-7667", "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": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2013-03-02T05:32:46.000+0000", "created": "2012-02-14T03:20:19.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T22:30:40.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": "h4. Problem description \r\nI have a map view and a function for geolocalization.\r\nThe function works great: my map is centered in the user location and a blinking rounded indicator appears on the position.\r\nThe problem occurs when I change tab and I then go back in the tab with the map: the geolocalization works again but the blinking rounded indicator is disappeared!\r\n\r\nh4. Actual Results\r\nThe current user's location disappears.\r\n\r\nh4. Expected results\r\nThe current user's location is shown. \r\n\r\nh4. Test case\r\n1. Add this code to a project\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nTi.Geolocation.preferredProvider = \"GPS demo\";\r\nTi.Geolocation.preferredProvider = Titanium.Geolocation.PROVIDER_GPS;\r\nTi.Geolocation.purpose = \"testing\";\r\nTitanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;\r\nTitanium.Geolocation.distanceFilter = 10;\t\r\n\r\n\r\n\r\n\r\n// create tab group\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\n\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab1 = Titanium.UI.createTab({ \r\n icon:'KS_nav_views.png',\r\n title:'Tab 1',\r\n window:win1\r\n});\r\n\r\n\r\nvar win2 = Titanium.UI.createWindow({ \r\n title:'Tab 2',\r\n backgroundColor:'#fff'\r\n});\r\nvar tab2 = Titanium.UI.createTab({ \r\n icon:'KS_nav_ui.png',\r\n title:'Tab 2',\r\n window:win2\r\n});\r\n\r\n\r\n\r\n\r\nvar\tmapview = Titanium.Map.createView({\r\n\t\tmapType: Titanium.Map.STANDARD_TYPE,\r\n\t\tregion:{latitude:41.65, longitude:12.98, latitudeDelta:1.5, longitudeDelta:1.5},\r\n\t\tanimate:true,\r\n\t\tregionFit:true,\r\n\t\tuserLocation:true\r\n\t});\r\n\t\r\n\t\r\n//win1.add(mapview);\r\n\r\n//geoLocalizzami();\r\n\r\nvar mapButton = Titanium.UI.createButton({\r\n title: 'Add Map',\r\n \twidth:'200dp',\r\n\theight:'200dp'\r\n});\r\n\r\nmapButton.addEventListener('click',function(e) {\t\r\n\twin1.add(mapview);\r\n});\r\n\r\nwin1.add(mapButton);\r\n\r\n\r\n\r\nvar geoLocalizzamiButton = Titanium.UI.createButton({\r\n title: 'GeoLocalize',\r\n \twidth:'150dp',\r\n\theight:'100dp',\r\n\ttop:'15dp'\r\n});\r\n\r\ngeoLocalizzamiButton.addEventListener('click',function(e) {\r\n\tgeoLocalizzami();\r\n});\r\n\r\nmapview.add(geoLocalizzamiButton);\r\n\r\n\r\n\r\n\r\nvar label2 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'I am Window 2',\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto'\r\n});\r\n\r\nwin2.add(label2);\r\n\r\n\r\n\r\n\r\ntabGroup.addTab(tab1); \r\ntabGroup.addTab(tab2); \r\n\r\ntabGroup.open();\r\n\r\n\r\n\r\n\r\n// function to geo-localize\r\nfunction geoLocalizzami(){\r\n\tTitanium.Geolocation.getCurrentPosition(function(e) {\r\n\t\tif (!e.success || e.error) {\r\n\t\t\tvar alertDialog = Titanium.UI.createAlertDialog({\r\n \t\t\ttitle: '',\r\n \t\t\tmessage: 'error',\r\n \t\t\tbuttonNames: ['OK']\r\n\t\t\t});\r\n\t\t\talertDialog.show();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tvar doveSono = {latitude:e.coords.latitude,longitude:e.coords.longitude,animate:true,latitudeDelta:0.3, longitudeDelta:0.3};\r\n\t\tmapview.setLocation(doveSono);\r\n\t});\t\r\n}\r\n\r\n\r\n{code}\r\nWait until the map shows the user's location.\r\nChange tab\r\nGo back to map's tab\r\nThe current user's location disappear. \r\n\r\n\r\n", "attachment": [ { "id": "25758", "filename": "testmappa1.zip", "author": { "name": "luca82", "key": "luca82", "displayName": "Luca Mela", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-14T03:20:19.000+0000", "size": 2322875, "mimeType": "application/zip" } ], "flagged": false, "summary": "On mapview, blinking rounded indicator disappeared when change tab", "creator": { "name": "luca82", "key": "luca82", "displayName": "Luca Mela", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "luca82", "key": "luca82", "displayName": "Luca Mela", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium 1.8.1/1.9\r\nAndroid: V8 \r\nTested: Samsung T499/Android 2.2\r\nOS: MacOSX Lion\r\nTi Studio 1.0.8", "comment": { "comments": [ { "id": "200736", "author": { "name": "luca82", "key": "luca82", "displayName": "Luca Mela", "active": true, "timeZone": "America/Los_Angeles" }, "body": "do you have news about this bug?", "updateAuthor": { "name": "luca82", "key": "luca82", "displayName": "Luca Mela", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-28T08:47:08.000+0000", "updated": "2012-06-28T08:47:08.000+0000" }, { "id": "240441", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue does not reproduces with\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 (03/11/13 15:43 0c88429)\r\nTitanium SDK version: 3.0.2 (02/07/13 16:46 a4def81)\r\nDevice: Samsung galaxy s duos Android version: 4.0.4", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-02T05:32:46.000+0000", "updated": "2013-03-02T05:32:46.000+0000" }, { "id": "414579", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and due to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T22:30:40.000+0000", "updated": "2017-03-21T22:30:40.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }