{ "id": "66515", "key": "TIMOB-5503", "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": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-08T01:45:40.000+0000", "created": "2011-06-06T05:46:23.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T23:34:43.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": "When trying to get location data by using getCurrentPosition method of Ti.Geolocation module the error occurs: The operation couldn't be completed. (kCLErrorDomain error 0.) code 2\r\n{code:JavaScript}\r\nvar win = Titanium.UI.currentWindow;\r\nwin.backgroundColor = '#fff';\r\n\r\nfunction locationCallback(e){\r\n\tif (!e.success || e.error) {\r\n\t\tl.text = 'error: ' + e.error + ' code ' + e.code\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar longitude = e.coords.longitude;\r\n\tvar latitude = e.coords.latitude;\r\n\tvar altitude = e.coords.altitude;\r\n\tvar heading = e.coords.heading;\r\n\tvar accuracy = e.coords.accuracy;\r\n\tvar speed = e.coords.speed;\r\n\tvar timestamp = e.coords.timestamp;\r\n\tvar altitudeAccuracy = e.coords.altitudeAccuracy;\r\n\tl.text = ' long: ' + longitude + '\\n lat: ' + latitude + '\\n alt: ' + altitude + '\\n heading: ' + heading + '\\n accuracy: ' + accuracy + '\\n speed: ' + speed + '\\n timestamp: ' + timestamp + '\\n altitude accuracy: ' + altitudeAccuracy;\r\n}\r\n\r\nTitanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;\r\n\r\nvar l = Ti.UI.createLabel({\r\n\tfont:{fontSize:14},\r\n\tcolor:'#000',\r\n\ttop:10,\r\n\tleft:10,\r\n\theight:190,\r\n\twidth:300\r\n});\r\nTi.UI.currentWindow.add(l);\r\n\r\nvar currentPosButton = Ti.UI.createButton({\r\n\ttitle:'Get Current Position',\r\n\theight:40,\r\n\ttop:200,\r\n\tleft:10,\r\n\twidth:300,\r\n\tfont:{fontSize:20}\r\n});\r\nTi.UI.currentWindow.add(currentPosButton);\r\n\r\n\r\ncurrentPosButton.addEventListener('click', function() {\r\n\tl.text = '';\r\n\tTitanium.Geolocation.getCurrentPosition(locationCallback);\r\n\r\n});\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: Error occurs when using getCurrentPosition method of Ti.Geolocation module in iPhone", "creator": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "subtasks": [], "reporter": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "environment": null, "comment": { "comments": [ { "id": "409111", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as MobileWeb is no longer supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T23:34:43.000+0000", "updated": "2017-03-03T23:34:43.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }