Add numbers to map markers on the search results page

This topic contains 10 replies, has 3 voices, and was last updated by  dmitriy 8 years, 10 months ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #69245

    dmitriy
    Expired Member
    Post count: 9

    Hello. I would like to add numbers to the search results (ex. first result gets #1, second #2, etc.) and have each marker on the map display a number corresponding to listings within the search results. Could you please point me in the right direction in order to make this customization? Huge thanks in advance!

    #69254

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I’m not sure this is an easy one, however I have asked to the developers if possible to point you in the right direction.

    They’ll let you know asap.

    Thanks

    #69296

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi Dmitriy,

    This would not be impossible to implement but it would require we add 1 filter to the function create_list_jsondata() and it would require that you use very specific markers icons for search, do you know that hovering over “pinpoint” will make the marker jum so it is possible to know what marker does what there? If you want me to add that filter and give you and example code, let me know.

    Thanks,

    Stiofan

    #69337

    dmitriy
    Expired Member
    Post count: 9

    Stiofan, thank you so much for your quick reply! I would really appreciate an example code, even in the most basic form. My marker images are just a circle, so I’m hoping to make the numbers appear in the middle with CSS. Thank you!

    #69359

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    ok,
    #1 replace this file in core: https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/map-functions/map_functions.php

    #2 add this to your child theme functions.php

    Stiofan

    #69363

    dmitriy
    Expired Member
    Post count: 9

    Thank you so much!

    #69371

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You are welcome! 🙂

    #70045

    dmitriy
    Expired Member
    Post count: 9

    Stiofan, I have 2 quick follow-up questions.
    1. Is this modification to the map_functions.php going to make it to the core plugin? In other words, will this get wiped out during the next plugin update?

    2. Unrelated, but I figured I’d ask you here in one shot… Is there a way to make the InfoBubble pop-up on hover in addition to click? I found where I need to modify it in the code, but didn’t want to modify the core file. Is there a way to add an additional event listener externally?

    Thank you so much for your support!

    #70086

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    1) that file is coming from the development version of GeoDirectory on GitHub, which means it will be in the next version. No need to worry about updates.

    2) I’ll get Stiofan to answer on this one.

    Thanks for patience,

    #70088

    Paolo
    Site Admin
    Post count: 31206

    Stiofan replied:

    not easily, the best thing would prob be to add an option in GD to switch it?

    I’ve added a task for it, but it will probably have to wait and won’t be included in the next release, so for the moment the only option you have is to hack the core file.

    Thanks

    #70089

    dmitriy
    Expired Member
    Post count: 9

    You guys are the best! Thank you!

Viewing 11 posts - 1 through 11 (of 11 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