Home › Forums › ACF PRO › Hide marker on Google map › Reply To: Hide marker on Google map
Hello.
You could define your marker as “nothing” in your add_marker
-function. That would be something like this:
function add_marker( $marker, map ) {
// var
var latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );
// create marker
var marker = new google.maps.Marker({
position : latlng,
map : map,
icon : ''
});
I’m not quite sure if this is the absolutely best way to do it, but it gets the job done.
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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.