Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map sometimes not draggable when reloading the Website #75

Open
ghost opened this issue Jul 16, 2021 · 4 comments
Open

Map sometimes not draggable when reloading the Website #75

ghost opened this issue Jul 16, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 16, 2021

Hi there,

I have the Problem that the Map sometimes is not draggable when I reload the Website with STRG +R or STRG + SHIFT + R. The cursor switches not to the hand symbol but remains as an arrow.

I can't see any error in the console output and there is absolutely no recognizable pattern. A few times it works and suddenly it doesn't.

When i disable the plugin all works fine. I'm using the latest version.

Any Ideas?

Thank you :)

@kvnvandenbrande
Copy link

Same issue here. Did you found a solution for it?

@tfilo
Copy link

tfilo commented May 3, 2022

Same issue here. Any updates ?

@slutske22
Copy link

One thing I noticed is when I have a polygon layer on the map, clicking and dragging on the polygon works to pan the map, but clicking off of a polygon and trying to drag does not work. Behavior resolves when I disable this plugin. Not sure if that is related.

@simon04
Copy link

simon04 commented Nov 26, 2022

A workaround is calling _handleMouseOver once gestureHandling is initialized, for instance via map.whenCreated

// react-leaflet
<MapContainer
  gestureHandling={true}
  whenCreated={map => {
    // Workaround for https://github.com/elmarquis/Leaflet.GestureHandling/issues/75
    map.gestureHandling?._handleMouseOver?.();
  }}
>
// untested
var map = L.map("map", {
  center: [-25.2702, 134.2798],
  zoom: 3,
  gestureHandling: true,
});
// Workaround for https://github.com/elmarquis/Leaflet.GestureHandling/issues/75
map.whenReady(() => map.gestureHandling?._handleMouseOver?.());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants