Fix OpenStreetMap tiles not rendering under Chrome #787
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #786
Basically, the problem was from trying to use http URLs when possible. Just use https everywhere.
I've also changed a bunch of external URLs that were used in examples; now using https wherever possible. A couple of URLs needed to change altogether (e.g. webmap.arcticconnect.org became webmap.arcticconnect.ca) and I removed one example that used an image from rstudio.com that's gone now.
There's one more example that doesn't work: #788, but after spending a couple of hours on it I couldn't figure it out. I'd like to leave it for now and get the current release out, since the issue this PR does fix is so severe.
PR task list:
tests/testthat/
R/zzz_viztest.R
devtools::document()
Testing notes
Run this in RStudio:
It should look fine in RStudio, but if you pop it out to an external browser and that browser is Chrome, at least for me it comes up grey. Showing the JS console reveals tons of 403 errors for requests to tile.openstreetmap.org. I have to caveat this by saying this all depends on user agent heuristics, so it's possible it won't reproduce on your machine.
With the changes in this PR, it looks fine everywhere.