Pre Filter Markers

New home Forums Pro Add-on Pre Filter Markers

  • This topic has 1 reply, 2 voices, and was last updated 2 years ago by Matthew.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #72769
    jjsoto
    Participant

    Hi everyone

    Is there a way to pre-filter markers by category when loading the map?

    For example, If I have X categories and I only want to show markers belonging to one of them to a specific user, can I provide a link to the user that shows him a map with only the requested category?

    If this is not possible, can I create one map for each category and only allow each one to load markers from one category, from the same database?

    I appreciate your help

    #72779
    Matthew
    Moderator

    Hi there,

    Thank you for getting in touch with us, we do appreciate your time.

    This is achievable, however, not by the methods you have mentioned, but you are close.

    We do have a ‘cat’ shortcode parameter that will filter the map based on the category ID specified. Thus you can create one map will all your markers with each of them assigned to their respective categories.

    You may then create different pages that pertain to different categories. Here is a summarized example:
    1. Create a map – has map ID of ‘1’.
    2. Create a category called “Africa” – has category ID of ‘1’.
    3. Create markers in your map and assign them to the “Africa” category.
    4. Create a page called “African Markers”
    5. Enter the map shortcode with the ‘cat’ parameter – [ wpgmza id=”1″ cat=”1″ ]

    NOTE: the above example shortcode shouldn’t have the spaces after the first square bracket ([) and the before the last square bracket (]).

    Once you have done, this you may share the link to this page to a user and they will see a map with all the markers assigned to the “Africa” category.

    Should you like more information on this, please see our documentation for this here: https://www.wpgmaps.com/documentation/advanced-map-options/map-shortcode-parameters/#category_usage

    Please do let me know if this helps?

    Kindest Regards,
    Matthew

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.