Forum: Bug Reports

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support and general questions related to GEO my WP plugin and its core add-ons please use the support forum.

[Resolved]Map and Results question

Home Forums Bug Reports Map and Results question

This topic contains 16 replies, has 3 voices, and was last updated by  romanferens 8 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #54204

    Alan Green
    Participant

    I have the following currently set up:

    – Map at top of page (displays all results independently of search results)
    – Search Form in middle of page
    – Search Results at bottom of page (with 30 results per page).

    Currently when I search using the form this then displays the results correctly in the bottom of the page. Nothing changes in the map – This is correct.

    However, what I would love to achieve is on entry to the page for the map to show all results and for the search results (bottom of page) to show 30 results per page. Then when you perform a search all results appear on the map i.e. 93 results but still only 30 per page show in the results at bottom of page.

    Doubting if this is possible but thought I’d ask.

    #54216

    Eyal Fitoussi
    Keymaster

    Hello Alan,

    However, what I would love to achieve is on entry to the page for the map to show all results and for the search results (bottom of page) to show 30 results per page. Then when you perform a search all results appear on the map i.e. 93 results but still only 30 per page show in the results at bottom of page.

    I am a bit confused as this is exactly what you describe that is the current behavior of the page:

    – Map at top of page (displays all results independently of search results)
    – Search Form in middle of page
    – Search Results at bottom of page (with 30 results per page).

    Currently when I search using the form this then displays the results correctly in the bottom of the page. Nothing changes in the map – This is correct.

    Or am I missing something?

    #54222

    Alan Green
    Participant

    When I enter the page. I want the map to show all results (350 currently) with the search results at the bottom of the page paginated and showing 30 per page. I can do this but I have to have different maps shortcodes.

    If I use the same Map ID for the search results and map, then the map will only show the same amount of results as the search results below i.e. 30.

    #54243

    Eyal Fitoussi
    Keymaster

    I see.
    It is not possible to achieve the above using a single form, unless you customize the plugin to do so. By default, the map and the results below are synced with each other. However, for that reason there is the forms builder. It allows you to create as many forms and maps as you need and help you archive the above.

    There is no harm in using multiple shotcodes on a page. The more maps and search results on a single page means more queries, which might effect performance a bit. However, that will be the same thing as having a single form that have the map shows all results while the result below shows only 30. For that you will need two separate queries.

    I hope that makes sense.

    #54248

    Alan Green
    Participant

    Okay, thanks for this but how do I achieve this?

    #54259

    Eyal Fitoussi
    Keymaster

    thanks for this but how do I achieve this

    Do you mean how do you customize the plugin to do the above?

    #54262

    Alan Green
    Participant

    Thanks for replying. So are you saying to achieve what I’d like

    i.e. top map to show all results, bottom search results to show paginated 30 results on entry to page and then when I do a search the map to show all results for that particular search with the paginated results below.

    I would have to customise the plugin?!

    #54274

    Eyal Fitoussi
    Keymaster

    I apologize but I keep getting confused here.

    The setup that you currently have with the multiple shortcode, isn’t it producing the results that you are looking for?

    #54276

    Alan Green
    Participant

    No. But it’s not likely to in its currrent form which is why I’ve asked how to do it.

    Here’s what I have:

    TOP
    [gmw form=’3′] (Posts Global Map – shows all posts)

    MIDDLE
    [gmw form=’2′] (Posts Locator – paginated with 30 per page)
    [gmw search_results=’1′] (Posts Locator – paginated with 30 per page – bringing in results from search form on homepage)
    [gmw search_results=’5′] (Posts Locator – paginated with 30 per page – bringing in results from bottom search form)

    BOTTOM
    [gmw search_form=’5′] (Posts Locator – paginated with 30 per page)

    So what I need to know is how to get it to work whereby on entry to page the map at the TOP of the page shows all results but then when a search is performed using a search form for it to show all results from the search and not 30 at a time.

    Thanks.

    #54669

    Eyal Fitoussi
    Keymaster

    I see now, thank you for the detailed explanation.

    Please follow the steps below and hopefully it will provide you with the solution that you are looking for.

    1) First, we are going to create a map that will display all locations on page load. This map will basically replace the Global Map that you have on the page.
    a) Navigate to GEO my WP forms builder and create a new Posts Locator form ( lets call it form with ID 10 just for the example ).
    b) Edit form ID 10 and click on the “Page Load Results” tab.
    c) Check the “Enable Page Load features” checkbox.
    d) Check the checkboxes of the “Post type” that will be used for the map.
    e) Make sure the “Display list of results” checkbox is unchecked.
    f) The “Display Map” radio button set to “Using shortcode”.
    g) In the “Results Per Page” textbox enter -1.
    h) Click on the “Search Form” tab and in the “Search Form Template” dropdown menu select “disable search form”.
    i) Replace the global map shortcode ( [gmw form=”3″] ) with :

    Now you created a map that will only show on page load and will display all locations by default. This map will not show when a form is submitted.

    2) Form forms 1, 2, and 5:
    a) Issue that you have the map disabled in the “Page load results” tab which is fine. If otherwise, please disabled it.
    b) Click on the “Search Results” tab and in the “Display Map” radio button choose “Using shortcode”.
    c) replace:

    with:

    At this point, if I am correct, you should have the setup that you want. The top map should only displayed on page load and show all results. And the other maps will only display on form submission and will show the 30 location of the search results.

    I hope that helps.

    #54680

    Alan Green
    Participant

    Thanks for taking the time to do this.

    I did a quick test with just the first map that shows all results and it does seem to take longer to load and then when you click a marker, that takes a very long time to load the information in the marker window.

    I might give this a go again when I have this on the live server as that will be a bit quicker but is there any reason why that should take a long time to load?

    #54706

    Eyal Fitoussi
    Keymaster

    Hello Alan,
    I don’t see a reason for it to be slower than the before, when the Global Map was on the page.

    As I mentioned before, having the page setup this way means that there are two queries being executed on the page. One for the map which displays all location and another query for the search results. Having two queries can slow down the page load. However, this should be noticed only on page load as on form submission there is only one query happening.

    #54868

    Alan Green
    Participant

    I’ve added the code as instructed but when I perform a search it still only shows 30 results. What I wanted is the map to show all results based on the search criteria and the search results below to be paginated at 30 results per page.

    #54873

    Alan Green
    Participant

    Okay, also it takes way too long to load the info marker content when having it like this. 20 seconds to load marker content!!!

    #54877

    Eyal Fitoussi
    Keymaster

    What I wanted is the map to show all results based on the search criteria and the search results below to be paginated at 30 results per page.

    That is not possible out of the box as that map is synced with the search results. If at all possible, it will require a customization to be done in the plugin.

    Okay, also it takes way too long to load the info marker content when having it like this. 20 seconds to load marker content!!!

    That is because at the moment the plugin uses the admin-ajax library for the AJAX call of the info-window. That means that the in order to load the info-window content, the plugin loads the entire site when an ajax call is being made. This should be improved in a future update since now there is a more efficient way to load AJAX.

    You can disable the AJAX feature of the info-window in the form editor -> Marker Window tab -> select the “Normal” in the “Marker info-window type” radio button. That is awesome will disable some contact from showing in the info-window.

Viewing 15 posts - 1 through 15 (of 17 total)

The topic ‘Map and Results question’ is closed to new replies.