GoogleApi icon indicating copy to clipboard operation
GoogleApi copied to clipboard

MapColors end up capitalized

Open CaseyBlackburn opened this issue 7 years ago • 4 comments

MapColors return a color name that is capitalized (for example Purple) which does not get recognized by the api call. Needs to be all lower case. Would also like to use hex colors.

CaseyBlackburn avatar Dec 28 '18 12:12 CaseyBlackburn

Will fix, and look into support for hex color values

vivet avatar Dec 28 '18 13:12 vivet

In GoogleApi\Entities\Maps\StaticMaps\Request\StaticMapsRequest.cs I changed line 216 from: var color = marker.Color.HasValue ? $"color:{marker.Color.ToString()|" : string.Empty; to: var color = marker.Color.HasValue ? $"color:{marker.Color.ToString().ToLower()}|" : string.Empty;

Seems to be a quick fix.

CaseyBlackburn avatar Dec 28 '18 14:12 CaseyBlackburn

I have fixed the uppercase issue. Also, added string property for hex values, which will be used if no static color value is set.

vivet avatar Dec 29 '18 07:12 vivet

I have published update NuGet. Will close the issue

vivet avatar Dec 29 '18 07:12 vivet