{ "id": "137313", "key": "TIMOB-17797", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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-12-05T23:38:52.000+0000", "created": "2014-09-27T21:14:11.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "CLFloor", "IndoorGeolocation", "geolocation", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-11-05T18:47:32.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": "In iOS 8 Apple introduced some APIs for indoor geolocation.\r\nSee: https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLFloor_class/\r\n\r\nThere is also a slide deck from WWDC 2014 talking about this in more detail.\r\nIt is a trivial change, but a useful one.\r\n\r\nThe only down side is that finding a list of buildings that have been mapped by Apple is a difficult task.\r\n\r\nHere is the pull request: https://github.com/appcelerator/titanium_mobile/pull/6176", "attachment": [], "flagged": false, "summary": "iOS: Add floor property from CLFloor needed for indoor geolocation", "creator": { "name": "sophrinix", "key": "sophrinix", "displayName": "Andrew McElroy", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sophrinix", "key": "sophrinix", "displayName": "Andrew McElroy", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "ios 8", "closedSprints": [ { "id": 258, "state": "closed", "name": "2014 Sprint 24 SDK", "startDate": "2014-11-24T22:28:25.425Z", "endDate": "2014-12-06T01:00:00.000Z", "completeDate": "2014-12-08T17:21:15.171Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "333505", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PRs\r\nmaster: https://github.com/appcelerator/titanium_mobile/pull/6392", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-24T23:33:00.000+0000", "updated": "2014-11-24T23:33:00.000+0000" }, { "id": "333510", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "h6. Test case:\r\n\r\n1. Run the code below\r\n2. Click \"start location updates\" and once you get an update click \"stop location updates\"\r\n3. Click \"get current location\"\r\n4. For in both of these cases on iOS 8+ there should be a \"floor\" object with a \"level\" property in the location object printed to the console. Pre iOS 8 the \"floor\" property will not exist.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: \"white\",\r\n\tlayout: 'vertical'\r\n});\r\nwin.open();\r\n\r\naddButton({\r\n\ttitle: 'start location updates',\r\n\tcallback: function(e) {\r\n\t\tTi.Geolocation.addEventListener('location', onLock);\r\n\t}\r\n});\r\n\r\naddButton({\r\n\ttitle: 'stop location updates',\r\n\tcallback: function(e) {\r\n\t\tTi.Geolocation.removeEventListener('location', onLock);\r\n\t}\r\n});\r\n\r\naddButton({\r\n\ttitle: 'get current location',\r\n\tcallback: function(e) {\r\n\t\tTi.Geolocation.getCurrentPosition(function(e) {\r\n\t\t\tTi.API.info(\"get CURRENT\");\r\n\t\t\tonLock(e);\r\n\t\t});\r\n\t}\r\n});\r\n\r\nfunction addButton(args) {\r\n\tvar b1 = Ti.UI.createButton({\r\n\t\ttitle: args.title,\r\n\t\ttop: 40\r\n\t});\r\n\tb1.addEventListener('click', args.callback);\r\n\twin.add(b1);\r\n}\r\n\r\nfunction onLock(e) {\r\n\tTi.API.info(\"# COORDS: \" + JSON.stringify(e.coords));\r\n}\r\n{code}", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-24T23:40:09.000+0000", "updated": "2014-11-24T23:40:09.000+0000" }, { "id": "345233", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified fix on:\r\n\r\nMac OSX 10.10.2\r\nAppcelerator Studio, build: 4.0.0.201502171827\r\nTitanium SDK build: 4.0.0.v20150305101012\r\nTitanium CLI, build: 3.5.0-dev\r\nAlloy: 1.6.0-alpha\r\nXcode 6.1.1\r\niPhone 6 Plus(8.3b), iPhone 6 Plus(8.1.3), iPhone 5c (7.1.1)\r\n\r\nBuilt to devices, on an 8.x device the floor object is present in the location object and on a 7.x it is not present.\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-03-06T00:34:51.000+0000", "updated": "2015-03-06T00:34:51.000+0000" }, { "id": "369106", "author": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "body": "Our venue was recently surveyed by Apple in order to get indoor accuracy & Floor level, and I confirm this param shows correctly. \r\n\r\nAn advise for developers, check the altitudeAccuracy returned if it's not -1 when using the floor property returned (~ 1 in 20 geolocation updates, it may return a *false* floor number of 0, thankfully it always returns also within that same object an altitudeAccuracy of >= 0, so you can drop those). \r\n\r\nExample: \r\nUntrustworthy Floor Level with Geolocation event:\r\n{\"success\":true,\"coords\":{\"timestamp\":1446397197000,\"speed\":0,\"longitude\":-73.xxx,\"floor\":*{\"level\":0}*,\"latitude\":45.yyy,\"accuracy\":10,\"heading\":-1,\"altitude\":30.46820068359375,\"altitudeAccuracy\":*4*},\"code\":0,\"bubbles\":true,\"type\":\"location\",\"source\":{\"preferredProvider\":null},\"cancelBubble\":false}\r\n\r\nTrustworthy Floor Level with Geolocation event:\r\n{\"success\":true,\"coords\":{\"timestamp\":1446397183741,\"speed\":-1,\"longitude\":-73.xxx,\"floor\":{\"level\":1},\"latitude\":45.yyy,\"accuracy\":6.195938110351562,\"heading\":-1,\"altitude\":-1,\"altitudeAccuracy\":*-1*},\"code\":0,\"bubbles\":true,\"type\":\"location\",\"source\":{\"preferredProvider\":null},\"cancelBubble\":false}", "updateAuthor": { "name": "underlabs", "key": "underlabs", "displayName": "Joseph Sachs", "active": true, "timeZone": "America/Montreal" }, "created": "2015-11-05T18:47:32.000+0000", "updated": "2015-11-05T18:47:32.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }