【发布时间】:2016-02-10 04:15:18
【问题描述】:
我想使用 iframe 显示带有以下代码的 Google 地图
<script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js">
<noscript>
<div style="display: inline;">
<img height="1" width="1" style="border-style: none;" alt="" src="https://www.googleadservices.com/pagead/conversion/''/?label='';guid=ON&script=0" />
</div>
</noscript>
<div class="mapContainer" style="width: 251px; height: 202px;">
<iframe id="iGmap" width="251" height="202" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="@Html.Raw(Model.CurrentBranch.GoogleMapURLWithZoomSet)">
</iframe>
</div>
在哪里
src='http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=''&ll='',''&spn='',''&output=embed&z=4'
我在cshtml页面中使用的上述代码 但是给出像 Refused to display 'https://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=...&ll=,&spn=,&output=embed&z=6' 这样的错误,因为它将'X-Frame-Options'设置为'SAMEORIGIN'。
【问题讨论】:
标签: asp.net asp.net-mvc asp.net-mvc-3 google-maps