
內容簡介
此外掛將一個 Leaflet 地圖欄位加入至 Advanced Custom Fields 外掛。使用它可以在您的文章和頁面中顯示具有標記、線和形狀的地圖。
可以在地圖上添加多個帶彈出視窗的標記。
繪製折線、多邊形和矩形。
欄位儲存縮放級別和視口位置。
外掛內含一個在主題渲染地圖的函數: <?php the_leaflet_field( 'my_leaflet_field' ); ?>,只需要插入皆可使用!
支援 ACF4 和 ACF5 (Pro)
使用說明
此外掛內含一個渲染函數。使用 the_leaflet_field( 'my_leaflet_field' ); 達到要渲染地圖的效果。
待辦事項
我計畫將以下功能加入此外掛:
在彈出視窗中加入圖片。
提供一個可將 GeoJSON 結構化資料匯入至欄位內的工具。
GitHub
如果您想要獲取此外掛的最新開發版本,您可以前往我的 Github 倉庫。該Github 倉庫始終都有最新的程式碼,可能偶爾會發生失效問題。
外掛標籤
開發者團隊
② 後台搜尋「Advanced Custom Fields: Leaflet Field」→ 直接安裝(推薦)
原文外掛簡介
This plugin adds a Leaflet map field to the Advanced Custom Fields plugin. Use it to display maps with markers, lines and shapes along with your posts and pages.
Add multiple markers with popups to the map.
Draw polylines, polygons and rectangles.
The field stores both your zoom-level and viewport location.
Function to render the map in your theme is included in the plugin: , just plug and play!
Supports ACF4 and ACF5 (Pro)
Instructions
A rendering function is provided in the plugin. If you want to use it all you have to do is use the_leaflet_field( 'my_leaflet_field' ); where you want to render the map.
To do
Things I plan to add to the plugin:
Adding images to popups.
Provide a tool for importing GeoJSON-structured data into the field.
GitHub
If you want the latest development version of this plugin it is available over at my github repository. The github repository will always have the latest code and may occasionally be broken and not work at all.
