Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which are addressFormat options / How to get just address formatted? #136

Open
jonalxh opened this issue Mar 23, 2018 · 0 comments
Open

Comments

@jonalxh
Copy link

jonalxh commented Mar 23, 2018

Hi again friends.

I'm trying to get just the address (streetName + streetNumber), not the full address with state/province, city and country. I've reviewed your demo page in the Advanced usage of geo decoder features and tried to use the addressComponents.addressLine1 feature, but it didn't work as expected, because the address is not being formatted well.
If I check the code I find that $('#map').locationpicker('map').location.formattedAddress; does the trick in the full address field, but how to format just the addressLine?, look at the comparision:

1 - Full location field:

2 - Just addressLine1:

  • 541-5493 Via Medellín-Via Sta. Elena

Notice in the second example the address is reversed and not being formatted. Please help me :(
I think that with the addressFormat I could do something, but I just find that you suggest postal_code option, and in my case it's not useful (because my country don't use postal code).


By the other hand I'm trying to get the country separately in another field, but I just get the country code, in my case CO instead of Colombia, I wanna get both data, but how?

Thanks a lot, excuse my bad English.

@jonalxh jonalxh changed the title Which are addressFormat options? Which are addressFormat options / How to get just address formatted? Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant