Hi,
I have setup my address with multiple fields like, city, zip, street.
I managed to display to display those fields on google maps as an adress.
For example my code to display those multiple fields on my maps is:
[wpv-map-marker map_id='map-1' marker_id='marker-[wpv-post-id]' address="[types field="straatnaam"][/types] - [types field="huisnummer"][/types] [types field="plaats"][/types]"]<strong>[wpv-post-link]
Now I would like to create a distance filter for my maps based on the city or zip code.
How can I create a view with distance based on those fields, since it's using the standard address field to get data from?
This is not possible.
I am surprised that those markers even show at the correct place.
The correct Field to use for "Addresses" is the "Address" Field Type.
When you use that Field type, you can as well create a distance Search by it, using the new ShortCode for the Custom Search by Distance.
This ShortCode can be found in the Filter Editor when you click on "Add New Filter > Toolset Maps > Distance Filter".
There, you can only pass one field for the comparison, which usually is the Address Custom Field.
Here are more details about this:
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps//#filtering-markers-by-distance
Hi Beda,
Thanks for your reply.
I read about displaying multiple field on the maps in other topics on the support forum.
So that's working great.
The problem I have with the address field is, users tend to forget some information in the address field.
For example a zipcode or housnumber, so that's why I wanted to use multiple fields.
Is there a way of inserting those custom fields as shortcode in the address field?
So the address fields combine those outputs and create a whole address?
The "wpv-control-distance" filter (which is the distance filter) does, as elaborated above, only accept one field.
This ShortCode does not allow to call more than one field.
It is not possible to pass more than the address (or any other) Field to that ShortCode.
This requires custom code, which is out of the scope of the Toolset Support because it would mean to alter the ShortCode as it is provided:
https://toolset.com/toolset-support-policy/
Eventually, the Toolset Contractors can help with this:
https://toolset.com/contractors/