Loading

將 Google Maps 內嵌為網頁物件時發生錯誤「www.google.com refused to connect」或「The Google Maps Embed API must be used in an iframe」

發佈日期: Nov 9, 2023
描述
在工作簿中將 Google Maps 作為 Web 物件內嵌時,可能會發生以下錯誤:
 
The Google Maps Embed API must be used in an iframe(Google Maps Embed API 必須在 iframe 中使用)
 
存取工作簿的發佈版本時,可能會發生以下錯誤: 

www.google.com refused to connect(www.google.com 拒絕連線)


 
Refused to display 'https://www.google.com/maps?...' in a frame because it set 'X-Frame-Options' to 'sameorigin'(拒絕在框架中顯示「https://www.google.com/maps?...」,因為已將「X-Frame-Options」設定為「sameorigin」)

Cause

Google 伺服器將包含 Google 地圖 URL 的儀表板預留位置解譯為網站內的框架,因此封鎖轉譯地圖。
解決方案

請將下列具有「&output=svembed」參數的格式用於 Google Maps URL:
 
https://maps.google.com/?q=40.5509,-105.0668&output=svembed
 
(而不是https://www.google.com/maps/?q=40.5509,-105.0668

其他資源
有關本主題的詳情,請參閱以下說明文件:
知識文章編號

001471883

 
正在載入
Salesforce Help | Article