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

All background maps are blank. #440

Open
ojlise opened this issue Sep 29, 2022 · 2 comments
Open

All background maps are blank. #440

ojlise opened this issue Sep 29, 2022 · 2 comments

Comments

@ojlise
Copy link

ojlise commented Sep 29, 2022

When plotting data on mapview in R, the data points show up, but the background maps do not. I am behind a firewall so I have to use a proxy to get the data. Do I have to set up something similar to be able to load the background maps?

I'm suspecting that the loading of the maps are being stopped by the firewall.

So I end up with a bunch of dots on a blank background.

@hrdawson
Copy link

I'm having the same issue here with both sf and sp object types. However, I can load a map using breweries just fine. So, likely something with how I'm formatting my data...
Example data and code:

#Load packages
library(tidyverse)
library(sf)
#Create example data
latitude = c(44.10606, 44.10668, 43.69781, 43.58378, 43.83922, 43.84134)
longitude = c(-124.0897, -124.0890, -122.0458, -122.7138, -122.5581, -122.5467)
#Make spatial dataframe
data = data.frame(latitude, longitude) %>%
  st_as_sf(coords = c('longitude', 'latitude'))
#Generate map (without basemap)
mapview(data)

I am using R v. 4.2.2 in RStudio v. 2022.2.04 on Mac OSX v. 10.15.7. I'm using mapview v. 2.11.0, sf v. 1.0-9, sp v. 1.6-0.

@adam-gruer
Copy link

I have found that this just happens within the Rstudio viewer pane and again on a corporate network so it could be something blocking the Viewwer pane from calling urls. A workaround is to click the icon to view the map in a new window which opns it in a browser. from memory the Rstudio Viewer is a type of browser (within a web app which is what Rstudio is)
MicrosoftTeams-image (3)
MicrosoftTeams-image (4)

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

3 participants