[TIMOB-19875] Ti.Geolocation.reverseGeocoder gives twisted value of latitude,longitude.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2015-11-19T09:32:06.000+0000 |
Affected Version/s | Release 5.0.2 |
Fix Version/s | n/a |
Components | Android |
Labels | supportTeam |
Reporter | Mitul Bhalia |
Assignee | Srikanth Sombhatla |
Created | 2015-10-27T13:11:22.000+0000 |
Updated | 2015-11-19T09:32:06.000+0000 |
Description
Recently I tried to solve issue in Q&A forum but I got same result as he got.
So the problem is Ti.Geolocation.reverseGeocoder gives latitude & longitude in reverse order.
Example :
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH;
Ti.Geolocation.getCurrentPosition(showAddress);
function showAddress(e) {
Ti.API.info("Latitude == " + e.coords.latitude);
Ti.API.info("Longitude == " + e.coords.longitude);
Ti.Geolocation.reverseGeocoder(e.coords.latitude , e.coords.longitude, function (data){
Ti.API.info("\nReverse Geocode address == " + JSON.stringify(data.places[0]));
Ti.API.info("\nReverse Geocode Lat == " + data.places[0].latitude);
Ti.API.info("Reverse Geocode Long == " + data.places[0].longitude);
});
}
OUTPUT :
Latitude == 11.12345
Longitude == 55.12345
Reverse Geocode address == {"street":"xxxx","city":"xxxx","address":"xxxxxxxx","state":"xxxxxx","country_code":"xxxx","country":"xxxx","longitude":11.12345,"latitude":55.12345,"zipcode":"xxxx"}
Reverse Geocode Lat == 55.12345
Reverse Geocode Long == 11.12345
Reference Link :
https://community.appcelerator.com/topic/3858/could-anyone-try-the-below-code-get-back-to-me-whether-it-is-really-a-bug-or-i-am-doing-something-wrong
Comments
- Srikanth Sombhatla 2015-11-11