angular-material-extensions / google-maps-autocomplete

Autocomplete input component and directive for google-maps built with angular and material design |
https://angular-material-extensions.github.io/google-maps-autocomplete
MIT License
169 stars 60 forks source link

onGermanAddressMapped -> postalCode: NaN #296

Closed mfrehe closed 5 months ago

mfrehe commented 3 years ago
- [X] bug report
- [ ] feature request

OS and Version?

Ubuntu Linux 20.04 LTS

Versions

Angular CLI: 10.0.8 Node: 13.14.0 OS: linux x64

Angular: 10.0.14 ... animations, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router Ivy Workspace: Yes

Repro steps

Just use the latest version and try to use the onGermanAddressMapped functionality with a non german address.

The log given by the failure

image

Desired functionality

Change type from number to string because the postalCode could contain other characters than numbers

mukeshj95 commented 3 years ago

I have the same issue postal_code is coming to NaN for Canada address

AnthonyNahas commented 3 years ago

as the name of the property isonGermanAddressMapped --> this object is typical for german addresses implemented...

a PR to improve multi countries is welcome