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
#1235637

Hello Christian,

I want to apologize if I seem frustrated. I'm just under a time crunch and using toolset was supposed to make this functionality easier to complete. It very much is but this map and provider search is driving me crazy. Again thank you so much for all of your help I just need to get this done. Let me know if there is any info you need from me that might help you help me. Hahaha that sounded funny. Also let me know the best time for us to go over these issues so we can talk through this ticket. We seem to have large gaps of time in between replies so I want to make sure I make myself available when its the most convenient for you. Again I am sorry if any frustration has come across on you. It was not intended.

#1235672

Please take a look now. I have placed one View "map-search" in the left column. I have also placed one map shortcode in the right column, using ID map-13. In the Loop of the map-search View, I placed marker shortcodes based on what you had already created in the Locations View. I replaced the map ID so the markers link up with the map now. The distance filter is also displayed in the left column. When I tested with zip code 29403, the map responded and showed the appropriate markers.

So if im not using a view to show the map can I customize the map markers still?
Yes, you can customize the markers by editing or replacing the map marker shortcodes in the Loop Editor of the map-search View.

#1235686

Nice!! thank you so much. So I just need to create a view with a dropdown of the location for the second filter. Also how would you put different color map markers on a map for a certain location category?

#1235694

Also how would you put different color map markers on a map for a certain location category?
You can use conditional HTML to display different map marker icons based on the location category. There are several other tickets in the forum that include code samples and explanations, like this one: https://toolset.com/forums/topic/can-i-customize-map-markers-based-on-category/

If you have specific questions about this, feel free to open a separate ticket so we can discuss in more detail.

#1235695

Thank you for that info. Is the Service dropdown filter for the map included in this ticket also? Or should I open a new ticket for that?

#1235697

Do you want to add a Service filter to the current map, or are you creating a separate map with only the service filter?

#1235699
fetter_main_location_page.jpg

To the current map. I want to end up something like this ( image attached )

#1235705

Also is there a way to hide the use my location. do I need to do that in the css or can I remove it from the view?

#1235706

Okay you should edit the map-search View and scroll down to the section "Search and Pagination". Click "New filter" to add a new filter, and choose the criteria you want to filter upon. The system will generate the filter shortcode automatically.

#1235717

Ok cool I got it in there. And it seems to be working. Does it have to have a submit button to function? Can it trigger the search just when the dropdown is chosen?

#1235719

Nvm I think I got it

#1235724

Still have the question about the use my location button. Can that be removed.

#1235739

There is no option to turn it off, but you can hide it with CSS. Try adding this to the map search View's Search and Pagination CSS panel:

.js-toolset-maps-distance-current-location{
display: none !important;
}
#1235754

Thank you so much that worked!! Again thank you for all the help and Im so sorry I keep pestering you. Once I get toolset down you will never have to hear from me again hahaha. So the search and dropdown are working as needed now but how would I embed those filters on a different page and have them link to this map. For instance on the home page someone uses the dropdown or search to find a location and the result will take them to the locations page with the locations that match populating the map.

#1235758

You have the option to insert only the search form when you insert the View shortcode. Check the documentation here for more information about this: https://toolset.com/documentation/user-guides/front-page-filters/#4-1-adding-the-custom-search-form-to-a-page-or-widget