{ "id": "109359", "key": "TIMOB-12615", "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": "15272", "description": "2013 Sprint 04 API", "name": "2013 Sprint 04 API", "archived": true, "released": true, "releaseDate": "2013-02-25" }, { "id": "14814", "description": "2013 Sprint 04", "name": "2013 Sprint 04", "archived": true, "released": true, "releaseDate": "2013-02-25" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-02-21T00:23:49.000+0000", "created": "2013-02-07T05:45:46.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-20T20:21:42.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": "h4. Problem Description\r\nWhen you pass a non us address to Ti.GeoLocation.forwardGeocoder(), it will fail returning null values. \r\n\r\nh4. Test Case\r\nSame location queried through out Maps GoogleAPIs returns coords according the place.\r\n\r\n{code}\r\nvar nonUS = \"Hyderabad\";\r\nvar Tokio = \"Tokio\";\r\nvar US = \"Salt Lake city\";\r\n \r\nTitanium.Geolocation.forwardGeocoder( nonUS, function(evt)\r\n{\r\n Ti.API.info( \"lat: \"+evt.latitude+\", long: \"+ evt.longitude );\r\n Ti.API.info( JSON.stringify(evt) );\r\n});\r\n \r\nxhr = Titanium.Network.createHTTPClient();\r\nvar query = nonUS;\r\nxhr.open('GET', 'http://maps.googleapis.com/maps/geo?output=json&q=' + query);\r\nxhr.onload = function() {\r\n var json = JSON.parse(this.responseText);\r\n Ti.API.info(json);\r\n //17.385044,78.486671\r\n};\r\nxhr.send();\r\n\r\n{code} \r\n\r\nh4. Extra info\r\nThe customer just want to show a proper annotation in the map to a particular location. i.e., need latitude and longitude values for \"Ameerpet, Hyderabad\" \r\n\r\n{code}\r\nvar address = \"Ameerpet,Hyderabad\";\r\n \r\nTitanium.Geolocation.forwardGeocoder( address, function(evt)\r\n{\r\n Ti.API.info( \"lat: \"+evt.latitude+\", long: \"+ evt.longitude );\r\n Ti.API.info( JSON.stringify(evt) );\r\n});\r\n{code}\r\n\r\nRight now a workaround will be changing from \"Ameerpet, Hyderabad\" to \"Ameerpet-Hyderabad\", that will return the right coordinates, except in cases where you send a full address, like: \"Shantipath, Chanakyapuri New Delhi, India\", which is a valid address and will return empty. \r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.Geolocation.forwardGeocoder is not getting Non US address to lat and long values", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "MobileSDK 3.0.0.GA\r\nPlatform: iOS 6 simulator & iPhone 4\r\n", "comment": { "comments": [ { "id": "239168", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Docs are being updated with platform limitations here\nhttps://github.com/appcelerator/titanium_mobile/pull/3893\n\nMarking this ticket as won't fix.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-21T00:23:09.000+0000", "updated": "2013-02-21T00:23:09.000+0000" }, { "id": "239171", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Doc Update\n\n The module provides two methods, [forwardGeocoder](Titanium.Geolocation.forwardGeocoder) and [reverseGeocoder](Titanium.Geolocation.reverseGeocoder)\n to convert between geographic coordinates and addresses. These methods map to MapQuest Open Nominatim Search Service.\n\n While this API has the advantage that it has no daily usage limits, please note that the data backing this API is crowd sourced and might not return \n proper values for valid addresses and geographic coordinates.\n\n If geocoding services are essential component of the application, developers are encouraged to use commercial geocoding providers.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-02-21T00:26:36.000+0000", "updated": "2013-02-21T00:26:36.000+0000" }, { "id": "413890", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T20:21:42.000+0000", "updated": "2017-03-20T20:21:42.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }