Default category icons on "GMap – Home page"

This topic contains 9 replies, has 2 voices, and was last updated by  Vikas 10 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: , ,

  • Author
    Posts
  • #2558

    eqhes
    Expired Member
    Post count: 40

    Hi,

    I’ve got a main category and some subcategories in it. Say, for example (all enabled for the map):

    – Main
    — Sub one
    — Sub two

    The Google Map on home page shows all the pinpoints with the icon assigned to the “Main” category. If I uncheck “Main”, then I see all pinpoints with the “sub one” or “sub two” category icons. With GeoTheme I could get into this approach by default (all categories active, but “Main” unchecked). But with GeoDirectory I can’t do the same because if I disable “Main” on [Geodirectory –> Design –> Map] all subcategories are also disabled.

    I’ve tried to set, p.e., “Sub two” as the default category of a place, but it doesn’t take effect for the icon on the map.

    So I think there are two approaches to get what I want:

    • Let us uncheck a category, but keep the subcategories checked and enabled. <– I think this is the best option, it worked fine on GeoTheme.
    • Use the default category icon as the icon for pinpoints instead of the parent category icon. <– Not sure, but this could be hard to develop, isn’t it?

    Any advice on how to get what I want?

    #2560

    eqhes
    Expired Member
    Post count: 40

    You can see what I’m talking about in the two images attached to this post.

    • mapa-no.png (GeoDirectory) <– Subcategories are shown because I’m displaying them with CSS, they are forever-hiden by default.
    • mapa-si.png (GeoTheme) <– Subcategories visibility can be toggled using a small arrow in front of the main category name. The main category is unchecked bu default.
    #2586

    Vikas
    Full Member
    Post count: 1128

    Hi,
    I will look into it and get back to u asap.

    Thanks for notifying.

    #2596

    Vikas
    Full Member
    Post count: 1128

    Sorry but i couldnt create this issue on my local version.
    Please let me know ur site url.

    Thanks

    #2597

    Vikas
    Full Member
    Post count: 1128

    OK i understood what exactly u need.
    I am not sure why would u like to disable the main category and make only sub categories available on map. Will u please provide me an example where it is really necessary to make main disable and make sub cat available ?
    Regarding the default category, U can set only main category as default one, default cat icon is used to decide which icon to show in listing or search results map when a post is in more than 1 category.

    Please advise ?

    Thanks

    #2619

    eqhes
    Expired Member
    Post count: 40

    Hi @Vikas,

    Please, check the images attached in my last post here.

    I need the result shown on the “mapa-si.png” (this is a screenshot of a GeoTheme installation). I need to show all items from subcategories each one with the subcategory icon. If I enable the main category, then all markers are shown with the main category icon and then we can’t distinguish visually which kind of place a marker is (example of this undesired behaviour: “mapa-si.png”).

    I’ll send you access to my GeoTheme installation so you can compare how I achieved this on there.

    #2620

    eqhes
    Expired Member
    Post count: 40
    This reply has been marked as private.
    #2629

    Vikas
    Full Member
    Post count: 1128

    Hi,

    I will check it and get back to u.

    Thanks

    #2732

    eqhes
    Expired Member
    Post count: 40

    While you add this features (or “re-add” them, because they were in GeoTheme), I’ve done the job loading this JavaScript on header:

    
    
    <script language="javascript" type="text/javascript">
    	
        jQuery(window).load(function(){
            jQuery(".geodir_map_v3_home_map_2_map_category .main_list > li:first-child > input").trigger( "click" );
        });
    
    </script>

    This works for me because the category that has got subcategories is the first one on the list and the class name of my map is “geodir_map_v3_home_map_2_map_category”. Other configurations may need some tweaks, but anyone can improve this code as needed ;).

    #2788

    Vikas
    Full Member
    Post count: 1128

    Hi,

    I will check this out.

    Thanks

Viewing 10 posts - 1 through 10 (of 10 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount