Custom Fields
Re-Envisioned
Support Meta Box Geolocation Can't get Geolocation autocomplete to work, nor maps Reply To: Can't get Geolocation autocomplete to work, nor maps

#10390

Doug
Participant

Well, I walked away for a couple hours and came back. Now, the address auto-complete functionality is magically working. I changed nothing. Perhaps something took a while to register with the Maps API.

The map field is still not working when I click on’Find Address’. And auto-complete on the ‘address’ field won’t work if there is a map field added to the same metabox. But as long as I remove the map field, Geolocation autocomplete works on the ‘address’ field.

Now that it’s working, I notice what seems to be a bug with Geolocation and autocomplete/autopopulate, at least according to what docs say. It seems that ANY field with an ID that contains ‘address’, even if the ID doesn’t start with ‘address’ is treated as an auto-complete field. Because of this, any other field that contains address in the ID, such as another documented field ID of ‘street_address’ can’t get auto-populated.

See screenshot of my fields rendered on the post page. ‘Location name’ is ‘id’=>’address’, ‘Address 1’ is now ‘id’=>’street_address’, and ‘Address 2’ is now ‘id’=>’street_address2’. Note how street_address and street_address2 contain placeholder text of ‘Enter a location’

https://cl.ly/1u150h073l2r