Skip Navigation

[Resolved] Search map by postal code

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user would like to filter a map by zipcode.

Solution:
Maps cannot be filtered by zipcodes, they can only be filtered by distance.
To be able to filter by zipcode, add a custom field for zipcode, and filter with it.

Documentation:
https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by Piotr_M4693 4 years ago.

Assisted by: Jamal.

Author
Posts
#1829893

I decided to delete that page and spend some time to do the translations.

I have another thing which needs to be done so if you can please put it in another thread.

1. My client wants to have a possibility on this page --->

hidden link

that the user can type any post code and it will show on the map the closest organisations to that post code. Do you know how this can be done? I have access to all the postcodes in .csv file

2. My client want to have the data displayed for each organisation the way that there is a description --> SPACE and details together such as telephone number, email. At the moment they are all in <p> tags, so the space is the same everywhere as shown on the image. how this can be done?

3. Is it possible to add an icons for the items desplayed in the view, for egzample icon for address, phone number etc?

Thanks

#1829913

1- Currently, Toolset does not store the postcode for addresses. It only stores the complete formated address and the coordinate(latitude, longitude). The distance search that you are willing to create is based on geometry calculus based on the coordinates. So, we can't really calculate the distance from a zipcode as it does not have coordinates.
On the other hand, Toolset Maps, allows you to search for near posts to an address. Instead of having a postcode dropdown, it offers an input to enter an address, then it asks Google or Azure for the coordinates of that address and then performs a geometry calculus to get nearby posts. It also offers to search for posts near the current position of the user. Check this article https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/

2- Currently, you are using a "Fields&Text" block for each piece of information. To achieve what the client desire, put all shortcodes inside ONE "Fields&Text" block, and put spaces between the shortcodes. The result will be one single <p> tag with all the information returned from shortcodes inside of it.

3- Yes, totally. You can either use images for these icons, or you can use a font set such as FontAwesome. You will need to add FontAwesome assets to your theme, or you can use a 3rd party plugin such as https://wordpress.org/plugins/font-awesome/
hidden link

#1849557
Screen Shot 2020-11-19 at 10.19.24.png

Hey Jamal,

I managed to put the Distance Filter, but I am having trouble to place it on the website properly as it is treated as a one field.
I would like to have for example "30" and next to it "km"

hidden link

Thanks

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/align-distance-filter-value-and-unit-on-the-same-line/