[TIMOB-20039] Android: forwardGeocoder Longitude & Latitude values reverse
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2015-12-04T06:40:47.000+0000 |
Affected Version/s | Release 5.0.2 |
Fix Version/s | n/a |
Components | Android |
Labels | Community |
Reporter | James Childs |
Assignee | Ashraf Abu |
Created | 2015-10-30T22:12:18.000+0000 |
Updated | 2017-03-22T21:44:59.000+0000 |
Description
The longitude and latitude values are reported in reverse order when executing the forwardGeocoder method on Android. To reproduce, copy the following code into the app.js file of a new project and run on IOS and Android emulators.
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
top:'20dp',
width:'auto'
});
win1.add(label1);
var label2 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 2',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
top:'60dp',
width:'auto'
});
win1.add(label2);
Titanium.Geolocation.forwardGeocoder("KANSAS CITY, MISSOURI", function(g){
if (g.success == true){
Ti.API.info(JSON.stringify(g));
label1.setText('Longitude: '+g.longitude);
label2.setText('Latitude : '+g.latitude);
} else {
alert("Invalid stop information specified. Please check the value entered.");
}
});
win1.open();
The results will be the longitude will be displayed in the top label, and the latitude in the bottom label on IOS, but reversed when run on Android.
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2015-11-02 at 11.07.16 AM.png | 2015-11-02T05:12:23.000+0000 | 22643 |
Simulator Screen Shot Nov 2, 2015, 10.59.24 AM.png | 2015-11-02T05:12:24.000+0000 | 32669 |
Tested this on 5.0.0.GA, 5.1.0.GA and 5.1.1.GA on Android. Facing no issues right now.
Resolving as invalid as it seems to be working correctly.
Closing ticket as invalid with reference to previous comments.