Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1420] reverseGeocoder returns postalCode instead of zipcode on Android

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-09T16:54:06.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid
ReporterBryan Jackson
AssigneeIngo Muschenetz
Created2011-04-15T02:51:55.000+0000
Updated2017-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);
                        }
                    });

Comments

  1. Lee Morris 2017-06-09

    Closing ticket due to time passed, any problems please open a new ticket.

JSON Source