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

Error when using openmap() with specific tile provider URLs #8

Open
philament opened this issue May 31, 2020 · 0 comments
Open

Error when using openmap() with specific tile provider URLs #8

philament opened this issue May 31, 2020 · 0 comments

Comments

@philament
Copy link

Hi, I think there is an issue in the openmap() function when type specifies a tile URL that contains transparencies.

This works fine:
toner = OpenStreetMap::openmap(c(48,11), c(47,10), zoom=8, type = http://tile.stamen.com/toner/{z}/{x}/{y}.png')

However, the following, which uses only a slight different style of the same map from the same provider (toner-lines instead of toner) fails:

toner = OpenStreetMap::openmap(c(48,11), c(47,10), zoom=8, type = http://tile.stamen.com/toner-lines/{z}/{x}/{y}.png')

Error in col2rgb(x$colorData) : invalid RGB specification

I think it might be related to transparent areas in the returned tiles? Could it be as simple as adding alpha = TRUE to the call to col2rgb() in openmap()?

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