Title: Geocoding errors with Map autocomplete
Last modified: March 29, 2020

---

# Geocoding errors with Map autocomplete

 *  Resolved [bhbrunt](https://wordpress.org/support/users/bhbrunt/)
 * (@bhbrunt)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/geocoding-errors-with-map-autocomplete/)
 * Hi there,
 * I’ve been helping debug a site running Simple Business Directory Pro (plugin 
   v13.3.7). When adding a new list item, there is a glitch with the geocoding, 
   e.g. if I type “Carli” and accept the autocomplete suggestion “Carlisle, UK”,
   the map marker appears in Carlisle, MA, USA.
 * It seems that the geocoding is being done based on what I typed, not on the autocomplete
   suggestion I accepted. This seems to be a problem in directory-script.js. There
   are conflicting lat/long geocodings in the focus and focusout callbacks for sbd_full_address.
   I believe that the “focus” callback has the correct implementation, and the “
   focusout” may be left over from an earlier version (from before the autocomplete
   was added?). In my local version I have removed the focusout callback (lines 
   1549-1570 of directory-script.js), which seems to solve the problem.
 * Best wishes,
    Ben
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgeocoding-errors-with-map-autocomplete%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [QuantumCloud](https://wordpress.org/support/users/quantumcloud/)
 * (@quantumcloud)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/geocoding-errors-with-map-autocomplete/#post-12601584)
 * I appreciate your valuable feedback.
 * If we remove the focusout event then if a user does not choose the exact address
   then the field will be empty, which causes JS error. That’s why we are using 
   the focus out event.
 * By the way, if you are using the pro version, please open a support ticket from
   [https://qc.ticksy.com/](https://qc.ticksy.com/) if you have any further feedback
   or need help.
 * Thank you!

Viewing 1 replies (of 1 total)

The topic ‘Geocoding errors with Map autocomplete’ is closed to new replies.

 * ![](https://ps.w.org/phone-directory/assets/icon-256x256.png?rev=1811203)
 * [Simple Business Directory - AI Powered](https://wordpress.org/plugins/phone-directory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/phone-directory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/phone-directory/)
 * [Active Topics](https://wordpress.org/support/plugin/phone-directory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/phone-directory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/phone-directory/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [QuantumCloud](https://wordpress.org/support/users/quantumcloud/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/geocoding-errors-with-map-autocomplete/#post-12601584)
 * Status: resolved