I've got a web map (public shared) that I'm trying to embed in my website as an iframe, per the web map "share" dialog in AGOL. When I try to view it, it comes up for a second or so and then goes away with the following error:
Load denied by X-Frame-Options: https://lcoem.maps.arcgis.com/home/signin.html?returnUrl=https%3A//lcoem.maps.arcgis.com/apps/Embed/... does not permit framing.
Here's the iframe I get directly from AGOL to test if you'd like:
<style>.embed-container {position: relative; padding-bottom: 56%; height: 0; max-width: 100%;} .embed-container iframe, .embed-container object, .embed-container iframe{position: absolute; top: 0; left: 0; width: 100%; height: 100%;} small{position: absolute; z-index: 40; bottom: 0; margin-bottom: -15px;}</style><div class="embed-container"><small><a href="https://community.esri.com//lcoem.maps.arcgis.com/apps/Embed/index.html?webmap=57b8960255194690a002b903e0cc985f&extent=-106.6324,40.1133,-103.7595,41.1471&home=true&zoom=true&scale=true&search=true&searchextent=true&legendlayers=true&basemap_gallery=true&disable_scroll=true&theme=light" style="color:#0000FF;text-align:left" target="_blank">View larger map</a></small><br><iframe width="900" height="500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" title="Current State" ></iframe></div>
Hi Royce,
Your webmap contains two layers that are subscriber content. This means that you need to sign in in order to see the content or create a proxy for the layers. As there is a prompt for login, this is causing the issue that you are seeing when you embed the map. I'd suggest creating the minimalist application. This has the same functionality and look as the embed, but includes a prompt to automatically proxy premium layers. https://www.arcgis.com/home/item.html?id=50aaf4ec408f4675bc9f30e68441e8f8
I see that you are also using the sentinel layer. This also requires a proxy, but due to a bug you won't be prompted in the app. This will be fixed next week, so you can either remove the sentinel layer, or create a proxy at the item level by following the steps to add a secure layer, and saving your arcgis online credentials:
ArcGIS Server web services—ArcGIS Online Help | ArcGIS
-Kelly