Viewing 8 replies - 1 through 8 (of 8 total)
  • @mosabua,

    We do have plans to implement marker clustering, but the priority of features is based on the number of requests we get for that feature. I can’t promise it will be available very soon, but we do have plans to implement this feature.

    The code does support the customization of marker icons, but there is currently no user interface for handling those customizations. We do have plans to implement the ability to customize these things via the admin, but as of yet have not done so.

    Thread Starter mosabua

    (@mosabua)

    Thanks Micah for your reply. Sounds good to me. How can I make the customization of the marker icons? A piece of code in functions.php, a custom plugin or some lines of code in the template files of Stellar Places?

    You can drop some code into your functions.php file. Here is some sample code:

    add_filter('stellar_place', 'custom_stellar_place_icon', 10, 2);
    function custom_stellar_place_icon( $place, $post ) {
    	$place->icon = 'https://domain.com/path/to/icon.jpg';
    	return $place;
    }

    Note that you have access to the $post object, in addition to the $place object.

    Thread Starter mosabua

    (@mosabua)

    Awesome – thank you.

    That code looks good, but how can you add icons per Category?

    @edoherto,

    The stellar_place filter gives you access to the $place object. As you can see from line 251 here (https://github.com/wpscholar/stellar-places/blob/master/includes/init.php#L219), there is a taxonomies property that contains all of the terms associated with that place. You can check that property and conditionally add an icon via the code.

    Not sure if I’m enough of a coder, anyone else want to help with a script to show different markers for different categories?

    @deeve007 There is an issue currently on GitHub for the custom icon functionality here: https://github.com/wpscholar/stellar-places/issues/7

    Those who would like to contribute are welcome. I’ve also opened an issue related to marker clustering: https://github.com/wpscholar/stellar-places/issues/14

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Different Markers & Clustering’ is closed to new replies.