Home › Forums › Backend Issues (wp-admin) › Add multiple markers on Gmap field in admin screen › Reply To: Add multiple markers on Gmap field in admin screen
I have options page with repeater field where i’m adding coordinates displayed as markers on my map on website.
On the same options page i have added google map field to select a place and with custom button add new repeater field with filled coordinates.
(button was added via acf/render_field/type=google_map
action, and custom script for this button via acf/input/admin_head
action)
Everything works great on website, my markers are displaying.
But my problem lies on options page, i have so many markers, that i don’t know if i added place X already or not. So i’d like to know, if there is option, to somehow display markers from repeater field in map field on my options page, so i’ll see what places were already added. I can get coords for markers from my repeater field, i don’t even need markers to shop up dynamically, they can show after saving post, but i don’t know how to put custom JS for google map field on options page, how to get var map
or how to edit code responsible for showing google map on options page (or any admin page for that matter).
Attachments:
repeater.jpg and map.jpg are screens from my options page
front-end-map.jpg is map styled and showed for users
options-page-map-that-i-need.jpg is what i need my map on options page to look like
(I hope this is a little better explanation :D)
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc
— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.