[TIMOB-1420] reverseGeocoder returns postalCode instead of zipcode on Android
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2017-06-09T16:54:06.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | android |
| Reporter | Bryan Jackson |
| Assignee | Ingo Muschenetz |
| Created | 2011-04-15T02:51:55.000+0000 |
| Updated | 2017-06-09T16:54:06.000+0000 |
Description
On Android zipcode property is returned as postalCode.
Eample workaround for now:
Titanium.Geolocation.reverseGeocoder(response.results[0].geometry.location.lat, response.results[0].geometry.location.lng, function(evt) {
var places = evt.places;
if (places != undefined && places.length > 0) {
//for android check if zipcode is undefined
if (places[0].zipcode == undefined)
Titanium.App.Properties.setString('ZipCode', places[0].postalCode);
else
Titanium.App.Properties.setString('ZipCode', places[0].zipcode);
}
if (oncomplete != undefined) {
oncomplete(response.results[0].geometry.location.lat, response.results[0].geometry.location.lng);
}
});
Closing ticket due to time passed, any problems please open a new ticket.