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

coordinates in querystring (the ll=) are formatted incorrectly when thread is non-us culture #30

Open
TickleKitty opened this issue Jul 28, 2017 · 0 comments

Comments

@TickleKitty
Copy link

Yelp wants these to be formatted as 11.22222222, -33.4444444. The website I am using the library on is often run for a French audience so my thread culture is fr-FR so this gets formatted as ll=11,22222222, -33,4444444 (note commas instead of periods) so Yelp throws an error along the lines of INVALID LOCATION.

I have pulled the library down from github and I have written my own version of the CoordinateOptions class where I override the GetParameters to force a format of the lat/lng in US format. This works when I run some debug tests in a test console but only because I am rebuilding the YelpSharp.dll along with my tests.

I have tried adding just this override class to my project but it is ignored. I am not an expert with overrides but I believe this is because the original inside of the compiled YelpSharp DLL is not a virtual class therefor my change does not get picked up.

I am being told by others on my team that rebuilding my own version of YelpSharp and adding to the project is not an option because this change would "get lost" along the way and at some point someone would run a nuget package restore or something that would wipe out my version with the latest from nuget. I'm also being told that fooling around with the culture on the thread that runs this particular call to YelpSharp business search is not allowed either. To me that would solve the problem without question but various folks here say it is a no-no.

So I am kind of stuck. :( I am open to suggestions about how I might fix this. The library has worked splendidly before so I am not too keen on abandoning it. Is there an option I have missed? Certainly somebody else has to have encountered this same problem?

Thanks to anyone who can help with this.

  • Eve
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