SymbolixAU / googleway

R Package for accessing and plotting Google Maps
http://symbolixau.github.io/googleway/
Other
234 stars 46 forks source link

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

Open merlinoa opened 3 years ago

merlinoa commented 3 years ago

…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!

dcooley commented 3 years ago

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