After an email from Gustavo Galeote, a user of the plugin for WooCommerce WC - APG City, letting us know that there were certain errors in the Google Maps API when it came to resolving certain postcodes, and after checking that there were indeed serious errors in certain postcodes shared by more than one city, we got down to work to try to find an effective solution to this problem.
After looking for different alternatives on the Internet, and given that Correos, and other international public bodies, charge a fixed fee for the use of their databases through third-party private companies, something which, on the other hand, we do not understand, since, being public bodies, they should provide that information publicly and free of charge, but anyway, that is another matter that we do not want to go into today, and after ruling out different alternatives, we came across the fantastic public GeoNames API, which, as well as being much simpler than the Google Maps one, is much more effective in its information, at least for Spain.
So in the end we have chosen to provide support for both APIs and to let you, the users, select which one to use through the new settings page that we have added to WC - APG City.
Why a double API?
The reason is very simple: there will be countries where the Google Maps API will be more effective, and others where the GeoNames API will be the better option.
In our particular case, and after carrying out different tests, the GeoNames API is the undisputed winner in Spain, but we cannot guarantee it for countries such as the USA, Mexico or the United Kingdom, to give only a few examples.
That is why we are leaving you support for both APIs: we want you to run your own tests and to select the one that suits your online shops best.
We hope that with this new improvement you have no excuses left for not using WC - APG City in your virtual shops. Enjoy it!
Related posts
Comments







Excelente trabajo, gracias por compartirlo con nosotros los usuarios de WooCommerce, cuenten conmigo para cualquier mejora o prueba. Un saludo!!!
Hola, hemos probado la ultima versione del plugin, funciona bien pero tenemos la impresión que, en caso de que por un código postal tenga más de una localidad relacionada, no quede tan claro al usuario de que hay que usar el desplegable, la primera reacción que hemos tenido ha sido…. ups…el plugin falla….y no, solo hay que elegir correctamente…eso pasa por ejemplo con el còdigo postal 29130 …
Creemos que estaría bien avisar el cliente con una frase … parpadeante o bien evidenciada…como mostramos en la imagen: https://postimg.org/image/69d96y6l7/
o obviamente otra solucion que pensaris pueda resolver el problema… por ejemplo abrir ya el desplegable…. pero esto en el mobile puede que haga un rara efecto visual…no se… algo… :) muchas graicas
Ya tenemos una solución para esos casos, vamos a abrir el campo select para que el cliente seleccione su localidad exacta.
En la próxima actualización la tendrás disponible.
Muchas gracias por la sugerencia.
Un saludo.
Le daremos alguna vuelta a la propuesta.
Un saludo.
Vuestro equipo: muy profesional y experto en esos detalles que hacen la diferencia a la hora de brindar soluciones a nuestros clientes. Una maravilla haber contactado con vosotros y espero mantener esa comunicación y colaboración humildemente a lo largo del tiempo. :)