• Resolved EnFi

    (@enfi)


    Hello!
    How are you? Congratulations for you great plugin.
    I would like to ask you if there is a solution to avoid the alert: “Map address returns error: ZERO_RESULTS”
    I upload the map automatically through csv files and sometimes the address is incorrect so I would like to leave a white space (without the alert) or to give another generic address, just to show an area…
    Do you have a solution?
    I look forward to hearing from you soon!
    Thank you very much!

    https://www.ads-software.com/plugins/wp-flexible-map/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author webaware

    (@webaware)

    G’day EnFi,

    Interesting. I reckon the easiest fix is a simple plugin that filters the map’s HTML and drops it when the plugin can’t get a valid address.

    The plugin does address lookups server-side these days and records the result in a transient for best performance, but drops back to JavaScript if it can’t get a result. You can check the generated script for that, because it uses a different function on the JavaScript object for the flexible map.

    I’ve knocked up a simple plugin that does that; see this gist:

    https://gist.github.com/webaware/3ffe9c2bb9aeb0517714

    Download that .php file and load it into your website’s wp-content/plugins folder, then activate through the Plugins admin. It will strip out any maps with invalid addresses.

    If you want to give an alternative address, just replace the empty string on line 18 with a valid address (in quotes).

    cheers,
    Ross

    Thread Starter EnFi

    (@enfi)

    Hi Ross!
    Thank you very much for your reply!
    Everything works perfectly!! You are great!
    Thanks and have a nice day!

    Plugin Author webaware

    (@webaware)

    No worries ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Avoid "Map address returns error: ZERO_RESULTS"’ is closed to new replies.