I’m trying to use the maps autocomplete feature and it doesnt work with unit addresses. For example if I type 10/234 Landsdale Road, Landsdale WA only 234 gets populated. If i instead pick 10/234 Landsdale Place Massey New Zealand it doesnt even pick the number anymore, only picks Landsdale place.
Im shocked this has been working like this all along, its unreliable and basically useless for data accuracy. How is everyone dealing with this because I only saw a single post from years ago and no one seems to care:(
Hi Dean, I see. It seems the issue is inconsistent, for example 10/298 Sector 10 Main Road gets populated correctly as 10/298. I might have to do as you have done but sucks dealing with knack’s artificial limitations on things that should just work. Thanks
I don’t profess to know much about the mapping component and its architecture, but I just tried looking up; 10/234 Landsdale Place Massey New Zealand with Google Maps and it returns the below.
I’m aware that Knack recently transitioned from their previous supplier, Here Maps. It doesn’t state who the new provider is.
I think the address lookup is more to do with the map provider than Knack limitations. I’m very happy to stand corrected if others have more information.
Hi Carl, the search api has the correct response as seen in the autocomplete so it seems its just the way knack is handling it internally. I did try the google api as well and the issue is the same. Likely they made some assumptions that dont always hold in the api response structure.
Edit:
Looks like knack is using google now even if you choose Knack Maps in settings. I checked Inspect Network and its going to https://maps.googleapis.com/maps/api/place/js/AutocompletionService.GetPredictions
Did some extra digging and you are right about this specific address. It shows up in the autocomplete but once you select it there is another api call to get some more complete details. That call doesnt return the address it only returns Landsdale Place.
However an address like 10/234 Landsdale Road, Landsdale has the full info in the second api call but the the structure is different. There is a variety of response formats depending on country e.g. some addresses have a simple street/city/zip structure and some have subpremise/postal_town/sublocality/administrative_area etc. I’ve now seen so many combinations of address formats so its likely knack never thoroughly went through all the possibilities. I’ll be instead using a custom maps solution specific to my region for now