[WordPress] 外掛分享: ACF: Google Maps Field (Multiple Markers)

首頁外掛目錄 › ACF: Google Maps Field (Multiple Markers)
WordPress 外掛 ACF: Google Maps Field (Multiple Markers) 的封面圖片
200+
安裝啟用
★★★★★
5/5 分(2 則評價)
1380 天前
最後更新
問題解決
WordPress 4.7+ PHP 5.6+ v1.0.5 上架:2021-07-27

內容簡介

這是一個針對『進階自訂欄位 (Advanced Custom Fields,ACF)』所開發的新欄位類型,讓您可以在單一地圖欄位上放置多個地標 (marker) 並選擇多個位置,除了讓管理介面更簡潔外,還能提供更好的使用者體驗,同時減少 Google Maps API 的載入量。在地圖下方,欄位也會顯示每個地標的地址內容,方便管理。

這個欄位解決了標準 ACF Google Map 欄位僅能選擇單一位置的問題。
如果要選擇多個位置,通常需要在內部使用一個 Google Map 欄位的 Repeater 欄位。這可能會讓管理變得混亂且難以追蹤及管理。

相容性

此 ACF 欄位類型相容於:
* ACF 5

使用說明

在新的 Google Maps (Multiple Markers) 欄位中,您可以:
– 在地圖上左鍵點擊來新增地標
– 在地標上右鍵點擊以刪除它
– 在地圖上拖曳地標
– 在搜尋框中搜尋地點或地址
– 在地圖下方的地址列表上滑鼠懸停以查看對應的地標
– 在地址列表中左鍵點擊垃圾桶圖示以移除它的地標。

Google Maps API

您的 Google Maps API 金鑰需要啟用以下 API:
– 地理編碼 API
– 地點 API
– Maps JavaScript API

誌謝

這是標準 ACF Google Map 外掛的修改/增強版本,一些 Javascript 代碼來自原始欄位,原始 ACF 欄位的開發者應得相關掌聲。

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「ACF: Google Maps Field (Multiple Markers)」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

A new field type for Advanced Custom Fields (ACF) that allows you to place multiple markers and choose multiple locations all on a single map field, resulting in a cleaner admin UI, better user experience for the CMS user and fewer Google Map API loads. The field will display the address for each map marker below the map so it’s even more manageable.
This field type solves the problem of only being able to select one location with the standard ACF Google Map field.
To choose multiple locations, you’d normally be required to use a repeater field with a Google Map field in it. This can quickly become chaotic and difficult to keep track of/manage.
Compatibility
This ACF field type is compatible with:
* ACF 5
Usage Instructions
On the new Google Maps (Multiple Markers) field, you can:
– LEFT CLICK on the map to place a new marker
– RIGHT CLICK on a marker to remove it
– CLICK AND DRAG a marker around on the map
– SEARCH for a place or address in the search box
– HOVER over an address in the address list below the map to see which pin it corresponds to
– LEFT CLICK on the trash icon on a row in the address list to remove it’s corresponding marker.
Google Maps API
Your Google Maps API key will need the following APIs enabled:
– Geocoding API
– Places API
– Maps JavaScript API
Credits
This is a modified/enhanced version of the standard ACF Google Map plugin, so some of the Javascript code derives from the original field. Credit for the original of this ACF field goes to the developers of Advanced Custom Fields.

延伸相關外掛

文章
Filter
Mastodon