Skip Navigation

[Resolved] I need to know how I can split up the map from its filters on the front end

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

Problem: I would like to display a map with markers, but I want to use custom search filters displayed in a different area of the site.

Solution: Insert the map shortcode using the Fields and Views button. Make the map ID something unique. Create a View to display the filters, and include the map marker shortcodes in the loop. Reference the unique map ID in the map marker options popup. Place the View where you want to display the filters.

Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/

This support ticket is created 5 years, 9 months 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 66 replies, has 2 voices.

Last updated by jessicaM-4 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1231766
Screen Shot 2019-04-16 at 2.25.23 PM.png

Tell us what you are trying to do?
design a locations page with a filter
Is there any documentation that you are following?

Is there a similar example that we can see?
Uploading the image of what generally looking to do
What is the link to your site?
hidden link

#1231819

Also I found instruction on how to add info to the map markers when clicked. But the instruction is lacking in detail. Can you also assist me with the proper syntax to add info to the marker pop up. For instance how to add the shortcodes in the loop editor to show title, address, phone number, and a link to the individual post type page?

#1231903

Hi, you can create a custom search View that includes the search filters and all the marker information. Place this View anywhere in your page markup structure. Then you can place the map shortcode in any other place on the page (it does not have to be in the same View). As long as the map ID matches what you have in the View, the markers will appear correctly on the map.

Can you also assist me with the proper syntax to add info to the marker pop up. For instance how to add the shortcodes in the loop editor to show title, address, phone number, and a link to the individual post type page?
The exact syntax is difficult for me to predict because of the different options that are available, and the different types of fields you want to display. In general, you can use the Fields and Views button above the Loop Editor or template editor to choose the fields you want to display. Choose the options you want, and then the system will generate the proper syntax for you. Move the field shortcodes inside the marker shortcodes to display that information in the popup. If it's not working as expected, please copy + paste the entire markup in your next reply for me to review.

#1232384

Thank you so much for your help Christian. Two things. Can you give me a little more detailed instruction on creating the custom search View that includes the search filters and all the marker information for the map. Separate from the map like we previously discussed. Also how would i create an address search separate in the same way. The page i'm building requires these two types of searches.

Also I will attempt to get the map markers to show the info I need. If I can not do it I will reach out to you for that as well.

You can see what Im trying to accomplish in the screenshot I provided previously. Tell me how to accomplish those things LOL.

Thank you for any help you can give.

#1232421

I seem to keep going in circles. I've created separate views but there is not a place to connect it to the map ID. Please help when you can.

#1233536

Can you give me a little more detailed instruction on creating the custom search View that includes the search filters and all the marker information for the map.
Sure, is there something specific you need? If not, here's a general guide:
- Create a new View. In the settings popup, choose "Full custom display mode" so you can see all the editor panels and settings clearly.
- In the Content Selection area, choose the post type that includes the custom address field.
- Scroll down to the Search and Pagination editor panel and click "New Filter". This is how you will add each of the front-end search filters like "Distance" (i.e. the address search field) and any other taxonomy or custom field filters you want to offer.
- Scroll down to the Loop Editor area and click "Loop Wizard" and select "unformatted". Insert the Post Title for now. Don't bother with the map or markers yet.
- Place the View on your site somewhere and confirm the filters and results are performing as expected.

Once you have the filters working and the correct results displaying, then we can work on hooking up a map and markers using these results.

#1233876
Screen Shot 2019-04-22 at 11.56.47 AM.png

Ok I have the search by address filter working now. One issue with it is it shows all of the post titles below the filter ( I've attached a screenshot so you can see what I mean. I also have it filtering the map markers to show the relevant location based on the search input. Im currently trying to get the location dropdown filter working. So It shows the market based on location name chosen from the dropdown. Right now in the locations custom post type I created the location name is the post title. Would I still be able to use that to filter the map or do I need to adjust the post type to have a custom filed for the location names for the filter to work?

#1233921

Christian would we be able to get into a chat or on a call so I can ask you a couple of quick questions. I think some of my questions will have simple answers and it might be quicker if we can chat or talk about it. Le t me know if this is possible?

#1233997
Screen Shot 2019-04-22 at 5.03.36 PM.png
Screen Shot 2019-04-22 at 5.03.28 PM.png

Im also working on a filter for our providers page. I get the filter to work but it is just showing the results underneath the filter instead of in the main styled view. I need it to adjust the styled view with the filter. Im attaching two screenshots so you can see what i mean. If none of my screenshots or descriptions are helping let me know. I can write out a detailed explanation of the functionality I need to accomplish. Also is it possible to have a filter on another page which then directs you to the page of the content you need to show?

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

https://toolset.com/forums/topic/filters-for-providers-page/

#1234537

One issue with it is it shows all of the post titles below the filter ( I've attached a screenshot so you can see what I mean.
It looks like you have included the wpv-post-title shortcode in the loop tags, but outside of the marker shortcode. You should remove everything outside the map marker shortcodes, unless you want to display that information in a list below the filters. If this isn't making sense, please copy + paste the complete code from your Loop Editor and any templates assigned to that loop.

Christian would we be able to get into a chat or on a call so I can ask you a couple of quick questions.
I am typically available taking chat requests from 2pm - 6pm ( GMT -4, US/NYC ). You can use the chat feature here in the forum to start a ticket and if I'm available I'll pick it up.

Im currently trying to get the location dropdown filter working.
I'm not really clear how locations, markets, and the posts on the map are all connected. May I log in to your wp-admin area and take a closer look? That could speed things up a bit. Private reply fields are active here. Please let me know where I can find the map on the front-end of your site.

Im also working on a filter for our providers page
I'm splitting question this into a separate ticket. Let's keep this ticket focused on the map please, it helps us keep the forum organized.

#1234598
fetter_main_location_page.jpg
fetter_locations_active_dropdown.jpg

Again thank you so much for the help. Of course you can login to the site. The page that the map resides on is hidden link.

Im attaching and image of what we are trying to accomplish with it but I'll give a little detail here.

Essentially we need a map that you can filter three different ways. One is a dropdown of services that will populate the map with the locations that provide the particular service chosen. One is a city zip search the will populate the map with the locations closest to the address that is input. The last is a toggle between regular locations and seasonal. The client has seasonal temporary locations that they want to show up only when a button is toggled to seasonal with different colored map markers ( Need to know is it possible to have different markers on the same map. ). I created location services categories of each service and have them connected to the relevant locations already.

#1234609

Also Ill try and chat with you around 2 if thats ok?

#1234638

Chat does not seem to be working at the moment

#1235032

Hi, I didn't receive your login credentials, can you please include those in the private reply fields here?

#1235179

Invalid username error when I try to log in with this information. Can you check and update the login credentials if necessary?