Skip to content

Instantly share code, notes, and snippets.

@wpflippercode
Created January 21, 2019 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wpflippercode/7044871fb20bcf05ca030e5f8ad05b63 to your computer and use it in GitHub Desktop.
Save wpflippercode/7044871fb20bcf05ca030e5f8ad05b63 to your computer and use it in GitHub Desktop.
Change Marker Cluster Icon Using Filter
add_filter('wpgmp_map_markercluster',change_cluster_marker,10,2);
function change_cluster_marker($cluster_data,$map){
// Add map specific condition here
if($map->map_id == '1'){
//Change Main Cluster Image
$cluster_data['icon'] = 'university.png';
//Change Cluster Hover Image
$cluster_data['hover_icon'] = 'university.png';
}
return $cluster_data;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment