-
Notifications
You must be signed in to change notification settings - Fork 78
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
New addressFormat property #4
Conversation
…address formats with (for now) 2 types: - SVAddressFormatUS (the default) mantains original address format, ie: "400, South Boulevard" - SVAddressFormatSpanish: uses the reversed address format, usually used in Spanish speaking country, ie: "South Boulevard 400"
…address formats with (for now) 2 types: - SVAddressFormatUS (the default) mantains original address format, ie: "400, South Boulevard" - SVAddressFormatSpanish: uses the reversed address format, usually used in Spanish speaking country, ie: "South Boulevard 400"
This seems like overkill. How about detecting the current locale with [NSLocale currentLocale] so that SVGeocoder knows which format to use? |
Well for my current scenario I can't trust that, but feel free to Cheers, Diego! Sent from my iPhone On 22/09/2011, at 15:58, Sam Vermette
|
Well it is overkill in the perspective that NSLocale could do the job. I'm curious, what's you particular use case? |
Fully agree to samvermette. |
Well it could be in the scope of SVGeocoder, but it should be automatic in response to the current NSLocale. I shouldn't have to set some property to have it format the address in a specific locale (Apple doesn't do this and uses NSLocale). |
In my specific usage scenario, i need to format the address based on the country the user actually is, as in, geographically speaking, hence, i can not trust NSLocale and thats why i wanted to have a property for each of the 4 or 5 possible address formats around the world, and switch depending on the user's location. |
By the way, you might want to have a look at the "language" parameter for the geocoding requests. For instance, this request here: http://maps.googleapis.com/maps/api/geocode/json?latlng=40.4264,-3.6877&sensor=true&language=es returns This obviously isn't supported by SVGeocoder, but thought maybe you'd be interested in knowing this. |
I'm of course interested! thanks for the tip, maybe i can come with a better solution now, thanks! On Sep 29, 2011, at 10:40 PM, Sam Vermette wrote:
|
I know this is not exactly what you were after, but I finally decided to push a fix for this. SVGeocoder now automatically uses the device's current locale to set that In other words, making that geocoding request from a spanish device should return a properly formatted address string. |
Added new addressFormat property allowing the selection of different address formats with (for now) 2 types: