Titanium JIRA Archive
Appcelerator Community (AC)

[AC-471] Android geocoder returns latitude & longitude swapped

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2015-11-05T08:35:19.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid, api, defect, geocoder
ReporterCory Hughart
AssigneeShak Hossain
Created2015-10-16T20:20:24.000+0000
Updated2015-11-05T08:35:19.000+0000

Description

Using both Ti.Geolocation.forwardGeocoder and Ti.Geolocation.reverseGeocoder return latitude and longitude swapped. Ti.Geolocation.getCurrentPosition works as expected. The geocoder return value is correct on iOS. I noticed that the geolocation API went down a couple weeks ago, and came back up returning differently-formatted results. I'm not sure if it's because I upgraded to 5.0.2.GA, but I think it's a bit weird in general that the return values from this API are different depending on the platform (at least iOS vs Android). Reproducing the issue:
 Ti.Geolocation.forwardGeocoder('Cleveland, OH'); 
Expected results:
 {"latitude":"41.5051613","longitude":"-81.6934446"} 
Actual results:
 {"latitude":"-81.6934446","longitude":"41.5051613"} 

Comments

No comments

JSON Source