[WordPress] 外掛分享: Simple Fields Map extension

首頁外掛目錄 › Simple Fields Map extension
WordPress 外掛 Simple Fields Map extension 的封面圖片
100+
安裝啟用
★★★★★
5/5 分(4 則評價)
4474 天前
最後更新
問題解決
WordPress 3.8+ v1.3.4 上架:2012-08-22

內容簡介

這個外掛為 Simple Fields 新增了一種可供選擇的位置欄位類型。

該位置的座標 (緯度/經度) 會儲存並可在你的佈景主題等地方輕鬆擷取。

祝你地理編碼愉快!

功能

可輕鬆將地圖新增至任何文章、頁面或自訂文章類型
與 Simple Fields 無縫整合
你可以有多個地圖及分別的設定
每個地圖都可以設定自己的:

縮放比例
地圖類型 (路線圖、衛星、混合、地形)
預設位置

透過內建的搜尋框來搜尋地址的位置
透過輸入緯度和經度座標來搜尋位置
支援可重複使用欄位 —— 可連接任意數量的每個地圖至文章
從每個儲存的位置可以獲得:

緯度和經度
地址訊息,包括使用者在新增這個位置時所搜索的商店/店家名稱
首選縮放比例

透過程式碼新增地圖至欄位群組

這個欄位擴充的代碼縮略名為「googlemaps」。

透過註冊欄位群組,下面是完整的範例:

<?php

// 新增帶有 Google Map 欄位的欄位群組
simple_fields_register_field_group('sf_map_test_field_fg',
array(
'name' => 'My map',
'slug' => "mu_map"
'repeatable' => 1,
'fields' => array(
array(
"type" => "googlemaps",
"slug" => "sf_map",
"name" => "Test map",
"options" => array(
"defaultZoomLevel" => 10,
"defaultMapTypeId" => "HYBRID", // ROADMAP | SATELLITE | HYBRID | TERRAIN
"defaultLocationLat" => 40.71435,
"defaultLocationLng" => -74.00597,
"defaultZoomLevel" => 10
)
)
)
)
);

?>

翻譯/支援的語言

這個外掛支援以下語言:

英文

使用方式

(請確保你已經安裝 Simple Fields)
安裝 Simple Fields Maps Extension 外掛
你可以在一般的 Simple Fields 設定頁面裡面找到地圖欄位

外掛標籤

開發者團隊

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

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

原文外掛簡介

Adds a new field type to Simple Fields that let you choose a location.
The coordinates (lat/lng) of that location is saved
and easily retrieved in for example your theme.
Happy geocoding!
Features

Easily add maps to any post, page or custom post type
Integrates seamlessly into Simple Fields
You can have multiple maps with separately settings
Each map can have it’s own:

zoom level
map type (Roadmap, Satellite, Hybrid, Terrain)
default location

Search location of address by using built in search box
Search location by enter its latitude and longitude coordinates
Supports Repeatable Fields – have any amount of maps connected to each post
From each saved position you can get

Latitude and Longitude
Address information, including store/shop name if that was what the user searched for when adding this location
Preferred zoom level

To add a map to a field group programmatically
Slug for this field extension is “googlemaps”.
Full example using register field group:
'My map',
'slug' => "mu_map"
'repeatable' => 1,
'fields' => array(
array(
"type" => "googlemaps",
"slug" => "sf_map",
"name" => "Test map",
"options" => array(
"defaultZoomLevel" => 10,
"defaultMapTypeId" => "HYBRID", // ROADMAP | SATELLITE | HYBRID | TERRAIN
"defaultLocationLat" => 40.71435,
"defaultLocationLng" => -74.00597,
"defaultZoomLevel" => 10
)
)
)
)
);

?>

Translations/Languages
This plugin is available in the following languages:

English

Usage

(Make sure you have Simple Fields installed)
Install the Simple Fields Maps Extension plugin
You will find the Map field in the usual settings page of Simple Fields

延伸相關外掛

文章
Filter
Apply Filters
Mastodon