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

Resources for bdwebmap example are blocked by browser. #111

Open
hxxr opened this issue Jan 5, 2020 · 2 comments
Open

Resources for bdwebmap example are blocked by browser. #111

hxxr opened this issue Jan 5, 2020 · 2 comments
Labels

Comments

@hxxr
Copy link

hxxr commented Jan 5, 2020

I cannot run the bdwebmap example using Google Chrome on Windows because the browser blocks the resources required for the webpage to load when using the file protocol:

Access to XMLHttpRequest at 'file:///C:/Users/<USERNAME>/bs/bs.geojson' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

The page will also not load in Internet Explorer, but it works fine in Microsoft Edge. In Google Chrome the issue can be circumvented by loading Chrome with the --allow-file-access-from-files flag, but this is not a good approach.

Code:

require(bdvis)
require(rinat)
inat <- get_inat_obs_project("reptileindia") 
inat <- format_bdvis(inat,source='rinat')

bdwebmap(head(inat,25))

sessionInfo.txt

@ZeroDawn0D
Copy link
Contributor

ZeroDawn0D commented Jan 7, 2020

library(rinat)
library(bdvis)
dataset <- get_inat_obs_project("flora-of-japan")
dataset <- format_bdvis(dataset, source = 'rinat')
dataset <- dataset[1:30,]
bdwebmap(dataset)

Status
Google Chrome: Grey Screen with colour coded legend
Internet Explorer: Grey Screen with colour coded legend
Microsoft Edge: Functioning
Opera: Grey Screen with colour coded legend
Firefox: Grey Screen with colour coded legend
Session Info

@pratishrai
Copy link

pratishrai commented Jan 9, 2020

require(bdvis)
require(rinat)
inat<-get_inat_obs_project("reptileindia") 
inat <- format_bdvis(inat,source='rinat')
bdwebmap(head(inat,30))

I have tried several browsers but the map is loading only in Microsoft Edge.

Session_Info.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants