• Resolved ocepo

    (@ocepo)


    Hello,

    I’m a real beginner and I’m creating a map on my wordpress site (it’s in local as it’s currently in developpment) using the Leaflet Map and Extensions for Leaflet Map plugins.

    I have groups of markers in a close area and I would like a specific marker to be the most visible (in any zoom case), but I have issues as another marker is really close by and is hiding it. I wonder if maybe someone could help me achieve it.

    I have tried using riseOnHover or zIndexOffset in the shortcode and such but I didn’t seem to be able to make it work. And I’m less than sure it’s the correct thing to do!

    If it’s useful here is an exemple of my code :

    [leaflet-map lat=43.79589433002964 lng=6.328071205823208 zoom=8 scrollwheel=true]

    [leaflet-extramarker markerColor="red" lat=43.55 lng=6.00 shape="circle" title="Ecole maternelle"]Ecole maternelle[/leaflet-extramarker]

    [leaflet-extramarker markerColor="red" lat=43.56 lng=6.01 shape="square" icon=fa-school-flag prefix=fa title="College"]College[/leaflet-extramarker] (I’d like this marker visible every time “above” the others in this exemple)

    [hover][leaflet-scale][fullscreen][zoomhomemap]

    I searched the forum but didn’t find quite the same issue. Thank you all in advance, any help is appreciated!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author hupe13

    (@hupe13)

    You can cluster the markers with [cluster].

    There was a similar question about overlapping objects before. I started to solve this but failed for now and did not continue. It is also a question of time. But I still have the project on the wish list.

    Thread Starter ocepo

    (@ocepo)

    Thank you for you fast answer. I will try again the clustering. And thank you for your work on this plugin it really helps code-noobs like I am =)

    Have a nice day.

    Plugin Author hupe13

    (@hupe13)

    Maybe you want to group the marker.

    Plugin Author hupe13

    (@hupe13)

    Would this be a solution for your application?

    Thread Starter ocepo

    (@ocepo)

    Hey! First of all thank you for reaching back again. The example you provide is pretty cool and that’s more or less what I did on my map after trying for days.

    But unfortunately it doesn’t solve my problem : I wanted to make one marker the most visible in each group because it’s the one that provides the link and information I need shown. By the way if I may ask another thing… I tried to have the pop-up visible at all times for a bunch of markers at the same time. But I only have the last one in my code visible.

    Maybe only one pop-up can be visible at the same time? Like a label for the marker. Or maybe there is another way to have a label displayed above some markers?

    I’m not sure I’m using the right tool to achieve my map but I’m having a lot of fun learning stuff on these Plugins. And my map is pretty cool as it is, I’m just trying to get it closer to my mind vision. Thanks again for all the work and your disponibility!

    Plugin Author hupe13

    (@hupe13)

    If you ask your favorite search engine – most (or all) answers say, the best solution is to spiderfy the overlapping markers, with or without clustering. I think, it is also better for user experience.

    Marker clustering is included in the plugin. If you are interested in without clustering I will provide a script.

    It’s a different case with areas (geojson, circle, polygon).

    • This reply was modified 1 year, 9 months ago by hupe13.
    Thread Starter ocepo

    (@ocepo)

    Hey! Alright I’m sure you know what you are talking about so I’m willing to try. Sorry for being stubborn before >< I surely have the wrong ideas in cartography as I’m a real beginner.

    Next time I go to work I will try to play with the spiderifying options, in order to have “spiderify at all zooms” like you did. For now my map has clusters in “home”/default zoom and spiderifies on click but then when you zoom in you can’t spiderify anymore. Actually for my case the clusters are interesting in the default zoom to help with counting the markers in each group (yes I also have groups xD).

    Yes I would very much like to try without the clustering too, like in your exemple before, thank you for offering to provide the script, it is very nice of you! Like that, I can learn and have plenty of options to show my coworkers??

    Plugin Author hupe13

    (@hupe13)

    Thread Starter ocepo

    (@ocepo)

    Thanks! It seems a bit technical for me so I’ll keep it for when I have the courage to try it.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Putting a specific marker in foreground/ visible in front of all others’ is closed to new replies.