Support

Account

Forum Replies Created

  • Load the following script in your admin.

    var hm_googlemap = null;
    
    if (eval("typeof acf") != undefined) {
      console.log('ACF IS HERE!');  
      
      acf.addAction('google_map_init', function(map, marker, field) {
        hm_googlemap = map;
    
        //Override the searchPosition function on the 
        //map ACF Field which normally does a geocode search
        field.__proto__.searchPosition = function(lat, lng) {	      
          var zoom = (hm_googlemap !== null) ? hm_googlemap.zoom : 15;
          var val = {
            address: "Custom Location: (" + lat + ", " + lng + ")",
            lat: lat,
            lng: lng,
            zoom: zoom,
            country: "", 
            country_short: "", 
            place_id: "",
            post_code: "", 
            state: "", 
            street_name: "", 
            street_name_short: "",
          };
          
    //console.log(val);
    	  this.val(val);				
        };    
      });  
    }
  • We’re seeing the same issue where our custom ‘countryside’ pins can no longer be placed as such and the pin will snap to the nearest road or point of interest.

    We have come up with a fix for it, but it would be ideal if ACF could acknowledge if this is indeed a bug or a feature we need to now workaround?

Viewing 2 posts - 1 through 2 (of 2 total)