Skip Navigation

[Gelöst] Show a search feature with Google Maps

This support ticket is created vor 2 Jahre, 9 Monate. 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.

This topic contains 2 Antworten, has 2 Stimmen.

Last updated by John vor 2 Jahre, 9 Monate.

Author
Artikel
#2098501

Tell us what you are trying to do? Show a search feature with Google Maps

Is there any documentation that you are following? I reviewed the Google map examples but they don't address this.

Is there a similar example that we can see?

What is the link to your site? hidden link Change your host filed to see the server.

#2099033

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

Timezone: Europe/London (GMT+00:00)

Hi John

Searches are a feature of Views. Ignoring maps for the moment, you would create a View with the search filters you want to include. You output the fields you want to display in the results, e.g. the post titles linking to the posts themselves.

Bringing Maps into the equation, the map is simply displaying the results (as markers on the map), it isn't responsible for the search itself, it just takes whatever posts the View spits out and uses them as the source for the markers.

In the newer blocks UI, you add a View block to a page and set it up with the custom search. If you don't want to list the results (you only want them on the map) you don't include anything in the View output.

Then you add a Map block to the same page, and specify the View block on the same page as the source for the map.

If you were using the legacy interface it works slightly differently, inasmuch as the search is still set up as part of a View, but in the output of the View you insert the map itself (outside the Loop, so it appears only once) and the markers (inside the Loop) via shortcodes, using the Fields and Views button.

If you have more specific details about where you are stuck we can give more targeted guidance.

#2102763

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.