Something that has been driving us nuts with Toolset's google maps is that when we have a location field where someone can type in their city and state, country, the dropdown might suggest
Long Branch, NJ, USA
But when we select it, the field populates with
Long Branch, NJ 07740, USA
And there is absolutely no way to remove the ZIP code. And this only happens with like 1 out of 300 addresses.
We traced it down to a problem with Google! Their API isn't consistent when it returns the 'formatted_address' field. 99% of the time, it's correct, but sometimes ZIP codes sneak in there.
So we wrote our own fix to
plugins/toolset-maps/resources/js/jquery.geocomplete.min.js
Right now we're patching it with a redirect on our end, but ideally toolset would roll out a fix like this in a future release. I thought we'd just give you our fix in case it helps.
This is de-minified, fixed, and extensively commented:
hidden link
Hello,
Thank you very much for sharing the patch code. I will ask our development team about this.
Just as my educated guess, the chance that this will be patched is slim, as there is a strict internal code standard that we should not mess with 3rd party API results.
I understand that the patch is fixing something that is broken in Google.
May I ask you if you use OpenStreet you found the same problem?
Thanks.
Hi, we didn't try open street, only the google maps API.
Got it thanks. I reported this. Thanks.