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:
Via Medellín-Via Sta. Elena #54-1 a 54-93, Medellín, Antioquia, Colombia
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?
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:
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.