AnsweredAssumed Answered

Error when embedding web map iframe

Question asked by simpsonr on Sep 10, 2018
Latest reply on Sep 15, 2018 by KGerrow-esristaff

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/index.html%3Fwebmap%3D57b8960255194690a002b903e0cc985f%26extent%3D-106.6324%2C40.1133%2C-103.7595%2C41.1471%26home%3Dtrue%26zoom%3Dtrue%26previewImage%3Dfalse%26scale%3Dtrue%26search%3Dtrue%26searchextent%3Dtrue%26legendlayers%3Dtrue%26basemap_gallery%3Dtrue%26disable_scroll%3Dtrue%26theme%3Dlight 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="//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>

Outcomes