- This topic has 0 replies, 1 voice, and was last updated 1 month ago by .
at first I needed the geolocation for complete addresses - that worked perfectly. But now I need the possibility to search for cities and addresses, because not every entry has a complete address.
I thought that I just have to add the "types" field to the "geo"-entry, but the combination doesn't work. I can only search for "cities" or an "address" - is that right or is my code wrong?
$meta_boxes = array( 'id' => 'geolocation', 'title' => 'GeoLocation', 'context' => 'normal', 'priority' => 'high', 'geo' => array( 'componentRestrictions' => array( 'country' => 'deu' ), 'api_key' => 'AIzaSyC6A39MylwOhGD7sU-CKCV2JAdSyve_2zM', 'types' => array('address', '(cities)'), ), 'fields' => array( array( 'type' => 'text', 'name' => 'Addresse', 'id' => 'address', ), array( 'type' => 'text', 'name' => 'Breitengrad', 'id' => 'lat', 'binding' => 'lat', 'address_field' => 'address', ), array( 'type' => 'text', 'name' => 'Längengrad', 'id' => 'lng', 'binding' => 'lng', 'address_field' => 'address', ), ) );
Thanks for your help,
- You must be logged in to reply to this topic.