{ "id": "76804", "key": "TIMOB-4478", "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": "11361", "description": "Mobile 1.8.0 M08", "name": "Sprint 2011-29", "archived": true, "released": true, "releaseDate": "2011-07-25" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-08-03T08:49:27.000+0000", "created": "2011-06-22T06:02:48.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "11244", "name": "Release 1.7.0", "archived": true, "released": true, "releaseDate": "2011-06-13" } ], "issuelinks": [ { "id": "57073", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "161015", "key": "TIMOB-23496", "fields": { "summary": "TiAPI: Deprecate old Geolocation properties, add more parity", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-12-17T17:57:07.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": "h1. Problem\r\nThe \"country code\" property is inconsistent between the platforms. On iOS it is \"country_code\", while for Android it is \"CountryCode\".\r\n\r\nh2. Solution\r\nPick one, and deprecate the other. Both platforms should expose the one chosen, and one can have the antiquated property for a couple more releases.\r\n\r\nh2. Sample Code\r\n{code:title=app.js}\r\nTi.Geolocation.addEventListener('location', function(e) {\r\n Ti.Geolocation.reverseGeocoder(e.coords.latitude, e.coords.longitude, function(evt) {\r\n alert(evt);\r\n });\r\n});\r\n{code}\r\n\r\nh3. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-455583", "attachment": [], "flagged": false, "summary": "reverseGeocoder Platform Inconsistency", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "157669", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Dawson,\r\n\r\nPlease update the sample code attached to this bug that exhibits the problem. \r\nI think that \"country_code\" would work on both platforms.\r\n", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-23T11:24:34.000+0000", "updated": "2011-06-23T11:24:34.000+0000" }, { "id": "158559", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "body": "\"country_code\" only works on iOS. Android return value does not contain this property. I just verified this statement is true on device, and in the source code using Release 1.7.1 and a build from source 6f5ab67357aa358d413f.\n\nSee:\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/modules/geolocation/src/ti/modules/titanium/geolocation/TiLocation.java#L352\n\nAnd for the constant's definition see:\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/org/appcelerator/titanium/TiC.java#L137", "updateAuthor": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2011-07-05T13:36:16.000+0000", "updated": "2011-07-05T13:36:16.000+0000" }, { "id": "160135", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Updated example code.\r\n\r\n{code}\r\n\r\nTi.Geolocation.addEventListener('location', function(e) {\r\n Ti.Geolocation.reverseGeocoder(e.coords.latitude, e.coords.longitude, function(evt) {\r\n \tvar m = \"countryCode: \" + evt.places[0].countryCode + \r\n \t\t\" country_code: \" + evt.places[0].country_code;\r\n alert(m);\r\n });\r\n});\r\n{code}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-07-20T16:30:24.000+0000", "updated": "2011-07-20T16:30:24.000+0000" }, { "id": "161280", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Additional (simpler) test if you're having problem with GEO on your device. This test just tests the affected code, which is the reverse geo lookup. The result should refer to Austria, since I'm giving the coordinates to Vienna, Austria here:\r\n\r\n{code:title=app.js}\r\n Ti.Geolocation.reverseGeocoder(48.2, 16.3666667, function(evt) {\r\n \tvar m = \"countryCode: \" + evt.places[0].countryCode + \r\n \t\t\" country_code: \" + evt.places[0].country_code;\r\n alert(m);\r\n });\r\n{code}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-08-01T08:36:20.000+0000", "updated": "2011-08-01T08:36:20.000+0000" }, { "id": "164030", "author": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 1.8.0.v20110819142548\niPhone 4.3.4\niPad2 4.3.2\nMotorola Xoom 3.2\nNexus One 2.2.2", "updateAuthor": { "name": "nhuynh", "key": "nhuynh", "displayName": "Natalie Huynh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-25T11:27:32.000+0000", "updated": "2011-08-25T11:27:32.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }