Mashup Maps Integration

Forums › Forums › Search & Filter Pro › Mashup Maps Integration

Viewing 9 posts – 1 through 9 (of 9 total)
  • Anonymous
    #273890

    Dear Trevor,

    I am trying to build a search that shows a map with different markers in the search results.

    For the preparation I read through the forum and saw that you once did it using a mashup map such as wpgmaps.com – hence I bought it and set up everything.

    Actually I dont know what the next steps are. The Link you provided in another topic, goes to a 404 page.

    Can you tell me what you did, to achieve this in the past?

    Would love to hear from you,
    Philipp

    Trevor
    #273929

    To test whether it worked, I used our Using a Shortcode display results method, following the guide here, and the customising section (so I had my own copy of the results.php file):

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results

    On each post for which there was a map needed, I made a map in wpgmaps and noted the ID.

    Using Advanced Custom Fields, I created a ‘map_id’ custom field for these posts, and then added against each post the relevant map ID. I also made a parent map, and noted that map ID.

    Before the while loop starts in the results.php template (‘the template’ from now on), I defined two variables:

    $post_content_output = '';
    $map_output = '[wpgmza id="2" mashup=true mashup_ids="';

    where 2 is the parent map ID (so change to suit).

    As each loop of while is run, you output the strings into $post_content_output and add the post map ID to $map_output, with a comma after each ID.

    When the loop has finished, you need to trim the last comma off $map_output, then add '" parent_id="2"]' to it. That should complete it as a mashup shortcode.

    Then you have two variables to echo to the page (one as a do_shortcode function).

    I no longer have a copy of the results.php I used, sorry, so you would need to code this yourself, but the logic is as above.

    This was the reference I used:

    https://www.wpgmaps.com/documentation/advanced-map-options/map-shortcode-parameters/

    Anonymous
    #274247

    Hi Trevor,

    thank you for the detailed explanation.

    As I am a webdesigner and not a developer, this goes beyond my experience: I will search for an alternative or an web developer who can help me out.

    This ticket can be closed.

    Have a nice day,
    Philipp

    Anonymous
    #274265

    Before you close the ticket: A friend of mine gave me this script.
    Is it going in the right direction?

    https://www.codepile.net/pile/kpDB2q0E

    Trevor
    #274289

    Yes, just like that. Show him the results.php file from our plugin templates folder. I will leave this open unless you think I should close it?

    Anonymous
    #276703

    Hello Trevor – if this thread is still open I would like to jump in. I think what I am trying to do is the same thing… I have pro wpgmaps, i have pro Search and Filter. I have the php mashup code. What I am missing is – anything working. I may need to revisit the map plugin docs. So – what I am trying to do, is sort and filter 600+ providers, and as they filter, they appear as pins on the map based on their address. I can add the map ID to each provider record, thats easy enough with an import. But – do I also need to add them individually to the map somehow? Or how else do they get tied to the locations in the map? Thats my missing link and I realize it may not be a Search & Filter issue, either.

    Trevor
    #276705

    Hi Robert

    Are you able to open a ticket on our new support system in Your Account, and refer back to this topic?

    Anonymous
    #276706

    I can and did. I hope I did it right. thanks Trevor!

    Trevor
    #276708

    Yes, I see it, I will reply tomorrow, as it is late here.

Viewing 9 posts – 1 through 9 (of 9 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.