
內容簡介
此外掛將一個 Leaflet 地圖欄位新增至 Advanced Custom Fields(ACF)外掛。
建立後端欄位
您可以像 Google 地圖欄位一樣,使用 ACF 新增一個 Leaflet 地圖欄位。
在前端顯示地圖
透過 ACF 的 get_field('field_name') 函數,取得欄位資料(緯度、經度、地址和縮放等級)。
請注意,get_field() 函數並不會顯示地圖,為此請直接參照 Leaflet JS 地圖 文件說明。
相容性
此 ACF 欄位類型相容於:
* 只有 ACF 5(免費版和專業版)
註:若您使用的是 ACF 4 免費版,可以參考此頁面逐步升級至版本 5。
外掛標籤
開發者團隊
② 後台搜尋「Advanced Custom Fields: Leaflet Map Field」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
This plugin adds a Leaflet map field to the Advanced Custom Fields plugin.
Create the backend field
You can add a leaflet map field using ACF like the Google Map field.
Diplay the map in front-end
Uses the classic ACF get_field('field_name') function to get field data (lat, lng, address & zoom).
Warning, the get_field() function does not display the map itself, for this, use the leaflet js map documentation directly
Compatibility
This ACF field type is compatible with:
* ACF 5 only (Pro & Free)
NB: If you’re using the ACF 4 Free version, you can upgrade to version 5 step by step on this page
