add SerializeToLonLat function and switch web calls to use that#71
add SerializeToLonLat function and switch web calls to use that#71
Conversation
change ToString back to its default behaviour
|
Well, this is awkward. I found out why I had to override protected static string GetUrlQueryFromArray<U>(U[] items, string separator = ",")
{
return string.Join(separator, items.Select(item => item.ToString()).ToArray());
}This is using Not sure if this is an easy fix or even worth it. |
|
I'd also like to note that if feels "dangerous" to expect |
|
Reminder: please don't forget about unit tests, either run them locally or check on AppVeyor. eg.:
What about about dedicated methods for each use case?
|
This is probably fine, but will require sweeping changes, with many classes affected, right? |
|
@brnkhy do you still want to get this in before we freeze or is this PR stale? |
|
@BergWerkGIS I think we should, I feel like overriding ToString like that is fundamentally wrong so if you guys agree, let's not ship like that. |
|
@brnkhy I, too, like methods to be as verbose as possible (and needed). So how about And let string.Format(NumberFormatInfo.InvariantInfo, "X:{0:F5} Y:{1:F5}", this.x, this.y);which would have the advantage to show up nicely in the debugger. Also: please evaluate the consequence of this change in |
|
@BergWerkGIS |
Yes, tests in this repo (see above). But as well the consequences of this PR in |
|
@BergWerkGIS @brnkhy As mentioned here: #71 (comment), I think this refactor is more work than we think. GetUrlQueryFromArray is used by multiple objects--not just directions. |

change ToString back to its default behaviour