an embedded map/iframe not showing

13 views
Skip to first unread message

Qiongyu Chong Huang

unread,
Sep 22, 2014, 11:37:39 AM9/22/14
to shinyap...@googlegroups.com
Hi there, 

I am trying to embed an ESRI map into shiny page using iframe tag. The map can be displayed on local browser (but it can NOT show on Rstudio preview window), it is NOT displaying either on browser after I upload the code on ShinyApps server. I am confused whether this is a shiny or shinyapps problem, or both.  

The code I am using in ui.R is:


Thanks in advance for any help and suggestion. 

Chong 

Yihui Xie

unread,
Sep 22, 2014, 4:22:48 PM9/22/14
to Qiongyu Chong Huang, shinyap...@googlegroups.com
When an app does not work in the web browser, the first thing you can
do is to open the JavaScript console (e.g. in Google Chrome, Ctrl +
Shift + J) and see if there are error messages. In your case, the
error message is:

[blocked] The page at 'https://demo.shinyapps.io/shiny-test/' was
loaded over HTTPS, but ran insecure content from
'http://www.arcgis.com/home/webmap/embedViewer.html?webmap=f7535ebbb05b4eaf8…36&displayslider=true&displayscalebar=true&displaydetails=true':
this content should also be loaded over HTTPS.

This is because ShinyApps.io uses HTTPS to host apps, so normal HTTP
resources will not work (e.g. http://www.arcgis.com).

After I replaced http://www.arcgis.com with //www.arcgis.com (this is
called "Protocol relative url"; see
http://stackoverflow.com/q/9161769/559676) and deployed the app to
ShinyApps, the background map showed up. Then you have to work out the
rest of issues, since there seem to be many, many errors in the
JavaScript console, which are not relevant to Shiny or ShinyApps.io.
These errors also show up when the app is running locally. Sorry I'm
not familiar with arcgis.com so I cannot help further.

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name
Reply all
Reply to author
Forward
0 new messages