Leaflet tiles not showing in web viewer
See original GitHub issueDescribe the bug
Leaflet tiles are not showing in the web viewer.
To Reproduce Steps to reproduce the behavior:
- Install and load leaflet
- Run
leaflet %>% addTiles()
- The plot opens up in the web viewer, there are zoom controls, but no map. It is all grey.
Do you want to fix by self? (We hope your help!)
Yes
(If yes,) what kind of help do you want? (e.g. Which file should I fix, Survey (related documents)
I’d love to help, but I don’t know where to get started.
(If related)setting.json
// R path for Linux
"r.rterm.linux": "/home/<user>/.local/bin/radian",
// R command line options (i.e: --vanilla)
"r.rterm.option": [],
// An optional encoding to pass to R when executing the file, i.e. 'source(FILE, encoding=ENCODING)'
"r.source.encoding": "UTF-8",
// Keeping focus when running
"r.source.focus": "editor",
// Use active terminal for all commands, rather than creating a new R terminal
"r.alwaysUseActiveTerminal": false,
// Use bracketed paste mode
"r.bracketedPaste": true,
// Enable R session watcher (experimental)
"r.sessionWatcher": true,
// Delay in milliseconds before sending each line to rterm (only applies if r.bracketedPaste is false)
"r.rtermSendDelay": 8,
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Here is what is looks like in VS Code:
Here is what is looks like in RStudio:
Environment (please complete the following information):
- OS: Linux (Fedora 34)
- VSCode Version: 1.56.2
- R Version: 4.0.5
- vscode-R version: 1.6.8
Additional context
When running a shiny application, the map renders just fine.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Leaflet Map not rendering in Rmarkdown, R Notebook ...
There is something wrong with the default tiles set. Try this: ... Just open the map in Browser instead of Viewer. The same...
Read more >Tiles from gdal2tiles won't appear on leaflet map
Start first by not adding the OSM Tile Layer and make sure your own Tile Layer displays fine. Then you might be interested...
Read more >WebView NOT showing map tiles via LeafLet - YouTube
This is a very simple solution to the problem of not showing map tiles using LeafLet via WebView in an Android or iOS...
Read more >Map tiles not showing up properly on mobile web app
I am using leaflet with my jQuery Mobile app for mobile browsers, I am pretty new to this, and I have problem with...
Read more >Problem when viewing html generated by Leaflet - General
I then go to Export->Save as Web Page to save it as a html. However, when open up the html, the Map tile...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks! I should have a PR up tomorrow, which handles on-demand loading as well
I have the following in order to safely replace strings that could be parsed as URLs:
This does the following:
//
//
replaced withhttps://
//
withhttps://
, else return matchI have had this successfully work with loading
leaflet() |> addTiles()
.There is the route of going purely regex, but I was thinking that this route is safer for modifying the html body