Support

Account

Home Forums Bug Reports New GoogleMap field doesn't work

Solved

New GoogleMap field doesn't work

  • Hi!

    I was trying the new jquery google maps field in 4.3 to see if I could replace with it the coordinates plugin I use.

    But I can’t make it work. The map shows, and I can drag it and zoom, but the location search doesnt work, nor the detect location button. It just does nothing. I’ve tried it on two different wordpress 3.7.1 installations, with different themes, including twentitwelve.

    • Elliot

    • November 10, 2013 at 3:20 pm

    Hi @andamira

    Thanks for the bug report.
    If the buttons / search are not interacting with you, the issue is most likely a JS bug. You can open up your console log and view any JS errors.

    Can you do this and report the JS errors when you search or press the button?

    Thanks
    E

    • andamira

    • November 11, 2013 at 10:53 pm

    Yes. on chrome:

    When I click the arrow (find current location) this happens:

    Uncaught TypeError: Cannot call method 'setPosition' of undefined input.min.js:13
    acf.fields.location.update input.min.js:13
    (anonymous function) input.min.js:13

    Then, when I click on the cross this happens:

    Uncaught TypeError: Cannot call method 'setVisible' of undefined input.min.js:13
    acf.fields.location.clear input.min.js:13
    (anonymous function) input.min.js:13
    x.event.dispatch load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:4
    v.handle

    When I try to search for a name, nothing happens. Nothing at all. Pressing Intro does nothing.

    • andamira

    • November 11, 2013 at 11:10 pm

    Oh, yes there is an error, but on page load, when I edit a new entry with google maps custom field, this shows on console:

    
    Uncaught TypeError: Cannot read property 'Autocomplete' of undefined input.min.js:13
    acf.fields.location.render input.min.js:13
    acf.fields.location.init input.min.js:13
    (anonymous function) input.min.js:13
    x.extend.each load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:3
    x.fn.x.each load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:3
    (anonymous function) input.min.js:13
    x.event.dispatch load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:4
    v.handle load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:4
    x.event.trigger load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:4
    e.event.trigger load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:9
    (anonymous function) load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:4
    x.extend.each load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:3
    x.fn.x.each load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:3
    x.fn.extend.trigger load-scripts.php?c=0&load%5B%5D=jquery-core,jquery-migrate,utils,plupload,plupload-html5,plupload-f…:4
    (anonymous function) input.min.js:13
    
    • Elliot

    • November 12, 2013 at 4:26 pm

    Hi @andamira

    Thanks for the console log errors. These errors all stem from the ‘Autocomplete’ error.

    It looks like google maps places library is not loading into your page. Is your page still loading when you interact with the button?

    Also, what OS / browser are you using? Perhaps it is even a firewall at your office?

    Thanks
    E

  • I was testing it in several browsers and OSes… even with android using 3g connection (with the same result) and then it ocurred to me it probably was a plugin conflict.

    That’s right. I finally found the conflict disabling the plugins. In fact it was a conflict with coordinates 🙂

  • Hi Elliot,

    edit: Never mind. I’m being dumb… Don’t need Locations any longer. Google Maps is a core field… Duh!

    I’ve disabled all of my plugins, except locations and ACF Core, but am still seeing this JS error in the console.

    Uncaught TypeError: Cannot read property 'Autocomplete' of undefined

    I’m running WP 3.7.1, ACF 4.3.1, Location Field 1.0.0. I’m using Chrome 31 on Mac 10.9.

    Thanks!

    -Jacob

    • andreu

    • December 17, 2013 at 7:09 am

    Hi @jacobdubail,

    I had the same error in my backend, but I realized that in my case the problem was due to Location Map field add-on. With this add-on activated, Google Map field was not working fine.

    I migrated my Location Map fields to the new Google Map field and then deactivated Location Map add-on. Now, my maps are working fine.

    Hope this helps!

  • Hello friends, I have the same problem, my location does not seek, nor seeks any address you enter

    console

    Uncaught TypeError: Cannot read property ‘Autocomplete’ of undefined

  • @andreu‘s solution worked for me!

Viewing 10 posts - 1 through 10 (of 10 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.