[TIMOB-13585] Mobile Web: Titanium.Geocoder.forwardGeocoder doesn't work properly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-18T20:59:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 08 JS, 2013 Sprint 08, Release 3.1.1, Release 3.2.0 |
Components | MobileWeb |
Labels | n/a |
Reporter | Roman Kamenetsky |
Assignee | Bryan Hughes |
Created | 2013-02-05T11:34:42.000+0000 |
Updated | 2013-05-29T17:02:16.000+0000 |
Description
Ti.Geolocation.fastForward returns an object of the wrong type (structure) in the callback.
Actual behavior:
- evt contains only two properties: success and places.
Expected behavior:
- evt corresponds to the documentation: http://docs.appcelerator.com/titanium/latest/#!/api/ForwardGeocodeResponse
Tested in the web browser of Android 2.3.7.
Code example:
var addr = "2065 Hamilton Avenue San Jose California 95125";
Titanium.Geolocation.forwardGeocoder(addr,function(evt)
{
for (var i in evt) {
console.log("i = " + i + ", evt[i] = " + evt[i]);
}
}
Actual printout:
i = success, evt[i] = true
i = places, evt[i] = [object Object]
Hi Roman, As stated in the documentation, the extra fields are returned only in the Android and iOS platforms.
Note: many of the fields are Android only or iOS only. I went through the docs and it appears that the fields that should be common across all platforms are: success code error latitude longitude
PR: https://github.com/appcelerator/titanium_mobile/pull/4169
Titanium.Geocoder.forwardGeocoder works fine as expected. Verified on: Device: Samsung Galaxy Note, Android version: 2.3.6 SDK: 3.1.1.v20130425155025 CLI version : 3.1.0-cr OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.0.201304281117 XCode : 4.5.1