Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: Release 2.1.1
-
Fix Version/s: Sprint 2012-16 API, Release 2.1.2, Release 3.0.0
-
Component/s: Android
-
Environment:
Titanium SDK: 2.1.1
Platform OS: Android 2.3
Description
Issue
When an address is passed into Ti.Geolocation.forwardGeocoder() the callback function is not called and it gets stuck in an infinite loop. It should behave just like it does on iOS where the callback is called upon success/failure. The sample code is attached. On iOS we receive both alerts that the callback was successful and the finished alert. On Android we do not see the alert that the callback was successful just that we started the fowardGeocoder().
Sample Code
var win = Ti.UI.createWindow({
|
backgroundColor : 'white'
|
});
|
//create object instance, a parasitic subclass of Observable
|
var self = Ti.UI.createView();
|
win.add(self);
|
|
win.open();
|
|
var addr = '94302';
|
|
setTimeout(function() {
|
alert('Start forwardGeocoder for: ' + addr);
|
try {
|
Ti.Geolocation.forwardGeocoder(addr, function(evt) {
|
alert('Foward Geocoder Callback for 94302 Successful');
|
});
|
} catch(err) {
|
alert("Error");
|
}
|
|
}, 2000);
|
|
setTimeout(function() {
|
addr = 'hhhhhhgggggg';
|
alert('Start forwardGeocoder for: ' + addr);
|
try {
|
Ti.Geolocation.forwardGeocoder(addr, function(evt) {
|
alert('Foward Geocoder Callback for ' + addr + ' Successful');
|
setTimeout(function() {
|
alert('finished');
|
}, 2000);
|
});
|
} catch(err) {
|
alert("Error 2");
|
}
|
|
}, 8000);
|