
內容簡介
這個外掛需要 WordPress 5.0 或以上版本。
API 金鑰
使用這個外掛必須要有 Google 地圖的 API 金鑰,否則地圖將無法顯示。
要取得 API 金鑰,請遵循以下步驟:
1. 在 Google 開發人員控制台這裡建立一個新專案。
2. 給專案取一個名字。
3. 選擇 HTTP 參照者 (網站) 作為金鑰限制類型。
4. 輸入使用 API 金鑰的網域。
– 例如: *.mysite.com
5. 點擊「建立」按鈕。
6. 把 API 金鑰儲存到安全的地方。
7. 在外掛設定中輸入 API 金鑰。
8. 如有需要,清除完整網頁快取。
注意:為了避免他人濫用,API 金鑰需要進行限制。API 金鑰將會在 WordPress 編輯器和網站前端顯示以生成地圖。
使用方法
在外掛設定中儲存好 API 金鑰之後,只要輸入地點,例如紐約市,或完整地址。在區塊設定中還可以選擇地圖的寬度、高度、縮放等細節,並在交互地圖與靜態圖像之間切換。這些設定都會在選取區塊時在右側側邊欄中顯示。
外掛標籤
開發者團隊
② 後台搜尋「Gutenberg Block For Google Maps Embed By Pantheon」→ 直接安裝(推薦)
原文外掛簡介
This plugin requires WordPress 5.0 or greater.
API Key
This plugin requires an API key to interact with Google Maps. Without an API key maps will not be displayed.
To obtain an API key follow these steps:
1. Create a new project in the Google Developer’s console by clicking here and selecting Create new project
1. Name your project
1. Select HTTP referrers (web sites) for the Key restriction type
1. Enter the domains where your API key will be used
– Example: *.mysite.com
1. Click the Create button
1. Write your API key down in a safe place
1. Enter the API key into the plugin settings
1. Clear full page caching, if necessary
Note: The API key will be exposed publicly to generate the map. It is important to restrict your API key so others do not abuse it. The API key will be used, and displayed, in both the WordPress editor and the front end of the site.
Use
Once you have saved an API key into the plugin settings simply enter a location, such as New York, NY, or a full address. You may also choose the map width, height, zoom level and toggle between an interactive map or a static image in the block settings, which are visible in the right-hand sidebar when the block is selected.
