leafem icon indicating copy to clipboard operation
leafem copied to clipboard

Interactive option for leaflet doesn't' seem to work for flatgeobuf files

Open kauebraga opened this issue 2 years ago • 1 comments

Hello.

I'm trying to use the interactive option from leaflet while rendering a flatgeobuf file from leafem::addFgb, but I'm not getting the desired result:

library(sf)
library(leaflet)
library(leafem)
              
leaflet() %>%
      addTiles() %>%
      leafem::addFgb(url = "https://raw.githubusercontent.com/flatgeobuf/flatgeobuf/3.0.1/test/data/UScounties.fgb",
                               options = pathOptions(interactive = FALSE)
                )

Instead of using through pathOptions I also tried to use it as option = list(interactive = FALSE), but the layer is still emitting mouse events (hover and click).

Is there anything I'm missing here, or this option is not implemented?

kauebraga avatar Oct 12 '23 19:10 kauebraga

Sorry for the long silence! Commit https://github.com/r-spatial/leafem/commit/805d96fac47eab619208e04d748550e48bd90654 should address this. Please let me know if it works for you as expected.

tim-salabim avatar Apr 17 '24 09:04 tim-salabim

Works for me! With pathOptions(interactive = FALSE) no mouse events are emitted.

trafficonese avatar May 28 '24 11:05 trafficonese

Ok, I'll close this here. Feel free to reopen if things don't work as expected

tim-salabim avatar Jun 04 '24 15:06 tim-salabim