[WordPress] 外掛分享: OS OpenSpace Maps

WordPress 外掛 OS OpenSpace Maps 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「OS OpenSpace Maps」是 2012-01-09 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 40 個安裝啟用數。
  • 上一次更新是 2021-09-29,距離現在已有 1313 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.5 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.2.4 以上。
  • 有 4 人給過評分。
  • 論壇上目前有 1 個提問,問題解答率 100% ,不低,算是個很有心解決問題的開發者團隊了!

外掛協作開發者

jonlynch | skirridsystems |

外掛標籤

map | maps | walking | OpenSpace | ordnance survey |

內容簡介

這是一個用於顯示英國 Ordnance Survey OpenSpace 地圖及標記和軌跡的 WordPress 外掛程式。

重要通知

自 2021 年 8 月起,Ordnance Survey 已經退出了 OpenSpace 服務,並將其替換為新的 OS Maps API,可在 OS 數據中心上使用。新服務具有更高的性能,現已有一款新的 OS DataHub Maps 外掛可用於操作。新的外掛使用相同的短代碼,與 OpenSpace 外掛兼容,因此您不必更改短代碼。它還包含一些新功能,如全屏視圖和海拔高度曲線。

如果您想顯示 OS 地圖,請安裝 OS DataHub Maps 外掛程式,並在 OS DataHub 服務器上創建一個免費帳戶。請勿安裝此外掛程式,因為您無法啟動OS OpenSpace 帳戶,現有的 OpenSpace 帳戶很快就會停止運作(如果他們還沒停了的話)。

有關使用 OS DataHub Maps 外掛程式和獲取帳戶的完整說明,請參閱外掛程式主頁面。

概述

此外掛程式可在文章、頁面或自定義文章類型內容中使用 [osmap] 短代碼,以顯示帶有標記或 GPX/KML 文件的地圖。

以下屬性可以傳遞:

高度="600" 設定地圖 div 的高度
寬度="800" 設定地圖 div 的寬度。留空以使用可用的寬度。
縮放="5" 設定初始縮放級別
顏色="紅色" 或 顏色="#ff0000"(亦可接受 colour)設定從文件中顯示的軌跡的顏色。
軌跡="3" 設定從文件中顯示的軌跡的寬度
gpx="http://www.example.com/myfile.gpx" 指定要顯示的 gpx 文件
kml="http://www.example.com/myfile.kml" 指定要顯示的 kml 文件
標記="NY1234512345;Marker 1|54.454198,-3.211527;Marker 2" 一個由位置和(可選)標籤組成的列表,中間以 | 分隔,位置和標籤之間以 ; 分隔。位置可以是 6、8 或 10 位數字的網格參考或十進制緯度和經度。如果存在標籤,則必須是簡單的文本。
markerfile="http://example.com/markers.txt" 指定包含標記定義的文本文件,每行一個。如上所述,位置和標籤以 ; 分隔。在此情況下,標籤可以包含任何文本,包括 HTML,如果您希望包括鏈接或其他格式。
中心="54.454198,-3.211527" 設定地圖中心點,以覆蓋默認中心或如果未使用標記或軌跡文件

縮放使用 OS 縮放值,這基本上是在 1:10000 比例上的乘數,因此 5 表示 1:50000,100 表示 1:1M。可用的縮放值為 1、2、2.5、4、5、10、20、50、100、200、500、1000、2500。編輯文章或頁面時,這些也會在幫助選項卡上列出。

要上傳 KML 或 GPX 文件,只需使用 WordPress 媒體上傳工具,然後將上傳文件的地址複製到短代碼中即可。

範例

[osmap height="300" width="300" color="blue" gpx="http://www.example.co.uk/myfile.gpx"] 顯示一個 300 x 300 像素窗口,其中包含指定文件內的藍色軌跡。

原文外掛簡介

A plugin to display UK Ordnance Survey OpenSpace maps with markers and tracks.
Important Notice
Ordnance Survey has now withdrawn the OpenSpace service as of August 2021, having replaced it with their new OS Maps API on the OS Data Hub. The new service is much superior and there is a new OS DataHub Maps plugin available to use it. The new plugin uses the same shortcode and is compatible with the OpenSpace plugin, so you should not have to change your shortcodes. It contains several new features such as fullscreen view and elevation profiles.
If you want to display OS maps, install the OS DataHub Maps plugin instead and create a free account on the OS DataHub server. Do not install this plugin as you will not be able to activate an OS OpenSpace account and existing OpenSpace accounts will stop working soon (if they haven’t already).
Full instructions for using the OS DataHub Maps plugin and getting an account are available on the plugin homepage
Overview
This plugin works using the [osmap] shortcode anywhere in your post, page or custom post type content. It allows maps with markers or GPX/KML files to be shown.
The following attributes can be passed:

height="600" sets the height of the map div
width="800" sets the width of the map div. Leave blank to use available width.
scale="5" sets the initial zoom level
color="red" or color="#ff0000" (colour is also acceptable) sets the colour of the track shown from a file.
track="3" sets the width of the track shown from a file.
gpx="http://www.example.com/myfile.gpx" specifies a gpx file to be displayed
kml="http://www.example.com/myfile.kml" specifies a kml file to be displayed
markers="NY1234512345;Marker 1|54.454198,-3.211527;Marker 2" a list of positions and (optionally) labels separated by | with a ; between the position and label. Positions can be 6, 8 or 10 figure grid references or decimal lat long. Labels, if present, must be simple text.
markerfile="http://example.com/markers.txt" specifies a text file containing marker definitions, one per line. As above, position and label are separated by ;. In this case the label can include any text including HTML, should you wish to include links or other formatting.
centre="54.454198,-3.211527" sets the map centre point, to override the default centre or if not using markers or track files

Scale uses the OS scale values which are essentially multipliers on 1:10000 scale, so 5 represents 1:50000 and 100 represents 1:1M. The available scale values are 1, 2, 2.5, 4, 5, 10, 20, 50, 100, 200, 500, 1000, 2500. These are also listed on the help tab when you are editing a post or page.
To upload a KML or GPX file just use the WordPress media uploader and then copy the address of the uploaded file into the shortcode.
Examples

[osmap height="300" width="300" color="blue" gpx="http://www.example.co.uk/myfile.gpx"] displays a 300px by 300px window containing a blue track from the file specified.

[osmap markers="NY2000008000;Wasdale"]shows a default size and zoom window with a marker placed and the popup text “Wasdale”

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「OS OpenSpace Maps」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.2 | 1.2.1 | 1.2.2 | 1.2.3 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | 1.1.1# |

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Apply Filters
Mastodon