[WordPress] 外掛分享: Simple Shortcode for Google Maps

首頁外掛目錄 › Simple Shortcode for Google Maps
WordPress 外掛 Simple Shortcode for Google Maps 的封面圖片
4,000+
安裝啟用
★★★★
4.6/5 分(46 則評價)
358 天前
最後更新
問題解決
WordPress 4.6+ PHP 7.4+ v1.8.2 上架:2012-09-30

內容簡介

簡單易用卻功能強大的 Google 地圖外掛程式!評價中說這是「最佳 Google 地圖短代外掛程式」。
這款外掛程式可讓您透過簡易的短代,在 WordPress 文章和頁面上輕鬆放置 Google 地圖。易用直接,非常適合用於聯絡頁面地圖、顯示送貨區域等等。
這款外掛程式會啟用一個簡單的短代,讓您可以將 Google 地圖嵌入到 WordPress 的任何文章或頁面內。該短代使用 WordPress HTTPS API 和 Transients API 來提供緩存的 Google 地圖,對網站性能幾乎沒有任何影響。
使用 [pw_map] 短代可以顯示地圖:
[pw_map address="紐約市" key="YOUR API KEY"]
Google 現在要求新帳戶使用 API 金鑰。您可以在此處註冊免費 API 金鑰。
您可以擁有多個地圖標記,只需添加多個地址,並用分號 ; 分隔。
[pw_map address="自由女神國家紀念碑紐約市;美國紐約州紐約市帝國大廈" key="YOUR API KEY"]
所有短代選項

必填項目

address – 說明:您要標記的地址 – 允許值:Google 可找到的任何地址,多個地址請用 ; 分隔
key – 說明:您的 Google Maps API 金鑰 – 允許值:有效的金鑰

選填項目(含預設值)

width – 說明:設置地圖寬度 – 預設值:100% – 允許值:大小以 % 或 px 單位
height – 說明:設置地圖高度 – 預設值:400px – 允許值:大小以 % 或 px 單位
enablescrollwheel – 說明:啟用滑鼠滾輪縮放地圖 – 預設值:true – 允許值:true 或 false
zoom – 說明:地圖的初始縮放級別 – 預設值:15 – 允許值:有效的縮放數值從零到支援的最大縮放級別
disablecontrols – 說明:啟用/禁用所有預設的 UI 按鈕。可單獨覆蓋。不會禁用鍵盤控件 – 預設值:false – 允許值:true 或 false
force – 說明:禁用地理編碼的快取,僅用於測試 – 預設值:false – 允許值:true 或 false
zoomcontrol – 說明:顯示縮放 +/- 按鈕 – 預設值:true – 允許值:true 或 false
nozoom – 說明:設置初始縮放並將最小值和最大值設置為該值,以固定縮放級別 – 預設值:false – 允許值:true 或 false
gesturehandling – 說明:此設置控制地圖上的手勢操作。 – 預設值:auto – 允許值:

"cooperative": 滾動事件和單指觸摸手勢滾動頁面,不縮放或移動地圖。雙指觸摸手勢滾動並縮放地圖。帶有按下ctrl或⌘鍵的滾動事件會縮放地圖。在此模式下,地圖與頁面協作。
"greedy": 所有觸摸手勢和滾動事件都會平移或縮放地圖。
"none": 地圖無法通過用戶手勢平移或縮放。
"auto": 手勢處理方式取決於頁面是否可滾動或在 iframe 中。

maptypeid – 說明:確定初始地圖顯示類型

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.8.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Simple Shortcode for Google Maps」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Simple to use, yet powerful, Google Maps plugin! Reviews say this is “Best Google Map Shortcode plugin”.
Put a Google map on your WordPress posts and pages simply and easily with a shortcode. Straight forward and easy to use! Ideal for contact page maps, maps showing delivery areas and many other uses!
This plugin will enable a simple shortcode that you can use for embedding Google Maps in any WordPress post or page. The shortcode uses the WordPress HTTPS API and the Transients API for delivering cached Google maps with little to no impact on your site’s performance.
Maps are displayed with the [pw_map] shortcode:
[pw_map address="New York City" key="YOUR Map JS API KEY" geokey="YOUR Geo API KEY"]

Google now requires that new accounts use an API key. You can register a free API key here.
You can have multiple map pins, simply add multiple addresses separated by semi-colon ;
[pw_map address="Statue of Liberty National Monument NYC;Empire State Building, New York, NY, USA" key="YOUR Map JS API KEY" geokey="YOUR Geo API KEY"]

All Shortcode Options
Mandatory
address – Description: The address you want pinned – Allowed values: any address that Google can find, multi addresses separated by ;
key – Description: Your Google Maps API Key – Allowed values: valid key
geokey – Description: Your Google Geocoding API Key – Allowed values: valid key
Why two key? You should restrict your API keys to avoid abuse. You need to use the geokey to allow the geocoding to work, enabled on the GeoCoding API, restricted to your server IP, and key
enabled on the Maps JavaScript API restricted to your website domain(s).
Optional ( with default values)
width – Description: sets the map width – Default: 100% – Allowed values: size in % or px
height – Description: sets the map height – Default: 400px – Allowed values: size in % or px
enablescrollwheel – Description: zooming on the map using a mouse scroll wheel – Default: true – Allowed values: true or false
zoom – Description: The initial Map zoom level – Default: 15 – Allowed values: Valid zoom values are numbers from zero up to the supported maximum zoom level
disablecontrols – Description: Enables/disables all default UI buttons. May be overridden individually. Does not disable the keyboard controls – Default: false – Allowed values: true or false
force – Description: disable caching of geocoding, only use this on test – Default: false – Allowed values: true or false
zoomcontrol – Description: display the Zoom +/- buttons – Default: true – Allowed values: true or false
nozoom – Description: fixes the zoom level by seeting min and max to the starting zoom – Default: false – Allowed values: true or false

gesturehandling – Description: This setting controls how the amp handles gestures on the map. – Default: auto – Allowed values:

“cooperative”: Scroll events and one-finger touch gestures scroll the page, and do not zoom or pan the map. Two-finger touch gestures pan and zoom the map. Scroll events with a ctrl key or ⌘ key pressed zoom the map. In this mode the map cooperates with the page.
“greedy”: All touch gestures and scroll events pan or zoom the map.
“none”: The map cannot be panned or zoomed by user gestures.
“auto”: Gesture handling is either cooperative or greedy, depending on whether the page is scrollable or in an iframe.

maptypeid – Description: Determines the initial map display type – Default: roadmap – Allowed values:

“roadmap”: This map type displays a normal street map.
“satellite”: This map type displays satellite images.
“hybrid”: This map type displays a transparent layer of major streets on satellite images.
“terrain”: This map type displays maps with physical features such as terrain and vegetation.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon