New home › Forums › Gold Add-on › General queries › Count on Marker Filter
Tagged: count markers filtered, marker filter, markers
- This topic has 5 replies, 2 voices, and was last updated 5 years, 10 months ago by anicasio.
-
AuthorPosts
-
January 23, 2018 at 1:46 am #33990anicasioMember
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.January 23, 2018 at 10:30 am #33997PerryModeratorHi 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
– PerryJanuary 30, 2018 at 10:39 pm #34214anicasioMemberHello 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.
January 31, 2018 at 9:54 am #34230PerryModeratorHi 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
– PerryJanuary 31, 2018 at 8:28 pm #34253anicasioMemberNo for the moment thank you
February 1, 2018 at 12:40 pm #34272PerryModeratorHi 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 -
AuthorPosts
- You must be logged in to reply to this topic.