• Resolved funkyplaid

    (@funkyplaid)


    Hi there, thanks so much for your great extension plugin. I’m working mostly with circles and polygons in my maps, rather than geojson and markers. Is there any way to have the hover functionality work with those elements as well? I see from the documentation that they’re not included in compatible elements.

    Thanks very much,
    Darren

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

    (@hupe13)

    Do you have an example for a polygon?

    Thread Starter funkyplaid

    (@funkyplaid)

    Just a couple examples of my elements are below.

    [leaflet-circle lat="-12" lng="-130.25" radius="5" fillColor="#D54C27" color="red" weight="2.2" fillOpacity="0.4"]Parliament Close[/leaflet-circle]
    
    [leaflet-polygon latlngs="-37, -129; -45, -128; -44, -120; -36, -120" color="green" fillColor="yellow"]Meal Market[/leaflet-polygon]
    Plugin Author hupe13

    (@hupe13)

    Solved in 2.2.6.

    Thread Starter funkyplaid

    (@funkyplaid)

    Thanks very much!

    Confirming that polygons work now:
    [leaflet-polygon latlngs="-37, -129; -45, -128; -44, -120; -36, -120" color="green" fillColor="yellow"]Meal Market[/leaflet-polygon][hover]

    but my circles still do not:
    [leaflet-circle lat="-12" lng="-130.25" radius="5" fillColor="#D54C27" color="red" weight="2.2" fillOpacity="0.4"]Parliament Close[/leaflet-circle][hover]

    Your latest update also seems to have fixed [zoomhomemap fit/!fit], which did not work for me until the latest version.

    Thread Starter funkyplaid

    (@funkyplaid)

    Okay, interesting update. If I append [hover] to only leaflet-marker and leaflet-polygons, hovers work on all elements on the page. If I append my leaflet-circles with [hover], none of the hovers work. Should I be using [hover] with each element on my page, or one universal instance of it?

    Also, do you know if there is a way to disengage the pop-up upon clicking if the hover function is working? Both seem to come up upon hovering and clicking.

    Lastly, is there a way to control formatting of style and location the hover window appears? I have no problem formatting the window upon clicking, but the hover window doesn’t respond to the same CSS code.

    Examples:
    hover pop-up
    click pop-up

    Plugin Author hupe13

    (@hupe13)

    Should I be using [hover] with each element on my page, or one universal instance of it?

    You need to use it once, see the documentation. This page is the same like in the backend: https://your-domain.tld/wp-admin/admin.php?page=extensions-leaflet-map&tab=hover

    Also, do you know if there is a way to disengage the pop-up upon clicking if the hover function is working?

    Theoretically this might be possible, but what do you do on touch devices? Hover is switched off there, because it makes no sense.

    Both seem to come up upon hovering and clicking.

    This is a bug. I will fix it.

    • This reply was modified 4 years, 1 month ago by hupe13.
    Plugin Author hupe13

    (@hupe13)

    Lastly, is there a way to control formatting of style and location the hover window appears? I have no problem formatting the window upon clicking, but the hover window doesn’t respond to the same CSS code.

    The place where popup or tooltip appears depends on the element. For circle, line and polygon the tooltip appears in the center and the popup at the place where you clicked. A popupanchor can only be defined for leaflet-marker and leaflet-geojson.

    I have too little knowledge about css, but I would start looking and testing here.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Hover with Other Leaflet Elements’ is closed to new replies.