• Resolved massimo1980

    (@massimo1980)


    Hi, I have created a map for my site and it is visually perfect.
    I don’t understand why the cursor doesn’t change when I hover over it with the mouse. It would be useful to understand that markers are clickable. Is there no CSS for custom markers?
    thanks

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author mapster

    (@mapster)

    Hi there! This is just a default thing with Mapbox. Sometimes you might not want a marker to change the cursor, for instance, if a marker isn’t clickable. The markers (note, not labels, but plain markers) do have a class that you can edit: mapboxgl-marker or maplibregl-marker. You could add a hover effect to that class and it should work!

    Thread Starter massimo1980

    (@massimo1980)

    thank you for the answer.
    I added the code below as custom css and it works for the default markers but not for my custom markers loaded as images

    .mapboxgl-marker {
        cursor:pointer !important;
    }
    Plugin Author mapster

    (@mapster)

    Hello, do you have the map anywhere that I can take a look at it to see if I can spot the issue? In general, custom image markers do have cursor changes when hovered over.

    Thread Starter massimo1980

    (@massimo1980)

    The map link: https://ghost-map.it/

    • This reply was modified 1 year, 1 month ago by massimo1980.
    Plugin Author mapster

    (@mapster)

    Thanks for the link, I can see it. It’s because of the way the markers are added, they are actually icons, not markers technically in the Mapbox API. I will look into setting a condition that changes the cursor when hovering over one of these. It may be a few days, I’m currently travelling, please email me at [email protected] if possible so I can support more!

    Plugin Author mapster

    (@mapster)

    This issue has been resolved with a fix currently in beta, to come out with the next release (1.2.38). Label/icons will now change cursor when hovered over if they have a popup attached.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cursor not change on hover marker’ is closed to new replies.