[WordPress] 外掛分享: Travel Map

首頁外掛目錄 › Travel Map
WordPress 外掛 Travel Map 的封面圖片
10+
安裝啟用
尚無評分
3191 天前
最後更新
問題解決
WordPress 3.7+ v1.0 上架:2017-06-22

內容簡介

這個 WordPress 外掛讓你輕鬆創建旅遊百度地圖並添加到你的網站上。你可以創建一個或多個旅遊地圖,然後使用簡碼將地圖插入到頁面中。

使用 Travel Baidu Maps 外掛,你可以生成包含多個位置、路線、超鏈接和圖片的地圖。

這個插件的動機在於中國大陸用戶無法訪問 Google 地圖,因此他們無法使用基於 Google API 的地圖插件,但基於百度 API 的地圖插件有些功能有所限制。

這個插件是由 "Custom baidu maps" 插件衍生而來,但使用方式完全不同,增強了很多功能。

基本使用:

你只需要將地圖保存為草稿,然後在地圖列表頁面中找到一個簡碼,或在點擊"發佈"按鈕後在當前頁面中找到它。

[btmap id="id"]
選項:
- id:旅遊地圖的唯一 ID,例如 333

進階使用:

輸入你的百度開發者 API 金鑰(如果你尚未輸入)。
從 WordPress 菜單中選擇 "Travel Map" 帖子類型。
點擊 "新增"。
輸入地圖設置(高度、寬度、縮放和坐標)。
發佈後,將新生成的簡碼添加到頁面內容中。

在地圖上添加標記(選配):

點擊地圖添加新的標記。
在地圖上點擊右鍵設置中心點,設置數據也會隨之更改。
上下滾動縮放地圖,或在地圖上點擊按鈕,設置數據也會隨之更改。
如果你想在開始時看到詳細​​信息,點擊 "顯示標記詳細信息"。
改變標記的“背景顏色”,可以改變該標記和路線的顏色。
標記的名稱和描述內容支援 HTML,因此你可以嵌入一些小圖片或超鏈接。

在地圖上添加行程(選配):

如果你想在行程中查找行程,點擊 "添加到旅行路線"。

設置 Travel Map 的常規設置:
1. Baidu 開發者 API 金鑰:用於訪問百度地圖 API。
2. 默認路線顏色:你可以指定它以使第一個標記看起來與此默認顏色相同。
3. 默認顯示細節時間:如果一個標記在默認情況下不顯示細節,你可以點擊它顯示細節,然後你可以點擊詳細區域隱藏它,並再次顯示該標記。但是根據我的測試結果,用戶無法在 iPhone 上隱藏詳細內容,因此我增加了這個選項,讓詳細內容在點擊後自動隱藏。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Easily create Travel Baidu Maps to add to any WordPress site. You can create one or multiple travel map
, then insert the map with a shortcode.
With Travel Baidu Maps you can generate a map with multiple locations, a route, hyper links and pictures.
The motive is that China mainland user cannot access Google map, so they could not use these map plugins
based on Google API, but the map plugins based on Baidu API is a little limited.
This plugin comes from “Custom baidu maps” plugin, but the usage is totally different and lots of enhancement.
Basic Usage with shortcodes :
You just need to save the map as draft, then you can find a short code in the maps list page,
or you can find it in the current page after clicking “Publish” button.
[btmap id=”id”]
Options :
– id : unique id for a travel map, such as 333
Advanced Usage Travl Map post-type :

Enter your Baidu Developer API Key (if you have not already).
Select the “Travel Map” post type from the wordpess menu.
Click on “Add New”.
Enter the map settings (height, width, zoom and coordinates).
Upon publishing, add the new generated shortcode to the page content.

Adding a Marker on the map (optional) :

Click on the map to add a new marker to this map.
Right click on the map to set the center point, the setting data will change too.
Scroll up or down to scale the map, or click the button within the map, the setting data will change too.
Click on “Show Marker Details” if you wish to see the details visible at start.
Change the “Back Color” if you wanna the color of that marker and the route ending into it.
The content of name and description for a marker supports HTML, so you could imbed some small image and or hyper link.

Adding a Marker on the map (optional) :

Click on “Add in travel route” if you wish to find it in the travel route.

Set Travel Map general setting:
1. Baidu Developers API key, used to access Baidu map API.
1. Default route color, you can specify it to make your first marker looks with this default color.
1. Default time to show detail after clicking marker, if a marker is set to show no detail at default, you can click
it to show detail, then you can click the detial area to hide it and show the marker again. But as my test result shows,
user cannot hide the detail in iPhone, so I added this option, to let the detail automatically hide after clicking.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon