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

No internet connection #31

Open
andrewmaclachlan opened this issue Oct 15, 2021 · 4 comments
Open

No internet connection #31

andrewmaclachlan opened this issue Oct 15, 2021 · 4 comments

Comments

@andrewmaclachlan
Copy link

Some of my students get a strange issue when using read_osm() of no internet connection, despite there being an internet connection. I'm not sure why this is happening. Code sample below, where BoroughDataMap is an sf of London Boroughs.

BoroughDataMap %>% st_bbox(.) %>% tmaptools::read_osm(., type = "osm", zoom = NULL)

@Cam-in
Copy link

Cam-in commented Jun 14, 2022

Same when here:
CBS_osm1 <- tmaptools::read_osm(CBS_bb, type="bing") for plotting a map with a satellite image as background.

I found how to test internet:
out<-RCurl::url.exists("https://www.google.com")
out

And even when out = TRUE if interrnet is available, I am not able to run tmaptools. Did you found a solution??
Thanks

@silverbullet1472
Copy link

this issue still exist! connection has been checked using curl, but still reports no connection!

@Licky939
Copy link

I solved this problem by setting up a proxy. Please refer to the following website
https://support.posit.co/hc/en-us/articles/200488488-Configuring-R-to-Use-an-HTTP-or-HTTPS-Proxy
In short, ①file.edit('~/.Renviron')
②Enter the following code to access this file, then save and exit
http_proxy="http://127.0.0.1:7890"
https_proxy="http://127.0.0.1:7890"
##I am using clash, so the port is 7890(default)
③restart your rstudio
then the function(tmaptools::read_osm) could work

@mtennekes
Copy link
Member

This is the function that I wrote to check the internet connection for tmaptools:

tmaptools:::working_internet()

Please check if it works, and otherwise, suggestions for improvement most welcome!

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

5 participants