Skip to content

Instantly share code, notes, and snippets.

@wpflippercode
Created September 8, 2017 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpflippercode/f94dee4927d24e771e2c8670cea84b32 to your computer and use it in GitHub Desktop.
Save wpflippercode/f94dee4927d24e771e2c8670cea84b32 to your computer and use it in GitHub Desktop.
Limit Number of Markers on the google maps
add_filter('wpgmp_location_criteria', 'wpgmp_location_criteria',1,2 );
function wpgmp_location_criteria($location_criteria,$map) {
//This will apply for map id 1.
if( $map->map_id == 1) {
$location_criteria['limit'] = 5;
}
return $location_criteria;
}
@solucionesuno
Copy link

solucionesuno commented Mar 2, 2019

hello! what are the values that can i use for location_criteria?

i need prefilter the available locations in the map as a search. is it possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment