Title: Hover with Other Leaflet Elements
Last modified: March 19, 2022

---

# Hover with Other Leaflet Elements

 *  Resolved [funkyplaid](https://wordpress.org/support/users/funkyplaid/)
 * (@funkyplaid)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/)
 * 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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/#post-15475661)
 * Do you have an example for a polygon?
 *  Thread Starter [funkyplaid](https://wordpress.org/support/users/funkyplaid/)
 * (@funkyplaid)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/#post-15475664)
 * 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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/#post-15518899)
 * Solved in [2.2.6](https://leafext.de/en/hover/circle-polygon-line/).
 *  Thread Starter [funkyplaid](https://wordpress.org/support/users/funkyplaid/)
 * (@funkyplaid)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/#post-15518955)
 * 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](https://wordpress.org/support/users/funkyplaid/)
 * (@funkyplaid)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/#post-15518987)
 * 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](https://jdb1745.net/littlerebellions/wp-content/uploads/2022/04/hover.png)
   [click pop-up](https://jdb1745.net/littlerebellions/wp-content/uploads/2022/04/click.png)
 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/#post-15520273)
 * > 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](https://leafext.de/en/hover/dokuhover/).
   This page is the same like in the backend: [https://your-domain.tld/wp-admin/admin.php?page=extensions-leaflet-map&tab=hover](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](https://wordpress.org/support/users/hupe13/).
 *  Plugin Author [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/#post-15520349)
 * > 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](https://unpkg.com/leaflet@1.7.1/dist/leaflet.css).

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

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

 * ![](https://ps.w.org/extensions-leaflet-map/assets/icon-256x256.png?rev=3067862)
 * [Extensions for Leaflet Map](https://wordpress.org/plugins/extensions-leaflet-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/extensions-leaflet-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/extensions-leaflet-map/)
 * [Active Topics](https://wordpress.org/support/plugin/extensions-leaflet-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/extensions-leaflet-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/extensions-leaflet-map/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [hupe13](https://wordpress.org/support/users/hupe13/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/hover-with-other-leaflet-elements/#post-15520349)
 * Status: resolved