[WordPress] 外掛分享: Embed Google Map

首頁外掛目錄 › Embed Google Map
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
1,000+
安裝啟用
★★★★
4.1/5 分(9 則評價)
3032 天前
最後更新
問題解決
WordPress 3.0.1+ v3.2 上架:2012-12-12

內容簡介

Embed Google Map 是一款在 WordPress 文章、頁面、文字小工具以及模板中嵌入一個或多個 Google 地圖的外掛。添加地圖非常簡單,只需將您想在地圖上顯示的位置的地址或座標添加在 google_map 標籤的內部,就可以插入到文章、頁面、文字小工具或模板中。

本外掛支援 Google 地圖、Google 地圖經典版和 Google 地圖嵌入 API。可以使用版本設置 (支援值: new, classic, embed) 來設定要使用的版本。Google 地圖和 Google 地圖經典版不需要 API 金鑰,但 Google 地圖嵌入 API 需要使用 API 金鑰。

您可以定義 Google 地圖的版本、地圖類型 (標準、衛星、混合、地形)、地圖大小、Google 地圖介面的語言、自訂標籤、縮放級別、邊框佈局和到全尺寸地圖的鏈接。支援 HTTP 和 HTTPS 協議。在網站中,所有地圖使用的預設設置都定義在管理面板中,可以為單獨的地圖覆蓋這些設置。

功能

可以在文章、頁面、文字小工具或模板中嵌入一個或多個 Google 地圖。
支援 [google_map] 短碼。
地址或座標被提供作為參數來在地圖上顯示某個地點。
定義要使用的 Google Maps 版本。
定義 Google 地圖介面的語言。
定義地圖類型 (標準、衛星、混合、地形)。
定義地圖大小。
定義縮放級別。
定義自訂標籤。
顯示/隱藏資訊標籤。
定義邊框寬度、邊框樣式和邊框顏色。
添加到全尺寸地圖的鏈接。
定義鏈接標籤。
支援 HTTP 和 HTTPS。

基本使用方法

要在文章、頁面或文字小工具中插入地圖,請使用以下代碼 :

{google_map}address{/google_map}

*{google_map}latitude,longitude{/google_map}

**{google_map}url{/google_map}

*latitude,longitude = 十進制度數的座標

** 存儲在 Google Maps “我的地點” 中的地圖的 URL

覆蓋預設設置

要覆蓋一個或多個預設設置,請使用以下代碼 :

{google_map}address|縮放級別:10{/google_map}

{google_map}address|版本:經典版|縮放級別:10{/google_map}

{google_map}address|縮放級別:10|語言:it{/google_map}

{google_map}address|語言:system{/google_map}

{google_map}address|寬度:200|高度:200|邊框:1|邊框樣式:solid|邊框顏色:#000000{/google_map}

{google_map}address|寬度:200|高度:200|鏈接:yes|鏈接標籤:Label{/google_map}

{google_map}address|鏈接:yes{/google_map}

{google_map}address|類型:衛星{/google_map}

{google_map}address|show_info:yes|info_label:Label{/google_map}

{google_map}address|link_full:yes{/google_map}

{google_map}address|https:yes{/google_map}

*{google_map}latitude,longitude{/google_map}

**{google_map}url|寬度:200|高度:200|邊框:1{/google_map}

*latitude,longitude = 十進制度數的座標

** 存儲在 Google Maps “我的地點” 中的地圖的 URL

短碼

要在模板中嵌入地圖,請使用 [google_map] 短碼。例如 :

echo do_shortcode(‘[google_map]’.$address.'[/google_map]’);

Embed Google Maps 支援的所有設置都可以設置為短碼屬性。例如 :

echo do_shortcode(‘[google_map 版本=”經典版” 語言=”en” 鏈接=”yes” 寬度=”200″ 高度=”200″]…’);

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.2) 或搜尋安裝

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

原文外掛簡介

Embed Google Map is a plugin for embedding one or more Google Maps to WordPress posts, pages, text widgets and templates. Adding maps is very simple, just add the address or the coordinates which location you want to show on a map inside google_map tags to a post or a page or a text widget or a template, and that’s it!
The plugin supports Google Maps, Google Maps Classic and Google Maps Embed API. The version to be used can be set by using the Version setting (supported values: new, classic, embed). Google Maps and Google Maps Classic do not require an API key, but for Google Maps Embed API an API key is required instead.
It’s possible to define the version of Google Maps, the type of the map (normal, satellite, hybrid, terrain), the size of the map, the language of the Google Maps interface, custom labels, zoom level, border layout and link to the full size map. Both HTTP and HTTPS protocols are supported. The default settings defined in the admin panel are used for all the maps in the site, and they can be overridden for individual maps.
Features

It’s possible to embed one or more Google Maps within a post, page, text widget or template.
Support for [google_map] shortcode.
The address or the coordinates which location is shown on a map is given as a parameter.
Define Google Maps version to be used.
Define the language of the Google Maps interface.
Define the type of the map (normal, satellite, hybrid, terrain).
Define the size of the map.
Define the zoom level.
Define custom labels.
Show/hide the info label.
Define the border width, border style and border color.
Add link to the full size map.
Define the link label.
Support for HTTP and HTTPS.

Basic Usage
To embed a map in a post, page or text widget use the following code:
{google_map}address{/google_map}
*{google_map}latitude,longitude{/google_map}
**{google_map}url{/google_map}
*latitude,longitude = coordinates in decimal degrees
** URL of a map stored under My Places on Google Maps
Overriding Default Settings
To override one or more default settings use the following code:
{google_map}address|zoom:10{/google_map}
{google_map}address|version:classic|zoom:10{/google_map}
{google_map}address|zoom:10|lang:it{/google_map}
{google_map}address|lang:system{/google_map}
{google_map}address|width:200|height:200|border:1|border_style:solid|border_color:#000000{/google_map}
{google_map}address|width:200|height:200|link:yes|link_label:Label{/google_map}
{google_map}address|link:yes{/google_map}
{google_map}address|type:satellite{/google_map}
{google_map}address|show_info:yes|info_label:Label{/google_map}
{google_map}address|link_full:yes{/google_map}
{google_map}address|https:yes{/google_map}
*{google_map}latitude,longitude{/google_map}
**{google_map}url|width:200|height:200|border:1{/google_map}
*latitude,longitude = coordinates in decimal degrees
** URL of a map stored under My Places on Google Maps
Shortcode
To embed a map in a template use [google_map] shortcode. For example:
echo do_shortcode(‘[google_map]’.$address.'[/google_map]’);
All the settings supported by Embed Google Maps plugin can be set as shortcode attributes. For example:
echo do_shortcode(‘[google_map version=”classic” lang=”en” link=”yes” width=”200″ height=”200″]’.$address.'[/google_map]’);
In addition, [google_map] shorcode can be used inside pages, post and text widgets too.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon