Support

Account

Home Forums ACF PRO Possible bug with Google maps

Solved

Possible bug with Google maps

  • Hey Elliot,

    First of all I’m really liking ACF Pro, well done for all your hard work.

    I’m seeing a possible bug where the map goes back to the default coordinates in Melbourne after publishing/updating a post and not the saved location. Is anyone else seeing this?

    Alex

    • Elliot

    • July 11, 2014 at 10:05 am

    Hi @alex Jordan

    Thanks for the bug report, but I’m not quite sure I understand the issue.
    Is the default center map settings not working?

    Can you send through your field settings?

  • Hi Elliot,

    So with the following map:

    Field Label: Map Location
    Field name: location
    Instruction: none
    Type: Google map
    Required: no
    Center: 51.507351, -0.127758
    Zoom: 14
    Height: 300
    Conditional Logic: no

    When you create a post, the map is initially centred in London. If you add a marker and update/publish the post, the map loses the marker and centres back in London on the post edit page. If no default lat or lon are set in ACF settings then the same happens, defaulting to Melbourne.

    I’m using a fresh WP install and this is the only plugin, but I do force jQuery 1.11.0 in my functions.php file and I’ve renamed the post post type to parks. I’d be happy to give you access to take a look.

    Alex

  • This reply has been marked as private.
    • Elliot

    • July 14, 2014 at 11:04 am

    Hi @alex Jordan

    Thanks for the field settings. I have replicated your field, however the default center and marker center are working perfectly.

    I noticed on your website that I could not save the location data. Perhaps another field is using the location field_name? Or perhaps you have another plugin / theme code conflicting with ACF saving data?

  • Hi Elliot,

    You were spot on, I had 2 fields called ‘location’ on the same page. Hadn’t realised. Thanks for your help.

    Whilst a silly mistake on my part, would it be worth adding a check so that names have to be unique?

    Thanks again.

    Alex

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

You must be logged in to reply to this topic.

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.