Count on Marker Filter

New home Forums Gold Add-on General queries Count on Marker Filter

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33990
    anicasio
    Member

    Hi, every one I tried to get the No. count of item display on owl list, I trying to find the $result of filter objects of the array with not success.

    I just wanna show the No. of Result quick example :

    Bellow the map show the Items array of a object y want to show this

    Distribuitor’s Found: 10 <—this result want to show

    Attachments:
    You must be logged in to view attached files.
    #33997
    Perry
    Moderator

    Hi there

    Thank you for getting in touch!

    This should be achievable, could you please give me the URL of your map page so I can look into this?

    Kind regards
    – Perry

    #34214
    anicasio
    Member

    Hello every one I make a solution for this if you wanna count your marker of a result on search
    maybe this will help to someone else

    
    //Count number of Distributors
    count_d = 0;
    // I create a SQL query to get results before and pass to my var $results
    foreach($results as $result){
    if (is_array($marker_array)) {
                    $display = 0;
                    foreach ($marker_array as $marker) {
                        if ($marker == $result->id)  {
                            $count_d++;
                            $display++;
    
                        }
                        //echo count($marker_array);
                    }
    
                } else { $display = 1; /* show all markers as we havent passed through any marker variables to check */
         }
    }
    
    if( $count_d > 0){
               echo "<div class='text-center'><h3 style='color: red;'>Total Distributor's Found: " . $count_d . "</h3></div>";
            }
    
    • This reply was modified 5 years, 10 months ago by anicasio.
    #34230
    Perry
    Moderator

    Hi there,

    Thank you very much for your suggestion! We’ll try this out and look at implementing it.

    Is there anything else we can help you with?

    Kind regards
    – Perry

    #34253
    anicasio
    Member

    No for the moment thank you

    #34272
    Perry
    Moderator

    Hi there,

    You’re most welcome!

    If you’d be kind enough to leave a quick review at https://wordpress.org/support/plugin/wp-google-maps/reviews/ me and the team would be very grateful.

    Kind regards
    – Perry

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