googleway icon indicating copy to clipboard operation
googleway copied to clipboard

`markerColourIconCheck()` fixes error being thrown when allowed colou…

Open merlinoa opened this issue 3 years ago • 1 comments

…rs used

Thanks for the excellent package! When using one the allowed colours in add_marker(), I was running into this error:

Warning: Error in : Can't subset columns that don't exist.
x Column `blue` doesn't exist.

I traced down the error to the check in the markerColourIconCheck() function. The below PR resolves the above error. The @param documentation has also been updated to reflect how it looked like the argument was actually being used.

Just a suggestion -- I would change the argument name to "check_colour" and make it a boolean because the actual string value of the "colour" or NULL is not used in the check; the colours in the "colour" column of data are what is actually checked. I did not make this change because I wanted to change as little as possible. Thanks again for great package!

merlinoa avatar Apr 15 '21 13:04 merlinoa

Thanks for the PR - I think it looks good; will give it a full test later today (Australian time)

dcooley avatar Apr 15 '21 22:04 dcooley